Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with CreateInboundShipmentPlan #97

Open
fccardiff opened this issue Nov 9, 2017 · 0 comments
Open

Issues with CreateInboundShipmentPlan #97

fccardiff opened this issue Nov 9, 2017 · 0 comments

Comments

@fccardiff
Copy link

fccardiff commented Nov 9, 2017

Hi there,

I'm seeming to have some bugs with CreateInboundShipmentPlan. I believe it's an API-related bug so I'd be happy to collaborate a bit and get a fix for this one.

My request looks like:

mws.FulfillmentInboundShipment.CreateInboundShipmentPlan({
            InboundShipmentPlanRequestItems: items,
            LabelPrepPreference: "SELLER_LABEL",
            ShipFromAddressLine1: address.AddressLine1,
            ShipFromCity: address.City,
            ShipFromCountryCode: address.CountryCode,
            ShipFromName: address.Name,
            ShipFromPostalCode: address.PostalCode,
            ShipFromStateOrProvince: address.StateOrProvinceCode,
            ShipToCountryCode: "US"
        }).then(({
            result,
            metadata
        }) => {
           // ... etc

None of the address items are null; I've triple checked on that end.

Items is formatted like the following, which should be correct according to the API:

[{"SellerSKU":"(whatever SKU)","Quantity":"15","Condition":"NewItem","ASIN":"(whatever ASIN)"}]

On the module, the code looks like the following. I did modify this method a bit; "params" was "parms" prior, which I believe was a typo. Also, a few variables were left out, so I decided to add those in. Unfortunately though, I'm still getting a invalid request error from MWS and I'm not exactly sure where it is.

Thanks so much for any help you can provide! I'd be happy to send a donation for your time. Additionally, I have fixes for a couple of methods in the API - I'd be happy to provide them in this comment if needed!

CreateInboundShipmentPlan: {

        params: {
            LabelPrepPreference: {
                required
            },
            ShipFromName: {
                name: 'ShipFromAddress.Name',
                required
            },
            ShipFromAddressLine1: {
                name: 'ShipFromAddress.AddressLine1',
                required
            },
            ShipFromCity: {
                name: 'ShipFromAddress.City',
                required
            },
            ShipFromStateOrProvince: {
                name: 'ShipFromAddress.StateOrProvinceCode',
                required
            },
            ShipFromPostalCode: {
                name: 'ShipFromAddress.PostalCode',
                required
            },
            ShipFromCountryCode: {
                name: 'ShipFromAddress.CountryCode',
                required
            },
            ShipFromAddressLine2: {
                name: 'ShipFromAddress.AddressLine2'
            },
            ShipFromDistrictOrCounty: {
                name: 'ShipFromAddress.DistrictOrCounty'
            },
            ShipToCountryCode: {
                required
            },
            InboundShipmentPlanRequestItems: {
                type: Type.COMPLEX,
                required,
                construct: complex.InboundShipmentPlanRequestItems
            }
        }
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant