Amazon-SP-API-CSharp
Amazon-SP-API-CSharp copied to clipboard
Can you also include the Shipping API V2 support in this project?
Amazon Logistics has shipping api v2 created outside of SP-API. SP-API has V1 support for shipping API. Can you also include support for Shipping API V2 in this project? Below URL contains the model for v2.
https://developer-docs.amazon.com/amazon-shipping/docs/shipping-api-v2-model
I second this! @IamGanesh19 , how do you determine which model to pull/use in your code? We are generating C# code using swagger codegen and we're trying to figure out how to determine which version to use, and how to tell if there have been updates.
I second this! @IamGanesh19 , how do you determine which model to pull/use in your code? We are generating C# code using swagger codegen and we're trying to figure out how to determine which version to use, and how to tell if there have been updates.
Yep, that is a challenge. Not sure how to handle it. For now I have created a pull request to support this by adding V2 models & Services.
More work still needed here
Will be needing this in the new year, happy to help once have got our products live.
I ended up generating an API for each version, and I reference the version that I want to use in my code. I used OpenAPI Generator to generate the C# code with package names that include the version.
@IamGanesh19 almost finish this and its should be ready for test now i will do some change to make not need to take parameter from amazon connection
@TechyChap take look to the work and see how we can improve it
In Model for the ShippingV2 need some improvements. In "RequestedDocumentSpecification" class, datatype of the attribute Format, NeedFileJoining, RequestedDocumentTypes should change.
Please change this so we can create valid request.
@IamGanesh19 please check here
Shipping V2 doesn't work when trying to purchase shipment. Dpi so optional but if you don't provide it in the RequestedDocumentSpecification then you get the reply: Amazon_ Shipping doesn't support requested DPI null. Currently, supported dpi : [300, 203] However you are unable to enter the DPI, I believe this should be an integer value but the DPI has been put in as a class with no properties and no constructor to actually set the DPI. Due to this the purchaseShipment call is unusable.
@StuartGarnham thanks for finding this, I have modified the model can you please pull the latest code and check if it works?
It is not working for me. It just returns "Invalid Input" when I make a call to ShippingV2.PurchaseShipmentAsnyc.
`var request = new PurchaseShipmentRequest() { RequestToken = requestToken, RateId = rateId, RequestedDocumentSpecification = new RequestedDocumentSpecification { Format = DocumentFormat.PNG, Dpi = 300, PageLayout = "LEFT", Size = new DocumentSize { Length = 6, Width = 4, Unit = "INCH" }, NeedFileJoining = "false", RequestedDocumentTypes = new List<DocumentType> { DocumentType.LABEL } } };
return await _sellingPartnerAPI.PurchaseShipment(request, brand);`
I get this response: An invalid documentation specification was provided. Please provide a documentation specification based on the GetRates response.
Do you still facing same issue ?
I've updated to the latest nuget package and I'm no longer having problems.