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=57382094-a7cb-437a-897d-6eb3e3ea268b&returnitems=[
  {
    "OrderItemRowId": "9dae68e8-6d01-4706-8f4c-b9fdb5b2d7a2",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "8e2da222-5416-4a14-b651-8ca94e438880",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "30006c9a-a3bd-472f-b774-08811e672247",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-06-12T09:27:49.6689855+01:00",
        "SellBy": "2019-06-12T09:27:49.6689855+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "bf7fa449-ca3a-4db3-9b6e-0555097d2e9d",
            "BinRack": "sample string 4",
            "PrioritySequence": 5,
            "Quantity": 6,
            "StockValue": 7.0,
            "StartQuantity": 8,
            "PickedQuantity": 9,
            "BatchStatus": "Available",
            "IsDeleted": false,
            "WarehouseBinrackStandardType": null,
            "WarehouseBinrackTypeName": null,
            "InTransfer": null,
            "BinRackId": null
          }
        ],
        "IsDeleted": true
      },
      "DespatchUnitValue": 0.0,
      "AssignmentType": 0
    },
    "AdditionalCost": 4.1,
    "NewStockItemId": "4b168c82-b75f-4e0c-8777-3d6f98f29abb",
    "NewQty": 5
  },
  {
    "OrderItemRowId": "9dae68e8-6d01-4706-8f4c-b9fdb5b2d7a2",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "8e2da222-5416-4a14-b651-8ca94e438880",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "30006c9a-a3bd-472f-b774-08811e672247",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-06-12T09:27:49.6689855+01:00",
        "SellBy": "2019-06-12T09:27:49.6689855+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "bf7fa449-ca3a-4db3-9b6e-0555097d2e9d",
            "BinRack": "sample string 4",
            "PrioritySequence": 5,
            "Quantity": 6,
            "StockValue": 7.0,
            "StartQuantity": 8,
            "PickedQuantity": 9,
            "BatchStatus": "Available",
            "IsDeleted": false,
            "WarehouseBinrackStandardType": null,
            "WarehouseBinrackTypeName": null,
            "InTransfer": null,
            "BinRackId": null
          }
        ],
        "IsDeleted": true
      },
      "DespatchUnitValue": 0.0,
      "AssignmentType": 0
    },
    "AdditionalCost": 4.1,
    "NewStockItemId": "4b168c82-b75f-4e0c-8777-3d6f98f29abb",
    "NewQty": 5
  }
]&returnLocation=b1de9061-4dfb-4048-a72d-30941b5f1aba&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": "8bc87a85-a073-4f3a-a339-76e8bb87fe41",
    "fkOrderItemRowId": "7c1a2fbb-d54f-442d-aa50-b10ba3ccc0f8",
    "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": "b159d11b-9070-46e9-a4b8-693fb2131e3f",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-06-12T09:27:51.689394+01:00",
    "Completed": true,
    "fkNewOrderId": "9810329f-5d93-4225-9fa7-a320ba513d91",
    "fkNewOrderItemRowId": "27c14bb6-e7ad-4ce2-ba31-c38b1525edb1",
    "fkNewStockItemId": "88f365ef-ffd0-4cb3-997c-158bf5ff3df0",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-06-12T09:27:51.689394+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "b7fe4db7-42fc-4894-b5e3-68b3b9a2f4bd",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-06-12T09:27:51.689394+01:00"
  },
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "8bc87a85-a073-4f3a-a339-76e8bb87fe41",
    "fkOrderItemRowId": "7c1a2fbb-d54f-442d-aa50-b10ba3ccc0f8",
    "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": "b159d11b-9070-46e9-a4b8-693fb2131e3f",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-06-12T09:27:51.689394+01:00",
    "Completed": true,
    "fkNewOrderId": "9810329f-5d93-4225-9fa7-a320ba513d91",
    "fkNewOrderItemRowId": "27c14bb6-e7ad-4ce2-ba31-c38b1525edb1",
    "fkNewStockItemId": "88f365ef-ffd0-4cb3-997c-158bf5ff3df0",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-06-12T09:27:51.689394+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "b7fe4db7-42fc-4894-b5e3-68b3b9a2f4bd",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-06-12T09:27:51.689394+01:00"
  }
]