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

BadRequest from Shipping API #81

Open
rcholic opened this issue Dec 30, 2020 · 0 comments
Open

BadRequest from Shipping API #81

rcholic opened this issue Dec 30, 2020 · 0 comments

Comments

@rcholic
Copy link

rcholic commented Dec 30, 2020

I realized this question has been asked in another thread from 2016, but my issue seems different, because I am POSTing JSON to the Ship Order API. I compared my JSON and the examples in the API doc, and their structure and data types look identical.

When I post my JSON, I got error code 400 for BadRequest. Can anyone help me spot where could be wrong?

My JSON:

{
  "orderShipment": {
    "orderLines": {
      "orderLine": [
        {
          "lineNumber": "1",
          "sellerOrderId": "23211",
          "orderLineStatuses": {
            "orderLineStatus": [
              {
                "status": "Shipped",
                "statusQuantity": {
                  "unitOfMeasurement": "EACH",
                  "amount": "1"
                },
                "trackingInfo": {
                  "shipDateTime": 637449042980494000,
                  "carrierName": {
                    "otherCarrier": null,
                    "carrier": "USPS"
                  },
                  "methodCode": "Express",
                  "trackingNumber": "940010920556823783126",
                  "trackingURL": "https://www.walmart.com/tracking?tracking_id=940010920556823783126&order_id=38073367771"
                },
                "returnCenterAddress": {
                  "name": "Test1",
                  "address1": "Walmart Warehouse 1",
                  "address2": null,
                  "city": "Redmond",
                  "state": "WA",
                  "postalCode": "98052",
                  "country": "USA",
                  "emailId": "[email protected]",
                  "dayPhone": "123456789"
                }
              }
            ]
          }
        }
      ]
    }
  }
}

The JSON in the Walmart Marketplace API doc:

{
  "orderShipment": {
    "orderLines": {
      "orderLine": [
        {
          "lineNumber": "1",
          "sellerOrderId": "92344",
          "orderLineStatuses": {
            "orderLineStatus": [
              {
                "status": "Shipped",
                "statusQuantity": {
                  "unitOfMeasurement": "EACH",
                  "amount": "1"
                },
                "trackingInfo": {
                  "shipDateTime": 1580821866000,
                  "carrierName": {
                    "otherCarrier": null,
                    "carrier": "UPS"
                  },
                  "methodCode": "Standard",
                  "trackingNumber": "22344",
                  "trackingURL": "http://walmart/tracking/ups?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92345"
                },
                "returnCenterAddress": {
                  "name": "walmart",
                  "address1": "walmart store 2",
                  "address2": null,
                  "city": "Huntsville",
                  "state": "AL",
                  "postalCode": "35805",
                  "country": "USA",
                  "dayPhone": "12344",
                  "emailId": "[email protected]"
                }
              }
            ]
          }
        }
      ]
    }
  }
}
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