v1

latestOpenAPI 3.0.02026-07-266521,3121.2 MB
ProcessedOrders

CreateExchange

<b>Rate limit: </b><span style="background-color:#0272d9;color:white;padding:4px 8px;text-align:center;border-radius:5px; font-size: small;"><b>150</b></span> / minute

post/api/ProcessedOrders/CreateExchange

Request body

pkOrderIdstring uuid

The order id

despatchLocationstring uuid

The id of the location to despatch replacement items from

returnLocationstring uuid

The id of the location to return stock to

channelReasonstring

Channel reason - required if a refund on the channel is required

channelSubReasonstring

Channel subreason - required if a refund on the channel is required.

categorystring

The refund category

reasonstring

The reason for the reason

isBookingboolean

True if it is a exchange booking, False if it is a new exchange

ignoredValidationboolean

True 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

{
  "pkOrderId": "00000000-0000-0000-0000-000000000000",
  "exchangeItems": [
    {
      "OrderItemRowId": "00000000-0000-0000-0000-000000000000",
      "Batch": {
        "OrderItemRowId": "00000000-0000-0000-0000-000000000000",
        "Batch": {
          "StockItemId": "00000000-0000-0000-0000-000000000000",
          "Inventory": [
            {
              "StockLocationId": "00000000-0000-0000-0000-000000000000"
            }
          ]
        }
      },
      "NewStockItemId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "despatchLocation": "00000000-0000-0000-0000-000000000000",
  "returnLocation": "00000000-0000-0000-0000-000000000000"
}

Response

OK

pkReturnIdinteger

Return ID

RowType'UNKNOWN' | 'RETURN' | 'RETURNREFUND' | 'EXCHANGE' | 'RESEND' | 'RETURNBOOKING' | 'EXCHANGEBOOKING'

return type (e.g. EXCHANGE)

ReturnReferencestring

Return reference

fkOrderIdstring uuid

Order ID

fkOrderItemRowIdstring uuid

Order item record row ID

OrderItemBatchIdinteger

Order item batch id

nOrderIdinteger

Linnworks order number

SKUstring

Product SKU

ItemTitlestring

Product title

BatchNumberstring

Batch number

Reasonstring

Return reason

ChannelReasonstring

Return reason set on a channel

ChannelReasonSecstring

Secondary return reason on a channel

Categorystring

Category

ReturnQtyinteger

Returned quantity

fkReturnLocationIdstring uuid

Return location ID

Scrappedboolean

If returned item was scrapped

ScrapQtyinteger

Scrapped quantity

LastStatestring

Last state

LastDatestring date-time

Last date

Completedboolean

If return is completed

fkNewOrderIdstring uuid

New order ID for return

fkNewOrderItemRowIdstring uuid

New order item record row ID

fkNewStockItemIdstring uuid

New stock item ID

NewQtyinteger

New return quantity

NewOrderIdinteger

New order ID

NewOrderCancelledboolean

If new order were cancelled

NewSKUstring

new product SKU

NewItemTitlestring

New product title

NewOrderProcessedOnstring date-time

When new order was processed

AdditionalCostnumber double

Additional costs involved

fkRefundRowIdstring uuid

Refund record row ID

RefundedAmountnumber double

Amount refunded

PendingRefundnumber double

Refund pending

ReturnDatestring date-time

Return date

Example response

[
  {
    "fkOrderId": "00000000-0000-0000-0000-000000000000",
    "fkOrderItemRowId": "00000000-0000-0000-0000-000000000000",
    "fkReturnLocationId": "00000000-0000-0000-0000-000000000000",
    "fkNewOrderId": "00000000-0000-0000-0000-000000000000",
    "fkNewOrderItemRowId": "00000000-0000-0000-0000-000000000000",
    "fkNewStockItemId": "00000000-0000-0000-0000-000000000000",
    "fkRefundRowId": "00000000-0000-0000-0000-000000000000"
  }
]