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

GET | 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=ccf630b8-3816-4c4f-93ee-9c24e95ae310&returnitems=[
  {
    "OrderItemRowId": "a3b5f149-5dbf-4d39-957c-b36910e65ee0",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "a861e088-9e44-4daa-ade3-42d563c4794b",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "cf95a3e7-6597-426f-9364-210eeb1bfe9a",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2022-09-05T15:10:00.9326956+03:00",
        "SellBy": "2022-09-05T15:10:00.9326956+03:00",
        "Inventory": [
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "768be903-8e2e-4b9a-88c0-346e7585990e",
            "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": "e30709c7-dae6-4f79-99b9-908bb92b69af",
    "NewQty": 5
  }
]&returnLocation=3f54ec32-f405-4932-85ac-8119d0b73422&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": "3c0ac208-efe6-45d5-ac11-8afa636cdf36",
    "fkOrderItemRowId": "c79fd4db-3543-482d-bef8-363867604440",
    "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": "38ea280d-759c-4acf-83f0-a3344a97244e",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2022-09-05T15:10:04.3470108+03:00",
    "Completed": true,
    "fkNewOrderId": "2e9f9029-0730-490b-9003-61a61d137d94",
    "fkNewOrderItemRowId": "6ecf9809-391b-4bba-b923-cdaab5bb0486",
    "fkNewStockItemId": "a30ea13e-17ca-4837-a138-e36c0024d52c",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2022-09-05T15:10:04.3470108+03:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "c9379a90-f7e6-4df4-a161-315f4c79194b",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2022-09-05T15:10:04.3470108+03:00"
  }
]