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 Name

Type

Description

AuthorizationToken

String

Authorization Token from the customers integration.

Orders

DespatchOrder[]

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 Name

Type

Description

ReferenceNumber

String

Unique reference of the order.

ShippingVendor

String

Shipping Vendor / Carrier as defined by the customer in Linnworks

If not set will return "NONE"

ShippingMethod

String

Linnworks method name as defined by the customer in Linnworks

If not set will return "Default"

TrackingNumber

String

Tracking Number.

SecondaryTrackingNumbers

String[]

Additional Tracking numbers.

ProcessedOn

DateTime

Date order was processed in UTC format. Format: yyyy-MM-dd HH:mm:ssZ

Items

DespatchItem[]

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.

Packages

DespatchPacakges[]

Order packages with items grouped by tracking number and shipping method.

See Despatch Package Table

DespatchPackage

Field Name

Type

Description

ShippingVendor

String

Shipping Vendor / Carrier as defined by the customer in Linnworks

ShippingMethod

String

Linnworks method name as defined by the customer in Linnworks

TrackingNumber

String

Tracking Number.

Items

DespatchItem[]

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 Name

Type

Description

SKU

String

Channel SKU from the order item.

OrderLineNumber

String

Unique line number from the order item.

DespatchedQuantity

String

Quantity despatched, due to splits this might be less than the original order and additional quantity may be provided later.

SerialValues

SerialValueGroup[]

List of scanned serial numbers grouped to the individual despatch item quantity. If supplied.

See Serial Values table.

SerialValues

Field Name

Type

Description

CorrelationId

int

A contextual identifier representing the position of a quantity within an order line item. This ID is used to associate individual quantity entries with their respective positions in the order's item structure.

SerialValue

SerialValue[]

List of scanned serial numbers relating to the individual despatch item quantity.

See Serial Value table.

SerialValue

Field Name

Type

Description

Type

string

The serial value type.

Current values include "AMZNTRANS", "SERIAL", "IMEI". More may be added later.

Value

string

The serial value.

Sample

{
  "Orders": 
  [
    {
      "ReferenceNumber": "12345",
      "ShippingVendor": "Royal Mail",
      "ShippingMethod": "First Class",
      "TrackingNumber": "TrackingNumber 1",
      "SecondaryTrackingNumbers": 
      [
        "AnotherTracking"
      ],
      "ProcessedOn": "2016-08-29T07:49:51.5036339Z",
      "Items": 
      [
        {
          "SKU": "SKU1234",
          "OrderLineNumber": "1",
          "DespatchedQuantity": 2
        },
        {
          "SKU": "SKU1235",
          "OrderLineNumber": "2",
          "DespatchedQuantity": 2
        }
      ],
      "Packages": 
      [
       {
         "ShippingVendor": "Royal Mail",
         "ShippingMethod": "First Class",
         "TrackingNumber": "TrackingNumber 1",
         "Items": 
         [
          {
           "SKU": "SKU1234",
           "OrderLineNumber": "1",
           "DespatchedQuantity": 2,
           "SerialValues": 
           [
            {
             "CorrelationId": 1,
             "SerialValue": 
             [
              {
               "Type": "IMEI",
               "Value": "1234352"
              },
              {
               "Type": "Serial",
               "Value": "687987989799"
              }
             ]
            }
           ]
           },
          {
           "SKU": "SKU1235",
           "OrderLineNumber": "2",
           "DespatchedQuantity": 2
           }
          ]}
    ]}
  ],
  "AuthorizationToken": "b7f4ee81bc4e4363adcd00eced0ea471"
}

Response

DespatchResponse

Field Name

Type

Description

Error

String

If there was an error with the request.

Orders

DespatchOrderResponse[]

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 Name

Type

Description

Error

String

If there was an error with the individual order.

ReferenceNumber Required

String

Reference number of the order.

Retry

Boolean

Indicates 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"
		}
	]
}