Dispatch API

Overview

This document outlines the purpose, technology, use cases, methods, objects and examples for using the Dispatch API.

This document focuses on the SOAP interface to this API.

Purpose

The Dispatch API provides programmatic access to the dispatch database and allows for progressing orders through the dispatch process.

The Dispatch API exposes two primary native interfaces via .NET and SOAP.

Dispatch API Definition (.NET)

Full documentation for this interface is available in the API Reference.

Dispatch API Definition (SOAP)

This section documents the SOAP interface to the API.

Endpoint

The SOAP API endpoint for any site is located at https://[siteurl]/global/api/Dispatch.asmx

This endpoint is enabled for access via SOAP as well as HTTP GET and POST. The Service Description is also available directly via this endpoint.

Note: For systems with satellite sites, the API will be available only under the primary site URL.

Security (SOAP Interface Only)

The Dispatch API via SOAP uses the Permissions System to allow and deny access to users. Use of the API requires a user to be granted the various actions (under iSAMS / API / Dispatch) to be able to authenticate and perform the various actions available under this API.

Error Handling

Error handling is primarily left to the caller. Any methods that return an ApiResponse object will provide additional details that can be used to assist when debugging problems.

Where a "Call Identifier" is returned in the Message field of the ApiResponse, then a full exception trace will be available from http://[siteurl]/logs/api/{Call Identifier}.txt

Methods

Available methods are listed below.

Objects

Available objects are listed below.

Examples

Dispatch API usage examples are available. These examples demonstrate the use of the API via a SOAP interface and are available in C# and Java.

Methods

AllocateBarcode

Allocate one unit to the oldest OrderItem with specified barcode. If there's no item with the specified barcode assigned, a historic barcode search will be performed in case the barcode on the item has changed.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
barcode String(20) Unique barcode or APN of the OrderItem to allocate.
Response

Returns an ApiResponse indicating the outcome of the call.

AllocateOrderItem

Allocate specified quantity to specified OrderItem.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderItemID Integer Unique identifier of the OrderItem to allocate.
quantity Integer The unit to allocate to the OrderItem.
Response

Returns an ApiResponse indicating the outcome of the call.

AssignOrder

Assign the specified Order to the specified DispatchPoint

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderID Integer Unique identifier of the Order to assign.
Response

Returns an ApiResponse indicating the outcome of the call.

Authenticate

See Authenticate.

Collected

Perform collection of a click and collect Order progressing the order to "Complete" status.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
orderID Integer Unique identifier of the Order that is being collected.
orderCollectionData OrderCollectionData OrderCollectionData to upload against the Order.
Response

Returns an ApiResponse indicating the outcome of the call.

ConfirmOrderAllocation

Confirms all allocations made to specified Order and progresses Order to "Pending Payment Processing" status.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderID Integer Unique identifier of the Order to confirm.
Use zero (0) to confirm all applicable Orders in specified DispatchPoint.
Response

Returns an ApiResponse indicating the outcome of the call.

ListAvailableWebsites

See ListAvailableWebsites.

ListDispatchPoints

List all available DispatchPoints.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
Response

Returns a DispatchPointApiResponse indicating the outcome of the call. If successful, it contains the list of DispatchPoints.

ListOrderItemsAllocations

List all OrderItems with allocations (partially or fully) for all Orders at "In Progress" status in the specified DispatchPoint.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Leave blank to list for all applicable DispatchPoints.
Response

Returns an IntegerArrayApiResponse indicating the outcome of the call. If successful, it contains the list of OrderItem IDs.

ListOrderItemsPendingAllocation

List all OrderItems with pending allocations for all Orders at "In Progress" status in the specified DispatchPoint.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Leave blank to list for all applicable DispatchPoints.
Response

Returns an IntegerArrayApiResponse indicating the outcome of the call. If successful, it contains the list of OrderItem IDs.

ListOrders

List all Orders currently in progress in the specified DispatchPoint.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Leave blank to list for all Orders without a DispatchPoint assignment.
Response

Returns an IntegerArrayApiResponse indicating the outcome of the call. If successful, it contains the list of Order IDs.

ListOrdersAllocated

List all Orders with all OrderItems fully allocated (ready for confirmation and payment capture) in the specified DispatchPoint.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Leave blank to list for all applicable DispatchPoints.
Response

Returns an IntegerArrayApiResponse indicating the outcome of the call. If successful, it contains the list of Order IDs.

ListOrdersToPrint

List all Orders with successful payment capture and are ready for invoice printing in the specified DispatchPoint.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Leave blank to list for all applicable DispatchPoints.
Response

Returns an IntegerArrayApiResponse indicating the outcome of the call. If successful, it contains the list of Order IDs.

ListOrdersToShip

List all Orders with invoice printed and are ready for shipping in the specified DispatchPoint.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Leave blank to list for all applicable DispatchPoints.
Response

Returns an IntegerArrayApiResponse indicating the outcome of the call. If successful, it contains the list of Order IDs.

PrintOrder

Prints the invoice for the specified Order and progresses Order to "Ready To Ship" status.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderID Integer Unique identifier of the Order to confirm.
Use zero (0) to print all applicable Orders in specified DispatchPoint.
Response

Returns an ApiResponse indicating the outcome of the call.

ReadyToCollect

Progress an Order to the "ReceivedInStore" status.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
orderID Integer Unique identifier of the Order to progress.
Response

Returns an NVPApiResponse indicating the outcome of the call.

RetrieveDispatchPoint

Retrieve a DispatchPoint for the specified dispatch point name.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
Response

Returns a DispatchPointApiResponse indicating the outcome of the call. If successful, it contains the a single item of DispatchPoint.

ReverseAllocateOrderItem

Reverse allocate the specified quantity from the specified OrderItem.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderItemID Integer Unique identifier of the OrderItem to reverse allocate.
quantity Integer The unit to reverse allocate from the OrderItem.
Response

Returns an ApiResponse indicating the outcome of the call.

ShipOrder

Ships and uploads the specified shipping reference against the specified Order, and progresses Order to the "Completed" status.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderID Integer Unique identifier of the Order to ship.
shippingReference String(50) Courier ticket reference to upload against the Order.
sendDispatchEmail Boolean Indicate if a dispatch email should be triggered to notify customer that the Order is shipped.
Response

Returns an ApiResponse indicating the outcome of the call.

ShipMultiParcelOrder

Ships and uploads the specified shipping references against the specified Order, and progresses Order to the "Completed" status.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderID Integer Unique identifier of the Order to ship.
shippingReference String(50)[] Courier ticket references to upload against the Order.
sendDispatchEmail Boolean Indicate if a dispatch email should be triggered to notify customer that the Order is shipped.
Response

Returns an ApiResponse indicating the outcome of the call.

ShipTrackedOrder

Ships and uploads the specified tracking details against the specified Order, and progresses Order to the "Completed" status for delivery orders or the "ShippedToStore" status for click and collect orders.

Parameters
Name Type Description
authenticationToken String(50) Authentication token to use for this call.
dispatchPointName String(50) Unique identifying name of the DispatchPoint to execute this call.
orderID Integer Unique identifier of the Order to ship.
trackingDetails TrackingDetail[] Array of TrackingDetail to upload against the Order.
sendDispatchEmail Boolean Indicate if a dispatch email should be triggered to notify customer that the Order is shipped.
Response

Returns an ApiResponse indicating the outcome of the call.

Objects

ApiResponse

See ApiResponse.

DispatchPoint

Represents a dispatch point.

Fields/Properties
Field Name Type Description Notes
Code String(10) The dispatch point unique identifier.
Name String(50) The dispatch point name.
Active Boolean Indicates if the dispatch point is still in use.

DispatchPointApiResponse

Contains basic information about the result of a method call, along with an array of DispatchPoint objects.

Fields/Properties
Field NameTypeDescriptionNotes
SuccessBooleanIndicates the success or failure of an API method call.A failure (false) response should contain a failure Code and Message in the respective fields.
CodeIntegerA response code for the method call.
MessageStringMessage or output from the method call.
DataDispatchPoint[]Array of DispatchPoint objects returned from the method call.

TrackingDetail

Contains tracking information about the order.

Fields/Properties
Field NameTypeDescription
TrackingReference String(50) Courier ticket reference to upload against the trackingDetail Object.
CarrierName String(50) Carrier Name to upload against the trackingDetail Object.
TrackingURL String(200) Tracking URL to upload against the trackingDetail Object.

OrderCollectionData

Contains details about the collection of a click and collect order.

Fields/Properties
Field NameTypeDescription
OrderPersonCollected Boolean Flag indicating whether the order person collected the order (true) or another person collected the order on their behalf (false).
OrderPersonComment String(1024) Any comments or notes from the order person.
StaffPin String(32) PIN number of the staff member performing the collection.
CollectionPersonFirstName String(50) The first name of the person who collected the order if this was not the order person.
CollectionPersonLastName String(50) The last name of the person who collected the order if this was not the order person.
CollectionPersonPhone String(50) The phone number of the person who collected the order if this was not the order person.
CollectionPersonComment String(1024) Any comments or notes from the collection person.

NVPApiResponse

See NVPApiResponse.

Appendices

Response Codes

The Dispatch API returns standard API response codes.