Endpoint - Despatch

This endpoint is called in batch when users have shipped their orders from Linnworks.

The request may have the whole order with all it's lines or quantities or it may have lines and individual quantities depending how the customer is fulfilling the order.

Request

Post

DespatchRequest

Field NameTypeDescription
AuthorizationTokenStringAuthorization Token from the customers integration.
OrdersDespatchOrder[]Array of dispatches, note due to splitting / cancellation functionality in Linnworks you many not receive all items from the original order.

If a channel does not support line time or quantity despatch then it's suggested to mark as despatched on the first reference and ignore there after.

See DespatchOrder Table.

DespatchOrder

Field NameTypeDescription
ReferenceNumberStringUnique reference of the order.
ShippingVendorStringShipping Vendor / Carrier as defined by the customer in Linnworks
ShippingMethodStringLinnworks method name as defined by the customer in Linnworks
TrackingNumberStringTracking Number.
SecondaryTrackingNumbersString[]Additional Tracking numbers.
ProcessedOnDateTimeDate order was processed in UTC format.
Format: yyyy-MM-dd HH:mm:ssZ
ItemsDespatchItem[]Order items that are related to the Despatch.

If the customer has used split packaging in Linnworks the order items might appear multiple times in different groups where they might exist in different packages.

See Despatch Item table.

DespatchItem

Field NameTypeDescription
SKUStringChannel SKU from the order item.
OrderLineNumberStringUnique line number from the order item.
DespatchedQuantityStringQuantity despatched, due to splits this might be less than the original order and additional quantity may be provided later.

Sample

{
	"Orders": [
		{
			"ReferenceNumber": "12345",
			"ShippingVendor": "Royal Mail",
			"ShippingMethod": "First Class",
			"TrackingNumber": "TrackingNumber 1",
			"SecondaryTrackingNumbers": null,
			"ProcessedOn": "2016-08-29T07:49:51.5036339Z",
			"Items": [
				{
					"SKU": "SKU1234",
					"OrderLineNumber": "1",
					"DespatchedQuantity": 2
				},
				{
					"SKU": "SKU1235",
					"OrderLineNumber": "2",
					"DespatchedQuantity": 2
				}
			]
		}
	],
	"AuthorizationToken": "b7f4ee81bc4e4363adcd00eced0ea471"
}

Response

DespatchResponse

Field NameTypeDescription
ErrorStringIf there was an error with the request.
OrdersDespatchOrderResponse[]Array of orders and the results of the despatch.

If there are no errors it is still expected to return the reference with no error otherwise we assume the order was not found and do not confirm despatch back to the user.

See Despatch Order Response table.

DespatchOrderResponse

Field NameTypeDescription
ErrorStringIf there was an error with the individual order.
ReferenceNumber
Required
StringReference number of the order.
RetryBooleanIndicates if an individual order will be retried. Will retry up to a maximum of 10 times.

Sample

{
	"Error": null,
	"Orders": [
		{
			"Error": "Despatch failed for some reason",
			"ReferenceNumber": "12345"
		},
    {
			"Error": null,
			"ReferenceNumber": "12346"
		}
	]
}