amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
580 stars 730 forks source link

Amazon doesn't return resultFeedDocumentId #96

Closed iceleo-com closed 2 years ago

iceleo-com commented 3 years ago

After creating a feed document, I start to encrypt and upload the feed content, this is my uploading code

    $feedDocumentId = $feedDocument->getFeedDocumentId();
    $url = $feedDocument->getUrl();
    $key = $feedDocument->getEncryptionDetails()->getKey();
    $key = base64_decode($key, true);
    $initializationVector = base64_decode($feedDocument->getEncryptionDetails()->getInitializationVector(), true);
    $encryptedFeedData = openssl_encrypt(utf8_encode(array2xml($productData)), 'aes-256-cbc', $key, OPENSSL_RAW_DATA, $initializationVector); // array2xml is my own function

    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => $url,
        CURLOPT_SSL_VERIFYHOST => 0,
        CURLOPT_SSL_VERIFYPEER => 0,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 90,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'PUT',
        CURLOPT_POSTFIELDS => $encryptedFeedData,
        CURLOPT_HTTPHEADER => [
            'Accept: application/xml',
            'Content-Type: ' . $contentType,
        ],
    ));

    $response = curl_exec($curl);

    $error = curl_error($curl);
    $httpcode = (int)curl_getinfo($curl, CURLINFO_HTTP_CODE);

    if ($httpcode >= 200 && $httpcode <= 299) {
        // success
    } else {
        // error
    }

The server return 200-OK code, I guess that I uploaded the feed content. I start to create a feed with the below code

    $response = $service->createFeed([
        'feedType' => 'POST_PRODUCT_DATA',
        'marketplaceIds' => ['ATVPDKIKX0DER'],
        'inputFeedDocumentId' => $feedDocumentId,
    ]);

I get the feedId: 105315018741

Then I wait so long, around 2 hours to see the new result "FATAL" of feed #105315018741, but there is no "resultFeedDocumentId" field on the response. I have no idea how to fix my feed content or to do next

I received this email

Hello again from Amazon Seller Support.

This is in regards to our earlier e-mail to you concerning a recent product purge and replace feed that would delete your entire online inventory. As we have not received any guidance from you regarding this feed, we have cancelled the feed within our system so that your subsequent feeds will process. I have included the details below:

Reference ID: 105315018741 Submitted Date: 2021-04-24 04:17:30 PST

If your true intent was to make the corrective actions that were within that feed, please resubmit the feed and notify us that you have done so and wish to have it process.

Thank you for selling with Amazon,

Sonia S. Amazon.com Seller Support

But it's not helpful for me to code. Please correct me if I'm wrong or missing something. Thankyou for your help!

github-actions[bot] commented 2 years ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

fazal26 commented 1 year ago

This issue is persistent, getting FATAL as ProcessingStatus, while If I query using MWS it is returning SUBMITTED,

any idea need to get this fixed asap since api is expiring in couple of days.