Closed lai3221 closed 1 year ago
We are seeing this too.... is there a fix as the documentation doesn't mention anything other than ShipmentId and Marketplace ID. Is this a code or API issue?
hello guys it is a coding issue, the list of available PrepInstructions have been extended by Amazon, and it is missing from the code. Full list here https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-api-v0-reference#prepinstruction
@jlevers hi Jessy, what's the process to become a contributor - sorry couldn't find any docs? Because this is an easy fix and I could help ;-)
suggested fix https://github.com/jlevers/selling-partner-api/pull/446
I don't have an answer offhand as this project, i think, is partially done through an api generator. Rebuilding the way these enum values work would be nice as amazon seems likes to change them without warning. I don't think having them as an actual enum helps anything. Would be better for the api to be agnostic about it and let amazon pass back an error if we didn't pass a valid one.
@zoltansuto your PR is merged in v5.5.1
, so this issue should be resolved. I've also updated the JSON model that's used to generate the PrepInstruction.
@steverobison at this point this particular enum has caused so many problems that i agree, but changing from an enum to a string would be a breaking change, so I can't make that change until the next major version.
@steverobison @jlevers agree with you both, unfortunately I'm not surprised amazon is doing changes without warning :(
@jlevers may I ask where I can find the project that is genating the code? just curious :)
@steverobison @jlevers agree with you both, unfortunately I'm not surprised amazon is doing changes without warning :(
Yeah. SP-api is such an improvement over MWS but... amazon still does what amazon does.
@jlevers may I ask where I can find the project that is genating the code? just curious :)
I believe its https://openapi-generator.tech. I had noticed it in comments of the various api classes.
@zoltansuto it's a private repo, there are a few things getting generated/controlled out of a single repo so i can't really make it public unfortunately...but yes, it uses OpenAPI's generator under the hood
Sure, no problem. I understand
@jlevers It seems like Amazon recently added a new value ShipsInProductPackaging
value. I think this PR handles it. If so, please merge.
It throw "Invalid value for enum '\SellingPartnerApi\Model\FbaInboundV0\PrepInstruction', must be one of: 'Polybagging', 'BubbleWrapping', 'Taping', 'BlackShrinkWrapping', 'Labeling', 'HangGarment', 'SetCreation', 'Boxing', 'SuffocationStickering', 'SetStickering', 'RemoveFromHanger'.
see https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-api-v0-reference#prepinstruction.