StatimRx Logistics API Ref
  1. Integration API
StatimRx Logistics API Ref
  • Integration API
    • account
      • workflows
        • Get Account Workflows
      • userfields
        • Get Account Order UserFields
    • import
      • mappings
        • Get the import mappings for the account.
      • Create a batch order import request from a file for order imports.
    • orders
      • return
        • Create a return order
      • from-template
        • Create a new order from a template
      • quote
        • Get a quote for an order
      • {orderId}
        • status
          • Get an order status
        • hold
          • Put an order on hold
        • charges
          • Add extra fees to an order
          • Update order extra fees
        • items
          • Get the items from an order
          • Add items to order
          • Update items of an order
          • Delete items from an order
        • trackeditemslog
          • Get the tracked items log from an order
        • barcodes
          • Update items barcodes
        • label
          • {templateId}
            • {format}
              • Download the labels for all items of an order
        • Update an order
        • Get an order
        • Cancel an order
      • search
        • {query}
          • Search for an order. Note: the POST /search endpoint should be favored over this one.
        • Search for orders.
      • items
        • Get the items from multiple orders
      • Create a new order
    • order-templates
      • search
        • Search for order templates.
    • routes
      • containers
        • Get containers
      • routes
        • Get routes
      • {routeId}
        • stop-sequence
          • Change the stops sequence of the route
        • convert-orders-to-ondemand
          • Convert to on-demand
        • move-orders-to-next-route
          • Move all orders of the route to the next scheduled route
        • move-orders
          • Move orders from a route to another
        • Update a route
        • Delete a route
        • Get route
      • Create a route
    • subscriptions
      • {subscriptionId}
        • Get a subscription
        • Modify an existing subscription
        • Unsubscribe from order updates
      • Get the subscriptions
      • Subscribe to order updates
    • userfields
      • {orderId}
        • items
          • Get the Order Item Userfields.
        • Get the Order Userfields
        • Update order Userfields
  1. Integration API

subscriptions

By using the ‘WebhookUrl’ field or the subscriptions, you can specify a callback URL to get an update when the order is updated status. If the ‘WebhookUrl’ is set when creating an order or if a subscription exists, the API will send an HTTP POST request to that URL with a JSON payload containing the OrderId when the order status is changed. The kind of event that was triggered will be passed in a header called "Event-Type" where possible events are:
order_created
order_dispatched
order_assigned
driver_arrived_at_pickup
driver_arrived_at_delivery
order_picked_up
proof_of_delivery_added
order_on_hold
order_released
order_scanned_at_checkpoint
pickup_time_window_updated
delivery_time_window_updated
driver_unassigned
items_added
items_updated
items_removed
order_delivered
order_cancelled
invoice_completed
invoice_cancelled
route_created
route_assigned_to_order
route_unassigned_from_order
driver_allocated_to_route
driver_deallocated_from_route
route_dispatched
route_status_changed
route_deleted
The following are examples of call-back content :
[OrderCreated]
Header: Event-Type: "order_created"
Body:
{
"OrderId": "CONTOSO123"
}
[OrderDispatchedToDriver]
Header: Event-Type: "order_dispatched"
Body:
{
"OrderId": "CONTOSO123",
"DriverId": "fe4bc3ab-ece3-4163-aced-13af016877fd"
"DriverNumber": "123"
"DriverName": "Ryan Gosling",
}
[OrderAcceptedByDriver]
Header: Event-Type: "order_assigned"
Body:
{
"OrderId": "CONTOSO123",
"DriverId": "fe4bc3ab-ece3-4163-aced-13af016877fd"
"DriverNumber": "123"
"DriverName": "Ryan Gosling",
}
[DriverArrivedAtPickup]
Header: Event-Type: "driver_arrived_at_pickup"
Body:
{
"OrderId": "CONTOSO123"
}
[OrderPickedUp]
Header: Event-Type: order_picked_up
Body:
{
"OrderId": "CONTOSO123"
}
[DriverUnassigned]
Header: Event-Type: driver_unassigned
Body:
{
"UnassignedDriverId": "fe4bc3ab-ece3-4163-aced-13af016877fd"
"UnassignedDriverNumber": "123"
"UnassignedDriverName ": "Ryan Gosling"
}
[DriverArrivedAtDelivery]
Header: Event-Type: "driver_arrived_at_delivery"
Body:
{
"OrderId": "CONTOSO123"
}
[OrderDelivered]
Header: Event-Type: "order_delivered"
Body:
{
"OrderId": "CONTOSO123",
"CustomerName": "Ron Pearlman"
}
[OrderReleased]
Header: Event-Type: "order_released"
Body:
{
"OrderId": "CONTOSO123"
}
[OrderPutOnHold]
Header: Event-Type: "order_on_hold"
Body:
{
"OrderId": "CONTOSO123",
"HoldReadon": "Nobodyhome",
"HoldReasonDescriptionEn": "No access to door",
"HoldReasonDescriptionFr": "Pas d'accès à la porte"
}
[OrderCancelled]
Header: Event-Type: "order_cancelled"
Body:
{
"OrderId": "CONTOSO123"
}
Modified at 2025-01-21 06:44:29
Previous
Create a route
Next
Get a subscription
Built with