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=4873ff6c-89a5-4e66-b812-877b32732106&returnitems=[
  {
    "OrderItemRowId": "38694686-5bb1-4039-a93d-04c6d1b0dd2a",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "5ef37baa-f0c6-4839-b3cc-48e3145fbcf3",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "28e164da-c232-49aa-baca-58255b3fcc94",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-11-28T09:45:57.36366+00:00",
        "SellBy": "2019-11-28T09:45:57.36366+00:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "659a5436-07fe-4395-be4e-88e4f31231c0",
            "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": "ec4e2351-8ba2-4cae-9a87-6680145b152a",
    "NewQty": 5
  },
  {
    "OrderItemRowId": "38694686-5bb1-4039-a93d-04c6d1b0dd2a",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "5ef37baa-f0c6-4839-b3cc-48e3145fbcf3",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "28e164da-c232-49aa-baca-58255b3fcc94",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-11-28T09:45:57.36366+00:00",
        "SellBy": "2019-11-28T09:45:57.36366+00:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "659a5436-07fe-4395-be4e-88e4f31231c0",
            "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": "ec4e2351-8ba2-4cae-9a87-6680145b152a",
    "NewQty": 5
  }
]&returnLocation=ba4af25e-8cfb-456f-b258-16456f12a6a3&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": "ce1e8f72-3ef6-4fca-a911-a49088aaef15",
    "fkOrderItemRowId": "c548597b-abdf-4978-af22-a7d5d8719ed3",
    "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": "7e86f078-0ff7-4b1c-a1da-6980b77750ef",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-11-28T09:46:00.2706184+00:00",
    "Completed": true,
    "fkNewOrderId": "1b1a11cb-fb18-45a8-a3d9-172b439a512a",
    "fkNewOrderItemRowId": "bea6ab41-46ba-4ed0-959b-b219dbbd383c",
    "fkNewStockItemId": "8f5c6d2c-48bc-410a-a98b-28a94abe975d",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-11-28T09:46:00.2706184+00:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "b532e740-0210-40c0-8449-29ce75f88850",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-11-28T09:46:00.2706184+00:00"
  },
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "ce1e8f72-3ef6-4fca-a911-a49088aaef15",
    "fkOrderItemRowId": "c548597b-abdf-4978-af22-a7d5d8719ed3",
    "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": "7e86f078-0ff7-4b1c-a1da-6980b77750ef",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-11-28T09:46:00.2706184+00:00",
    "Completed": true,
    "fkNewOrderId": "1b1a11cb-fb18-45a8-a3d9-172b439a512a",
    "fkNewOrderItemRowId": "bea6ab41-46ba-4ed0-959b-b219dbbd383c",
    "fkNewStockItemId": "8f5c6d2c-48bc-410a-a98b-28a94abe975d",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-11-28T09:46:00.2706184+00:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "b532e740-0210-40c0-8449-29ce75f88850",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-11-28T09:46:00.2706184+00:00"
  }
]