Endpoint - Cancel

Endpoint which is called with details of an order cancellation within linnworks.

This endpoint is used when the customer cancels an open order in Linnworks.net.

Request

Post

OrderCancelRequest

Field NameTypeDescription
AuthorizationTokenStringAuthorization Token from the customers integration.
CancellationOrderCancellationInformation about the order/items to cancel. See OrderCancellation

OrderCancellation

Field NameTypeDescription
ItemsOrderCancellationItemA collection of order items to cancel on the marketplace. See OrderCancellationItem
ReferenceNumberStringThe order reference number within Linnworks.
ExternalReferenceStringThe external reference number within Linnworks. This is usually the marketplace reference.

OrderCancellationItem

Field NameTypeDescription
SKUStringThe unique Linnworks SKU of the item.
OrderLineNumberStringThe order item number for this item. This is usually the marketplace ID for the order item.
CancellationQuantityIntegerThe quantity of this item to submit for cancellation.
ReasonStringIf the marketplace supports tag-based refund reasons, this field will contain the selected tag. Otherwise, it will include the freetext reason submitted by the customer.
SecondaryReasonStringIf the marketplace supports tag-based refund reasons, this field will contain the selected sub-tag.

Sample

{
  "AuthorizationToken": "0dfdbaf3e4d5434f825e774e31bcc148",
  "Cancellation": {
    "ReferenceNumber": "XYZ-1",
    "ExternalReference": "EXT-XYZ-1",
    "Items": [
      {
        "OrderLineNumber": "010045",
        "SKU": "ITEM-001",
        "CancellationQuantity": 1,
        "Reason": "Mistake",
        "SecondaryReason": ""
      }
    ]
  }
}

Response

OrderCancelResponse

Field NameTypeDescription
ErrorStringDefines if there was an error with the request and returns it.

Sample

{
  "Error": ""
}
{
  "Error": "Could not process cancellation."
}