Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

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=f46a439e-95ea-4f32-b10b-0b66319162de&returnitems=[
  {
    "OrderItemRowId": "6d3170c5-aae3-4ca5-9220-4a0da5236928",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "4a33ac8e-19c8-47b9-a33b-986d796ea63c",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "f21fbe56-21f8-4e7a-88da-42a65891c44a",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2022-03-09T13:04:02.4190232+00:00",
        "SellBy": "2022-03-09T13:04:02.4190232+00:00",
        "Inventory": [
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "35379227-3edc-46e0-8851-2153d3ffc20a",
            "BinRack": "sample string 4",
            "PrioritySequence": 5,
            "Quantity": 6,
            "StockValue": 7.0,
            "StartQuantity": 8,
            "PickedQuantity": 9,
            "BatchStatus": "Available",
            "IsDeleted": true,
            "WarehouseBinrackStandardType": 1,
            "WarehouseBinrackTypeName": "sample string 12",
            "InTransfer": 1,
            "BinRackId": 1,
            "WarehouseBinrackTypeId": 1
          }
        ],
        "IsDeleted": true
      },
      "DespatchUnitValue": 0.0,
      "AssignmentType": 0
    },
    "AdditionalCost": 4.1,
    "NewStockItemId": "f891288c-eb91-49df-afff-1b8a7bbaa92b",
    "NewQty": 5
  }
]&returnLocation=feb322a3-a06e-4246-9b8e-1142e6f27090&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": "eff6c3d3-ff0f-40e3-b2b0-e1be9eda694d",
    "fkOrderItemRowId": "730ff5c3-2729-46b1-b90c-9d49ef57e6a0",
    "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": "4bf23ead-c84c-4740-9656-5dc9b470b129",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2022-03-09T13:04:12.3147112+00:00",
    "Completed": true,
    "fkNewOrderId": "dcdcd60d-e468-4352-bd75-7e6935c2016e",
    "fkNewOrderItemRowId": "63fd0765-5618-43bb-a534-490ec831adc9",
    "fkNewStockItemId": "9598ee51-6a7b-46af-b353-92f5019e9905",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2022-03-09T13:04:12.3147112+00:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "2c7e11bd-be2f-45b2-b9ef-4100b1a1f469",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2022-03-09T13:04:12.3147112+00:00"
  }
]