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=4ae12d50-d823-4193-acab-9d915e502238&returnitems=[
  {
    "OrderItemRowId": "3b5d5373-41d4-4e36-86fd-5b54873e4b59",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "98362b8e-2046-42d1-b0b1-314c9d747ae8",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "356c50e1-6137-408d-a469-d974fdbe696b",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-10-09T15:11:39.4039485+01:00",
        "SellBy": "2019-10-09T15:11:39.4039485+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "0d5fcd3d-7c06-4118-abf6-16ee7c51b34b",
            "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": "76b1d216-979b-4b65-b695-c0c5a58fb249",
    "NewQty": 5
  },
  {
    "OrderItemRowId": "3b5d5373-41d4-4e36-86fd-5b54873e4b59",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "98362b8e-2046-42d1-b0b1-314c9d747ae8",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "356c50e1-6137-408d-a469-d974fdbe696b",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-10-09T15:11:39.4039485+01:00",
        "SellBy": "2019-10-09T15:11:39.4039485+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "0d5fcd3d-7c06-4118-abf6-16ee7c51b34b",
            "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": "76b1d216-979b-4b65-b695-c0c5a58fb249",
    "NewQty": 5
  }
]&returnLocation=54fe5e22-89f7-4788-a266-f6d8deaf9728&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": "59ded32a-868c-4bca-b0ae-f4d2ae094ba2",
    "fkOrderItemRowId": "bfd77c10-eeba-4d0f-9da9-1d8e32ed4044",
    "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": "f8cd8c66-5b8d-465f-96c0-af11727f5273",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-10-09T15:11:42.7473819+01:00",
    "Completed": true,
    "fkNewOrderId": "95d145e0-50eb-486e-9488-fc3cba39195b",
    "fkNewOrderItemRowId": "a09705ef-7b2c-45ee-ae9f-0dcfc78a6f19",
    "fkNewStockItemId": "c1bea447-b855-43df-a22d-ba87b6e9c93c",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-10-09T15:11:42.7473819+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "5b11e07e-ca74-4314-8e7a-2e8b83ea6eaf",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-10-09T15:11:42.7473819+01:00"
  },
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "59ded32a-868c-4bca-b0ae-f4d2ae094ba2",
    "fkOrderItemRowId": "bfd77c10-eeba-4d0f-9da9-1d8e32ed4044",
    "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": "f8cd8c66-5b8d-465f-96c0-af11727f5273",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-10-09T15:11:42.7473819+01:00",
    "Completed": true,
    "fkNewOrderId": "95d145e0-50eb-486e-9488-fc3cba39195b",
    "fkNewOrderItemRowId": "a09705ef-7b2c-45ee-ae9f-0dcfc78a6f19",
    "fkNewStockItemId": "c1bea447-b855-43df-a22d-ba87b6e9c93c",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-10-09T15:11:42.7473819+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "5b11e07e-ca74-4314-8e7a-2e8b83ea6eaf",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-10-09T15:11:42.7473819+01:00"
  }
]