Back

Search

Search

Methods

Inventory

Orders

ProcessedOrders /CreateReturn

Response: List<ReturnInfo>



Use this call to create a new return

Parameters

NameTypeDescription
pkOrderIdGuidThe order id
returnitemsList<RowQty>A list of items to be returned, including quantity, scrap, refund, etc.
returnLocationGuidThe id of the location to return stock to
channelReasonStringChannel reason - required if a refund on the channel is required
channelSubReasonStringChannel subreason - required if a refund on the channel is required.
categoryStringThe refund category
reasonStringThe reason for the reason
isReturnBookingBooleanTrue if it is a return booking, False if it is a new return
ignoredValidationBooleanTrue 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.

HTTP Endpoint

Server /ProcessedOrders / CreateReturn

Permissions


Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/ProcessedOrders/CreateReturn HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

pkOrderId=2e178a3d-7d1c-41b0-9430-722c04670c8b&returnitems=[
  {
    "OrderItemRowId": "17a915db-a7d6-417b-a4e4-6fc046a40c1f",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "AdditionalCost": 4.1,
    "NewStockItemId": "c1395463-ee74-451c-ae98-8f289762a351",
    "NewQty": 5
  },
  {
    "OrderItemRowId": "17a915db-a7d6-417b-a4e4-6fc046a40c1f",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "AdditionalCost": 4.1,
    "NewStockItemId": "c1395463-ee74-451c-ae98-8f289762a351",
    "NewQty": 5
  }
]&returnLocation=bde8b7be-b8de-490f-be46-8da267c385c7&channelReason=sample string 1&channelSubReason=sample string 1&category=sample string 1&reason=sample string 1&isReturnBooking=true&ignoredValidation=true

Response

This is an example response. Results may vary depending on your data.

[
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "e7ee688f-1268-43aa-bf95-6a96d2cb625e",
    "fkOrderItemRowId": "68758c1d-42b1-4377-a35e-9aa5df92daa6",
    "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": "6e7034df-c0db-4635-9b37-e35846a17c94",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2018-02-19T16:57:07.9447217+00:00",
    "Completed": true,
    "fkNewOrderId": "0e9b39b5-5356-4218-b3d2-7ac0bcc5ac7c",
    "fkNewOrderItemRowId": "33efa222-5e43-4b63-ac96-78d4912001f6",
    "fkNewStockItemId": "45789c71-1320-47df-9e17-ed5867055ca1",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2018-02-19T16:57:07.9447217+00:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "4d6978ba-8e63-4beb-9ac5-a7351de3647b",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2018-02-19T16:57:07.9447217+00:00"
  },
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "e7ee688f-1268-43aa-bf95-6a96d2cb625e",
    "fkOrderItemRowId": "68758c1d-42b1-4377-a35e-9aa5df92daa6",
    "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": "6e7034df-c0db-4635-9b37-e35846a17c94",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2018-02-19T16:57:07.9447217+00:00",
    "Completed": true,
    "fkNewOrderId": "0e9b39b5-5356-4218-b3d2-7ac0bcc5ac7c",
    "fkNewOrderItemRowId": "33efa222-5e43-4b63-ac96-78d4912001f6",
    "fkNewStockItemId": "45789c71-1320-47df-9e17-ed5867055ca1",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2018-02-19T16:57:07.9447217+00:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "4d6978ba-8e63-4beb-9ac5-a7351de3647b",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2018-02-19T16:57:07.9447217+00:00"
  }
]