Name | Type | Description |
---|---|---|
pkOrderId | Guid | The order id |
exchangeItems | List<RowQty> | A list of items to be exchanged, including quantity, scrap, refund, etc. |
despatchLocation | Guid | The id of the location to despatch replacement items from |
returnLocation | Guid | The id of the location to return stock to |
channelReason | String | Channel reason - required if a refund on the channel is required |
channelSubReason | String | Channel subreason - required if a refund on the channel is required. |
category | String | The refund category |
reason | String | The reason for the reason |
isBooking | Boolean | True if it is a exchange booking, False if it is a new exchange |
ignoredValidation | Boolean | True if failed validation has been ignored (see IsRefundValid). Otherwise, false. When set to true, refunds will not be automatically actioned on the channel. Ignored if creating a booking as a refund is not created at this stage. |
The following request format is required for this method.
POST https://eu-ext.linnworks.net/api/ProcessedOrders/CreateExchange
Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE
This is an example of the request structure. Results will vary depending on your data.
pkOrderId=b98b3aeb-cd18-4ef5-85ad-1463fe018280&exchangeItems=[
{
"OrderItemRowId": "66ccdbe9-8398-4632-bec5-cc03474a9670",
"OrderItemBatchId": 1,
"Refund": 2.1,
"Qty": 3,
"ScrapQty": 1,
"Batch": {
"OrderItemBatchId": 1,
"OrderItemRowId": "c8ded7d7-d7ad-4d09-846a-3d95690733f3",
"BatchInventoryId": 3,
"Quantity": 4,
"Batch": {
"BatchId": 1,
"SKU": "sample string 2",
"InventoryTrackingType": 3,
"StockItemId": "5525a480-83aa-48dc-ba0f-3081d7562927",
"BatchNumber": "sample string 5",
"ExpiresOn": "2022-03-09T13:04:02.4339835+00:00",
"SellBy": "2022-03-09T13:04:02.4339835+00:00",
"Inventory": [
{
"BatchInventoryId": 1,
"BatchId": 2,
"StockLocationId": "d8c908c3-1cc9-4a4c-ade3-2afd36165929",
"BinRack": "sample string 4",
"PrioritySequence": 5,
"Quantity": 6,
"StockValue": 7.0,
"StartQuantity": 8,
"PickedQuantity": 9,
"BatchStatus": "Available",
"IsDeleted": true,
"WarehouseBinrackStandardType": 1,
"WarehouseBinrackTypeName": "sample string 12",
"InTransfer": 1,
"BinRackId": 1,
"WarehouseBinrackTypeId": 1
}
],
"IsDeleted": true
},
"DespatchUnitValue": 0.0,
"AssignmentType": 0
},
"AdditionalCost": 4.1,
"NewStockItemId": "09088f3a-5acd-41e7-a5e7-9f0c17e1a597",
"NewQty": 5
}
]&despatchLocation=19131fd9-0745-4171-9a8f-53aaf7dc6358&returnLocation=1c9b46ad-00b2-4dcd-9b7a-9447891242e4&channelReason=sample string 1&channelSubReason=sample string 1&category=sample string 1&reason=sample string 1&isBooking=true&ignoredValidation=true
This is an example of the response JSON. Results will vary depending on your data.
[
{
"pkReturnId": 1,
"RowType": 0,
"ReturnReference": "sample string 2",
"fkOrderId": "d770d386-5bcf-47b2-be89-81201197f9f6",
"fkOrderItemRowId": "ec24cba3-32dc-4797-95e2-6979487dda7d",
"OrderItemBatchId": 5,
"nOrderId": 6,
"SKU": "sample string 7",
"ItemTitle": "sample string 8",
"BatchNumber": "sample string 9",
"Reason": "sample string 10",
"ChannelReason": "sample string 11",
"ChannelReasonSec": "sample string 12",
"Category": "sample string 13",
"ReturnQty": 14,
"fkReturnLocationId": "e4cf0c66-ab24-4aa3-b28e-9e7af9bebd8d",
"Scrapped": true,
"ScrapQty": 1,
"LastState": "sample string 16",
"LastDate": "2022-03-09T13:04:12.3167061+00:00",
"Completed": true,
"fkNewOrderId": "8e8dc9a7-0c0c-4f9b-b0cf-713657bae2d4",
"fkNewOrderItemRowId": "c054c855-045f-4d56-89d7-c707f8fc00af",
"fkNewStockItemId": "8eed04da-714f-4509-8d01-4636c11b9943",
"NewQty": 1,
"NewOrderId": 1,
"NewOrderCancelled": true,
"NewSKU": "sample string 20",
"NewItemTitle": "sample string 21",
"NewOrderProcessedOn": "2022-03-09T13:04:12.3167061+00:00",
"AdditionalCost": 1.1,
"fkRefundRowId": "253cfff7-f332-40c5-a72f-619d36ddac6c",
"RefundedAmount": 1.1,
"PendingRefund": 1.1,
"ReturnDate": "2022-03-09T13:04:12.3167061+00:00"
}
]