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=e3c8a557-10c6-427b-8ed3-4fb51f8bf4a0&returnitems=[
  {
    "OrderItemRowId": "177c716e-0a5f-46b0-b6ec-4638b1845f07",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "54ce714f-49c4-4fdb-8ee4-fd7619773c78",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "75442636-1a6f-4807-ab2a-2f0db4d07351",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2018-10-03T11:12:33.1425533+01:00",
        "SellBy": "2018-10-03T11:12:33.1425533+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "bc704f37-afcb-4da1-8359-c4a56b960e42",
            "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": "3dbccb96-ca4c-42da-b0a9-5b4f7baf137f",
    "NewQty": 5
  },
  {
    "OrderItemRowId": "177c716e-0a5f-46b0-b6ec-4638b1845f07",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "54ce714f-49c4-4fdb-8ee4-fd7619773c78",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "75442636-1a6f-4807-ab2a-2f0db4d07351",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2018-10-03T11:12:33.1425533+01:00",
        "SellBy": "2018-10-03T11:12:33.1425533+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "bc704f37-afcb-4da1-8359-c4a56b960e42",
            "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": "3dbccb96-ca4c-42da-b0a9-5b4f7baf137f",
    "NewQty": 5
  }
]&returnLocation=8a4a0289-ce2d-46ea-aadb-3192cc2aa176&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": "85d5e743-386e-409f-bbfd-198728ba3554",
    "fkOrderItemRowId": "742a2329-75bf-4dd1-9b10-6864876d2eb7",
    "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": "69c0a43f-525d-41a0-8279-74c256314500",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2018-10-03T11:12:35.6843442+01:00",
    "Completed": true,
    "fkNewOrderId": "330102d5-b29e-4995-a80c-f48d9c11f5e4",
    "fkNewOrderItemRowId": "92f9a780-44de-4c37-9754-c49b414f4b02",
    "fkNewStockItemId": "27d3aed2-ea25-4af0-8a4a-c9dc376efd4b",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2018-10-03T11:12:35.6843442+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "e16f842e-27ad-48db-8280-807030398252",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2018-10-03T11:12:35.6843442+01:00"
  },
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "85d5e743-386e-409f-bbfd-198728ba3554",
    "fkOrderItemRowId": "742a2329-75bf-4dd1-9b10-6864876d2eb7",
    "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": "69c0a43f-525d-41a0-8279-74c256314500",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2018-10-03T11:12:35.6843442+01:00",
    "Completed": true,
    "fkNewOrderId": "330102d5-b29e-4995-a80c-f48d9c11f5e4",
    "fkNewOrderItemRowId": "92f9a780-44de-4c37-9754-c49b414f4b02",
    "fkNewStockItemId": "27d3aed2-ea25-4af0-8a4a-c9dc376efd4b",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2018-10-03T11:12:35.6843442+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "e16f842e-27ad-48db-8280-807030398252",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2018-10-03T11:12:35.6843442+01:00"
  }
]