A customer/reseller can select one or all of the events listed above under one webhook or can create individual webhook for each event. The primary reason to create multiple webhooks would be to have a dedicated destination URL for each event for processing. It is not required to do so and is recommended to have a single webhook for a resource type, for example a webhook for orders and in future you may have a dedicated webhook for quotes.

 

Notification Event Event code Sub-event code Description
Shipped im::updated im::order_shipped (v2) Status for a line item was under this order was marked “Shipped”
Invoiced im::updated im::order_invoiced (v2) Status for a line item was under this order was marked “Invoiced”
On Hold im::updated im::order_hold (v2) Status for a line item was under this order was marked “Hold”
The order can be on hold for various reasons
Voided im::updated im::order_voided (v2) The order was canceled or voided
Backorder im::updated im::order_backordered (v2) The order was on backorder

 

Sample JSON payload


{
  "topic": "resellers/orders",
  "event": "im::updated",
  "evenTtimeStamp":"event_occured" --- UTC
  "eventId":"unique_event_id"
  "resource":[ //array         
    {
      "eventType":"im::order_shipped",
      "orderNumber": "20-RD128",
      "customerOrderNumber": "ZENPO",
      "orderEntryTimeStamp": "2020-04-03T08:54:39-07:00",
      "lines":[{
          "lineNumber":"01",
          "subOrderNumber":"20-RD128-21",
          "lineStatus": "IM::shipped",   -- use the proposed order status from this page - https://imonline.atlassian.net/wiki/spaces/B2BP/pages/772538423/Order+Status+Management
          "ingramPartNumber": "5CX895",
          "vendorPartNumber": "TC57HO-1PEZU4P-NA",
          "requestedQuantity": "3",
          "shippedQuantity": "2",   
          "backOrderedQuantity": "1",
          "shipmentDetails": [
            {
              "shipmentDate": "2019-11-06",
              "shipFromWarehouseId": "10",
              "warehouseName": "New York",
              "carrierCode": "4M",
              "carrierName": "SMARTPOST-BM",                  
              "packageDetails":[ --Array
              {
                  "cartonNumber":"",
                  "quantityInbox":"",
                  "trackingNumber":"",
                } ]
              }
            ], //shipmentdetails end
            "serialNumberDetails":[{
                "serialNumber":"123123123"
              }
              ],
          }
        ] // lines end
        "links":[. //array
          { 
            "topic":"orders",
            "href":"/resellers/v5/orders/20-RD128",
            "type": "GET"
          },
          { 
            "topic":"invoices",  -- shows only if the status is invoiced
            "href":"/resellers/v5/invoices/20-RD128",
            "type": "GET"
          },
        ]
      },
    ] // resource end
}