Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ShippingService

ProcessedOrders /CreateReturn

Allows 250 calls per minute

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.

Example Request

The following request format is required for this method.

Endpoint URL

POST https://eu-ext.linnworks.net/api/ProcessedOrders/CreateReturn

Headers

Connection: keep-alive
Accept: application/json
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

Request Body

This is an example of the request structure. Results will vary depending on your data.

pkOrderId=1646f1b8-9213-425d-961a-9fa90b6241b1&returnitems=[
  {
    "OrderItemRowId": "71a5b8e6-2c62-4eca-a306-9e552ae03507",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "1252dbf4-4fb8-4971-98fe-d1265a945318",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "caae1eb2-fab2-47d6-b5b0-71c70c8ab91f",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2021-07-29T09:24:11.7013352+01:00",
        "SellBy": "2021-07-29T09:24:11.7013352+01:00",
        "Inventory": [
          {
            "BatchInventoryId": 0,
            "BatchId": 0,
            "StockLocationId": "00000000-0000-0000-0000-000000000000",
            "BinRack": "Available",
            "PrioritySequence": 0,
            "Quantity": 0,
            "StockValue": 0.0,
            "StartQuantity": 0,
            "PickedQuantity": 0,
            "BatchStatus": "Available",
            "IsDeleted": false,
            "WarehouseBinrackStandardType": null,
            "WarehouseBinrackTypeName": "Available",
            "InTransfer": null,
            "BinRackId": null,
            "WarehouseBinrackTypeId": null
          }
        ],
        "IsDeleted": true
      },
      "DespatchUnitValue": 0.0,
      "AssignmentType": 0
    },
    "AdditionalCost": 4.1,
    "NewStockItemId": "22ec627b-4bfd-4539-bcb7-bacd89a1153c",
    "NewQty": 5
  }
]&returnLocation=98eaa90f-8671-4b1e-9208-edd497b81f6c&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 of the response JSON. Results will vary depending on your data.

[
  {
    "pkReturnId": 1,
    "RowType": 0,
    "ReturnReference": "sample string 2",
    "fkOrderId": "4a70e806-0220-46ca-b62a-06ab60f1cd92",
    "fkOrderItemRowId": "011d3092-23be-439e-a22f-7977f771d8e0",
    "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": "abd1aabd-be18-4a56-9b32-80d5b191616a",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2021-07-29T09:24:42.3752157+01:00",
    "Completed": true,
    "fkNewOrderId": "e42b5f2b-e7f4-4ce1-9dea-10c2fb4fcb26",
    "fkNewOrderItemRowId": "c962f440-0c8c-4e9e-8091-d6667b58b59b",
    "fkNewStockItemId": "f453d955-7d5c-44a7-b8a0-ae08428cecdd",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2021-07-29T09:24:42.3752157+01:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "f7edf125-be5d-4f20-a711-e95454002eed",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2021-07-29T09:24:42.3752157+01:00"
  }
]