Back

Search

Search

Methods

Inventory

OrderPrintStatus
Orders

ProcessedOrders /CreateExchange

Allows 150 calls per minute

Response: List<ReturnInfo>


Parameters

NameTypeDescription
pkOrderIdGuidThe order id
exchangeItemsList<RowQty>A list of items to be exchanged, including quantity, scrap, refund, etc.
despatchLocationGuidThe id of the location to despatch replacement items from
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
isBookingBooleanTrue if it is a exchange booking, False if it is a new exchange
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/CreateExchange

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=0a91cdfb-53d2-46a5-a2a8-b429b409c8b1&exchangeItems=[
  {
    "OrderItemRowId": "9b74f60f-a3c1-4125-96a4-7637ad5512a0",
    "OrderItemBatchId": 1,
    "Refund": 2.1,
    "Qty": 3,
    "ScrapQty": 1,
    "Batch": {
      "OrderItemBatchId": 1,
      "OrderItemRowId": "1111a458-d9fb-4956-ae37-42ba3eeeb165",
      "BatchInventoryId": 3,
      "Quantity": 4,
      "Batch": {
        "BatchId": 1,
        "SKU": "sample string 2",
        "InventoryTrackingType": 3,
        "StockItemId": "9e1c58f7-7f18-4032-b88c-a48a07384223",
        "BatchNumber": "sample string 5",
        "ExpiresOn": "2023-01-10T13:49:45.6524718+00:00",
        "SellBy": "2023-01-10T13:49:45.6524718+00:00",
        "Inventory": [
          {
            "BatchInventoryId": 1,
            "BatchId": 2,
            "StockLocationId": "295d40b4-ff66-49d5-9a60-47ccbed06259",
            "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": "59762892-2b08-40a9-8914-4ce580bafc1b",
    "NewQty": 5
  }
]&despatchLocation=877212ca-e926-4681-a9cb-b13b2c859399&returnLocation=2e9f751f-c99a-488b-86c2-5beee76835bf&channelReason=sample string 1&channelSubReason=sample string 1&category=sample string 1&reason=sample string 1&isBooking=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": "d4711a91-20dc-4a7e-8a56-a5f5abdcae30",
    "fkOrderItemRowId": "cecd43ec-27c7-4b42-9950-aa6472a52732",
    "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": "88c15718-95e1-4d88-b2fa-2bdfecea93d8",
    "Scrapped": true,
    "ScrapQty": 1,
    "LastState": "sample string 16",
    "LastDate": "2023-01-10T13:49:50.3182963+00:00",
    "Completed": true,
    "fkNewOrderId": "f60f18ee-ea48-4f2e-ac68-872d7bd30812",
    "fkNewOrderItemRowId": "92e219c7-2663-4d9d-a5fd-500f76059bc4",
    "fkNewStockItemId": "8b54b6f8-59b5-4233-8795-9ecf309073ab",
    "NewQty": 1,
    "NewOrderId": 1,
    "NewOrderCancelled": true,
    "NewSKU": "sample string 20",
    "NewItemTitle": "sample string 21",
    "NewOrderProcessedOn": "2023-01-10T13:49:50.3182963+00:00",
    "AdditionalCost": 1.1,
    "fkRefundRowId": "7ff84b6b-59d9-4c44-a370-bac97f674ebd",
    "RefundedAmount": 1.1,
    "PendingRefund": 1.1,
    "ReturnDate": "2023-01-10T13:49:50.3182963+00:00"
  }
]