Use this call to create a new return
Name | Type | Description |
---|---|---|
pkOrderId | Guid | The order id |
returnitems | List<RowQty> | A list of items to be returned, including quantity, scrap, refund, etc. |
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 |
isReturnBooking | Boolean | True if it is a return booking, False if it is a new return |
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.
GET | POST https://eu-ext.linnworks.net/api/ProcessedOrders/CreateReturn
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=0e2cb719-7312-4400-9c02-934015d325c2&returnitems=[
{
"OrderItemRowId": "86601ad5-e653-4c1c-ae6a-3719a52a0af4",
"OrderItemBatchId": 1,
"Refund": 2.1,
"Qty": 3,
"ScrapQty": 1,
"Batch": {
"OrderItemBatchId": 1,
"OrderItemRowId": "98bce710-a6c7-4ffd-bb01-6a1aa7235cb8",
"BatchInventoryId": 3,
"Quantity": 4,
"Batch": {
"BatchId": 1,
"SKU": "sample string 2",
"InventoryTrackingType": 3,
"StockItemId": "2aa1815e-16dd-404f-8b0b-200a8a3ccf0b",
"BatchNumber": "sample string 5",
"ExpiresOn": "2023-01-10T13:49:45.6384917+00:00",
"SellBy": "2023-01-10T13:49:45.6384917+00:00",
"Inventory": [
{
"BatchInventoryId": 1,
"BatchId": 2,
"StockLocationId": "d55d8a20-0d2a-4c58-89e5-5c6dd45d6846",
"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": "69ca8cee-b720-4e4d-9ea0-019f99a45aa1",
"NewQty": 5
}
]&returnLocation=05776513-67c8-488e-8c4f-25d578875eb4&channelReason=sample string 1&channelSubReason=sample string 1&category=sample string 1&reason=sample string 1&isReturnBooking=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": "52a27025-6fa4-4e05-aed6-9c5e1934110d",
"fkOrderItemRowId": "87178fb3-633d-44c3-b975-1addeb407bbe",
"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": "a99f22bd-d328-4cdd-a642-e0abde562496",
"Scrapped": true,
"ScrapQty": 1,
"LastState": "sample string 16",
"LastDate": "2023-01-10T13:49:50.3143096+00:00",
"Completed": true,
"fkNewOrderId": "c4409635-1f06-45fc-afb9-83155eda3682",
"fkNewOrderItemRowId": "88b28a5e-f6e4-4471-a076-9556c631698b",
"fkNewStockItemId": "6cb75cee-1e5c-4987-906b-8234c3047b0c",
"NewQty": 1,
"NewOrderId": 1,
"NewOrderCancelled": true,
"NewSKU": "sample string 20",
"NewItemTitle": "sample string 21",
"NewOrderProcessedOn": "2023-01-10T13:49:50.3143096+00:00",
"AdditionalCost": 1.1,
"fkRefundRowId": "8bf7ce36-a9cc-411e-923c-e054a10ac87f",
"RefundedAmount": 1.1,
"PendingRefund": 1.1,
"ReturnDate": "2023-01-10T13:49:50.3143096+00:00"
}
]