Closed balicekt closed 2 years ago
the setSellerOrderId
method (and any other setter method on a model class) just changes the value in the model -- it doesn't change anything on Amazon's end. The only operations that cause changes on Amazon are the API class methods.
OK @jlevers, thank you for answer it helped me. And can you just help me what API should I use? Because in OrdersApi are not any functions for this. So I guess to use feedsApi? Is that correct?
Thank you Tomas
Are you trying to set the merchant order ID? Because you can't change the Amazon order ID (which is in 3-7-7 format, e.g. 111-2222222-3333333
). For the merchant order ID, I believe you can do that through one of the feeds, yes.
Yes what I mean is change merchant order ID. Now trying to get information from SP-API Amazon support what Feed Type to use. For below operations.
1) upload invoice to order 2) set seller order ID 3) set consignment information to amazon order
I trying upload invoice with FeedType::POST_INVOICE_CONFIRMATION_DATA but getting below error:
"errors": [ { "code": "InvalidInput", "message": "Invalid request parameters", "details": "" } ] }
But there is problem that no details are presented in error message. So with no detail is very hard to find out what is wrong. Is this behaviour normal with Amazon SP-API?
Yeah, they often don't provide much detail. If you show your code, I might be able to tell you why you're getting the error.
Here is my code for invoice:
$apiInstance = new FeedsApi($this->getConfig());
$feedType = FeedType::POST_INVOICE_CONFIRMATION_DATA;
$createFeedDocSpec = new CreateFeedDocumentSpecification(['content_type' => $feedType['contentType']]);
$feedDocumentInfo = $apiInstance->createFeedDocument($createFeedDocSpec);
$docToUpload = new Document($feedDocumentInfo, $feedType);
$docToUpload->upload(file_get_contents(__DIR__.'/../../../www/temp/zz.pdf'));
$body = new CreateFeedSpecification();
$body->setFeedOptions(
[
"DocumentType" => "Invoice",
"InvoiceNumber" => "322000108",
"OrderId" => "302-6835795-7417162",
"TotalAmount" => 17.00,
"TotalVATAmount" => 2.71
]
);
$body->setFeedType('UPLOAD_VAT_INVOICE'); //when use UPLOAD_VAT_INVOICE I don't get error but no invoice shows in seller central in this order. When use: $body->setFeedType($feedType['name']); I get error I showed above
$body->setInputFeedDocumentId($feedDocumentInfo->getFeedDocumentId());
$body->setMarketplaceIds(self::MARKETPLACE_IDS);
$result = $apiInstance->createFeed($body);
I'm not sure UPLOAD_VAT_REQUEST
is a valid SP API report type -- it's not in the report type documentation anywhere. I recommend opening a support case with Amazon to ask them how to use that report with the SP API.
Yes I just did and they told me SP-API doesnt support upload invoiced yet. Only one way how to do is use MWS
Hi,
I found that is possible use $order->setSellerOrderId("xxx") when I use this function I think is not automatically posted to Amazon. What is necessary to call after use $order->setSellerOrderId("xxx") to get visible seller order Id on amazon website?
And is there also any function for set consignment? Or is necessary use Feed API?
Thank you for help.
Tomas