Knowledge Base   /   HOWTO

The Multi-Warehouse Box Shipment API

Posted on 01 July 2022 05:29 pm

The Multi-Warehouse Box Shipment API

Curl invocation:

curl -X PUT -H 'Content-Type: application/json' 'https://apiuser:apipassword@yourdomain.cannonwms.com/api/v1/pack' -d @packshape.json
This is the datashape that lives in @packshape.json
{
"shipto": {
  "address_1": "1163 E 50 S",
  "address_2": "",
  "address_3": "",
  "city": "Newark",
  "state": "NJ",
  "zip": "07004",
  "country": "US"
},
"lineitems": [
  {
    "sku": "70RND-010124",
    "qty": "22"
  },
  {
    "sku": "108RD-010101",
    "qty": "31"
  },
  {
    "sku": "108RD-010115",
    "qty": 10
  }
]
}

Should result in:

  • The ID of the ship from warehouse
    • The shipfrom address of each box
    • Weight for each box is in ounces
  • Each box shows the box contents
  • If Items are backordered, they will appear in a separate line inidication as such
{
    "2": [
        {
            "shipfrom": {
                "name": "Miva Test",
                "company": "Miva Test",
                "street1": "2020 Mockingbird Ln.",
                "street2": false,
                "city": "Rogers",
                "state": "AR",
                "zip": "72756",
                "country": "US",
                "phone": "1232452432",
                "email": "contact@gmail.com"
            },
            "weight": 2176,
            "box_id": "12",
            "contents": [
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124"
            ]
        }
    ],
    "3": {
        "1": {
            "shipfrom": {
                "name": "Testing abc",
                "company": "Testing abc",
                "street1": "1234 Test",
                "street2": ";",
                "city": "Logan",
                "state": "UT",
                "zip": "84321",
                "country": "US",
                "phone": "1234323423",
                "email": "customerservice@otherwarehouse.com"
            },
            "weight": 14960,
            "box_id": "12",
            "contents": [
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010101",
                "108RD-010115",
                "108RD-010115",
                "108RD-010115",
                "108RD-010115",
                "108RD-010115",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124",
                "70RND-010124"
            ]
        },
        "2": {
              "shipfrom": {
                "name": "Testing abc",
                "company": "Testing abc",
                "street1": "1234 Test",
                "street2": ";",
                "city": "Logan",
                "state": "UT",
                "zip": "84321",
                "country": "US",
                "phone": "1234323423",
                "email": "customerservice@otherwarehouse.com"
            },
"weight": 15640, "box_id": "12", "contents": [ "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010101", "108RD-010115", "108RD-010115", "108RD-010115", "108RD-010115", "108RD-010115" ] } }, "backorder": { "70RND-010124": 4 } }