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=9bfd7d03-d5c7-47af-bd85-c0c098befdb7&returnitems=[
  {
    "OrderItemRowId": "f4c420e5-874c-418d-9163-71f9f30e4fb1",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "7f956150-4cba-42cf-86c1-0a694ab49934",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "3fee9d0b-dc51-43a4-9597-2af406b95b7b",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-07-23T15:31:53.8776392+01:00",
        "SellBy": "2019-07-23T15:31:53.8776392+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "e8bd5c7b-4ed1-4a28-a00f-3f37c81038fe",
            "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": "3b5c9737-cede-44fc-9121-7d1da9c59a77",
    "NewQty": 5
  },
  {
    "OrderItemRowId": "f4c420e5-874c-418d-9163-71f9f30e4fb1",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "7f956150-4cba-42cf-86c1-0a694ab49934",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "3fee9d0b-dc51-43a4-9597-2af406b95b7b",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2019-07-23T15:31:53.8776392+01:00",
        "SellBy": "2019-07-23T15:31:53.8776392+01:00",
        "Inventory": [
          null,
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "e8bd5c7b-4ed1-4a28-a00f-3f37c81038fe",
            "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": "3b5c9737-cede-44fc-9121-7d1da9c59a77",
    "NewQty": 5
  }
]&returnLocation=b26ceaaa-f834-4210-9e1b-3824a5f4cfe7&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": "f6fc6c01-9e12-49e0-ada7-4edbc306fee7",
    "fkOrderItemRowId": "43c89744-b3e0-4e62-80a2-008d4da6ee80",
    "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": "466f2926-cacf-4168-96fe-3f8e4ecd7ba9",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-07-23T15:31:55.6920009+01:00",
    "Completed": true,
    "fkNewOrderId": "9b79b5d5-12ee-4c1a-975f-6a67a4a702dc",
    "fkNewOrderItemRowId": "f4ab61cc-a3f4-44db-b149-89d9cc60c624",
    "fkNewStockItemId": "02198f2b-593f-43e3-b0dc-01001b958c37",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-07-23T15:31:55.6920009+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "39bba9a2-e458-4613-89a6-3c221b10bb53",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-07-23T15:31:55.6920009+01:00"
  },
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "f6fc6c01-9e12-49e0-ada7-4edbc306fee7",
    "fkOrderItemRowId": "43c89744-b3e0-4e62-80a2-008d4da6ee80",
    "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": "466f2926-cacf-4168-96fe-3f8e4ecd7ba9",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2019-07-23T15:31:55.6920009+01:00",
    "Completed": true,
    "fkNewOrderId": "9b79b5d5-12ee-4c1a-975f-6a67a4a702dc",
    "fkNewOrderItemRowId": "f4ab61cc-a3f4-44db-b149-89d9cc60c624",
    "fkNewStockItemId": "02198f2b-593f-43e3-b0dc-01001b958c37",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2019-07-23T15:31:55.6920009+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "39bba9a2-e458-4613-89a6-3c221b10bb53",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2019-07-23T15:31:55.6920009+01:00"
  }
]