UPDATE: Q2 Updates for API and Webhooks (Part 2)

Hello Heroes,

This is long overdue, but it is finally here. We’ve been working on many updates simultaneously, and they are all here now. Feel free to check our other updates:

Q3 Updates
Q4 Updates

INVENTORY SNAPSHOT

We added the non-sellable total quantity to the warehouse_product and the non_sellable flag to each location. This is how each product entry should look now:

        "test-inventory-webhook":
        {
            "sku": "test-inventory-webhook",
            "account_id": "QWNjb3VudDo2Mzg5OA==",
            "vendors":
            {
                "VmVuZG9yOjQyMzA0OA==":
                {
                    "vendor_id": "VmVuZG9yOjQyMzA0OA==",
                    "vendor_name": "Tomas Ferrin Depaoli",
                    "vendor_sku": ""
                }
            },
            "warehouse_products":
            {
                "V2FyZWhvdXNlOjc2NzMz":
                {
                    "warehouse_id": "V2FyZWhvdXNlOjc2NzMz",
                    "on_hand": 1473,
                    "allocated": 20,
                    "backorder": 0,
                    "available": 178,
                    "non_sellable": 1250,
                    "item_bins":
                    {
                        "QmluOjQyOTkzMDg=":
                        {
                            "location_id": "QmluOjQyOTkzMDg=",
                            "location_name": "unassigned",
                            "lot_id": "",
                            "lot_name": "",
                            "expiration_date": "",
                            "sellable": true,
                            "quantity": 90
                        },
                        "QmluOjUwMzk1Nzk=":
                        {
                            "location_id": "QmluOjUwMzk1Nzk=",
                            "location_name": "Receiving",
                            "lot_id": "",
                            "lot_name": "",
                            "expiration_date": "",
                            "sellable": true,
                            "quantity": 75
                        },
                        "QmluOjUxNzUxNzA=":
                        {
                            "location_id": "QmluOjUxNzUxNzA=",
                            "location_name": "test-webhook-NP-S",
                            "lot_id": "",
                            "lot_name": "",
                            "expiration_date": "",
                            "sellable": true,
                            "quantity": 58
                        },
                        "QmluOjUxNzUxNzI=":
                        {
                            "location_id": "QmluOjUxNzUxNzI=",
                            "location_name": "test-webhook-NP-NS",
                            "lot_id": "",
                            "lot_name": "",
                            "expiration_date": "",
                            "sellable": false,
                            "quantity": 1250
                        }
                    }
                }
            }
        }

PRODUCT CASE BARCODES

You can now create product case barcodes from the Public API using the product_update mutation:

mutation{
  product_update(data:{
    sku:"test-inventory-webhook"
    cases:[{case_barcode:"dozen" case_quantity:12}{case_barcode:"half-dozen" case_quantity: 6}]
  }){
    request_id
    product{
      cases{
        case_barcode
        case_quantity
      }
    }
  }
}

SKU FILTER IN LOCATIONS QUERY

The locations query can now be filtered by SKU, this will allow you to retrieve all locations a product exists in.

query{
  locations(sku:"test-inventory-webhook"){
    data{
      edges{
        node{
          id
          legacy_id
          name
        }
      }
    }
  }
}

Example response:

{
  "data": {
    "locations": {
      "data": {
        "edges": [
          {
            "node": {
              "id": "QmluOjUwMzk1Nzk=",
              "legacy_id": 5039579,
              "name": "Receiving"
            }
          },
          {
            "node": {
              "id": "QmluOjUxNzUxNzI=",
              "legacy_id": 5175172,
              "name": "test-webhook-NP-NS"
            }
          },
          {
            "node": {
              "id": "QmluOjUxNzUxNzA=",
              "legacy_id": 5175170,
              "name": "test-webhook-NP-S"
            }
          },
          {
            "node": {
              "id": "QmluOjQyOTkzMDg=",
              "legacy_id": 4299308,
              "name": "unassigned"
            }
          }
        ]
      }
    }
  },
  "extensions": {
    "throttling": {
      "estimated_complexity": 101,
      "cost": 5,
      "cost_detail": {
        "locations": {
          "items_count": 4,
          "cost": 1,
          "total_cost": 5,
          "fields": {}
        }
      },
      "user_quota": {
        "credits_remaining": 1997,
        "max_available": 2002,
        "increment_rate": 30
      }
    }
  }
}

TOTE_CLEARED Webhook

We added the tote_uuid, which was already present in our TOTE_CLEARED webhook

{
    "webhook_type": "Tote Cleared",
    "tote_id": "503901000",
    "tote_name": "Red-XS",
    "tote_uuid": "VG90ZToxOTk3ODgzMQ==",
    "reason": "manual",
    "items": [
        {
            "order_id": 297935260,
            "line_item_id": 766657141,
            "pick_id": 0,
            "sku": "test-force-pick"
        }
    ]
}