Skip to main content

Swap products in order (0.1.0)

Download OpenAPI specification:Download

team-order-management: team-order-management@newstore.com

Use these APIs to swap products in an existing order.

Swap items on an order

Use this resource to initiate and complete swapping of items on an order.

Initiate swapping of products in an existing order.

Request Body schema: application/json
required
Array of objects non-empty
Array (non-empty)
sales_order_item_uuid
required
string = 36 characters

The UUID of the sales order item that should be swapped.

product_id
required
string non-empty

The SKU of the new product.

Responses

Request samples

Content type
application/json
{
  • "swaps": [
    ]
}

Response samples

Content type
application/json
{
  • "swaps": [
    ],
  • "order_status": "routing"
}

Complete the swapping of products in an existing order.

Request Body schema: application/json
swap_status
required
string
Enum: "swapped" "failed"

The desired status for the swapped items. The swap_status can be swapped or failed.

sales_order_item_uuids
required
Array of strings non-empty [ items = 36 characters ]

Responses

Request samples

Content type
application/json
{
  • "swap_status": "swapped",
  • "sales_order_item_uuids": [
    ]
}

Response samples

Content type
application/problem+json
Example
{
  • "error_code": "bad_request",
  • "message": "Value provided should be a string.",
  • "request_id": "ec2f3c9bb016ba971bf6074098363"
}