Part of the request body of POST /sandbox/orders/{orderId}/change-requests.

Type: object

Example

Schema example: from the POST /sandbox/orders/{orderId}/change-requests request
{
  "kind": "address_change",
  "payload": {
    "address": {
      "line1": "555 Granville St",
      "line2": "Unit 4",
      "city": "Vancouver",
      "province": "BC",
      "postal_code": "V6C 1T2",
      "country": "CA"
    }
  }
}

Fields

kind string required

Constraints: allowed values: cancel_lines, address_change Example address_change

payload object required

Constraints: additional properties are not allowed

Show child fieldsHide child fields
payload.lines array of object conditional

Required when kind is cancel_lines. The subset at the (order × SKU) grain the termination commands use; quantity omitted means the line’s whole remaining quantity, a smaller quantity removes that many units. Every remaining unit at once is the full-order termination: the BUYER may ask for it (the seller still grants or declines), the SELLER may not - their full cancel is unilateral, so they run it directly.

Constraints: minimum items: 1

Show child fieldsHide child fields
payload.lines[].lineRef string

The purchase-line ref (oln_…) of the order line this entry names, read from the order's own lines. Name a line by lineRef or by skuId; lineRef is needed only when the SKU is on more than one line the command can still act on.

Constraints: pattern: ^oln_[0-9a-f]{32}$

payload.lines[].skuId integer

The SKU of the order line this entry names. Name a line by skuId or by lineRef. When the SKU is on more than one line the command can still act on, the command answers ORDER_LINE_AMBIGUOUS with the candidate lineRefs; name the line by one of them. Supply exactly one of lineRef and skuId.

Constraints: exclusive minimum: 0

payload.lines[].quantity integer

The number of units.

Constraints: exclusive minimum: 0

payload.address object conditional

Required when kind is address_change.

Constraints: additional properties are not allowed

Show child fieldsHide child fields
payload.address.line1 string required

The street address.

Constraints: minimum length: 1; maximum length: 255 Example 555 Granville St

payload.address.line2 string or null

The unit, suite, or second address line, if supplied.

Constraints: maximum length: 255 Example Unit 4

payload.address.city string required

The city in the shipping address.

Constraints: minimum length: 1; maximum length: 255 Example Vancouver

payload.address.province string required

The Canadian province or territory in the delivery address.

Example BC

payload.address.postal_code string required

The Canadian postal code in the delivery address.

Example V6C 1T2

payload.address.country string required

Constraints: allowed values: CA Example CA

message string

An optional note threaded on the ticket the request rides.

Constraints: minimum length: 1; maximum length: 10000

Used by