Download OpenAPI specification:Download
The Exchange Orders API is used to place an order in your e-commerce platform when the shopper has chosen to exchange for a replacement item or receive their refund via a gift card.
Your endpoint should handle all tax and shipping calculations.  The endpoint should be idempotent, using original_order_id as the key.  Only one exchange order can be placed against an original_order_id.
When it is used:
This is an exchange of one or more items for a variant of the product (ex: different size, different color). This will be represented in the items array by an object like the following:
{
  "sku": "888812345678",
  "quantity": 2,
  "title": "Fuzzy red t-shirt",
  "unit_price_amount_cents": 100,
  "product_amount_cents": 200,
  "discount_amount_cents": 20,
  "tax_amount_cents": 100,
  "product_identifier": "1234-5678",
  "variant_identifier": "1234-5678",
  "original_sku": "888812345678",
  "original_item_identifier": "1234",
  "concept": "acme"
}
This is an exchange of one or more items for a gift card. This will be represented in the items array by an object like the following:
{
  "sku": "OPTOROGIFTCARD",
  "quantity": 1,
  "unit_price_amount_cents": 800,
  "bonus_credit_amount_cents": 200,
  "return_items": [
    {
      "title": "Pink Shirt",
      "original_sku": "888812349672",
      "original_item_identifier": "4567",
      "quantity": 1,
      "concept": "acme"
    }
  ]
}
sku will be the agreed upon value for an Instant Gift Card exchange and return_items will be the list of items being exchanged for the gift card.
Exchange order object
Order creation success message
{- "currency": "USD",
 - "rma_identifier": "RMA12345",
 - "original_order_id": "OR123456",
 - "original_secondary_order_id": "OR987654",
 - "is_gift": false,
 - "items": [
- {
- "sku": "888812345678",
 - "quantity": 2,
 - "title": "Fuzzy red t-shirt",
 - "unit_price_amount_cents": 100,
 - "product_amount_cents": 200,
 - "discount_amount_cents": 20,
 - "tax_amount_cents": 100,
 - "product_identifier": "1234-5678",
 - "variant_identifier": "1234-5678",
 - "original_sku": "888812345678",
 - "original_item_identifier": "1234",
 - "concept": "acme"
 
}, - {
- "sku": "OPTOROGIFTCARD",
 - "quantity": 1,
 - "unit_price_amount_cents": 800,
 - "bonus_credit_amount_cents": 200,
 - "return_items": [
- {
- "title": "Pink Shirt",
 - "original_sku": "888812349672",
 - "original_item_identifier": "4567",
 - "quantity": 1,
 - "concept": "acme"
 
} 
] 
} 
], - "customer": {
- "identifier": "123",
 - "first_name": "Carmine",
 - "last_name": "Customer",
 - "email": "customer@example.com",
 - "phone": "202-555-1212"
 
}, - "shipping_address": {
- "name": "Carmine Customer",
 - "street1": "123 Fake St.",
 - "street2": "STE 1200",
 - "city": "Utiopiannapolis",
 - "province": "WA",
 - "postal_code": "99877",
 - "country_code": "US",
 - "phone": "202-555-1212"
 
}, - "billing_address": {
- "name": "Carmine Customer",
 - "street1": "123 Fake St.",
 - "street2": "STE 1200",
 - "city": "Utiopiannapolis",
 - "province": "WA",
 - "postal_code": "99877",
 - "country_code": "US",
 - "phone": "202-555-1212"
 
}, - "payment": {
- "transaction_id": "8ef05fb8-283e-4edd-a3d7-47f9fe520cfe"
 
} 
}{- "order_identifier": "OR124567",
 - "total_amount_cents": 100,
 - "product_amount_cents": 100,
 - "tax_amount_cents": 110
 
}