# Create Exchange Order Endpoint: POST /exchange_orders Version: 2.0.0 ## Header parameters: - `X-Optiturn-Id` (string, required) Example: "Modrno" - `X-Optiturn-Api-Version` (string, required) Enum: "1", "2" ## Request fields (application/json): - `currency` (string, required) Currency code. Must be ISO-4217 reference. E.g. "USD" Example: "USD" - `rma_identifier` (string) The RMA exchange goods are to be returned under Example: "RMA12345" - `original_order_id` (string, required) The original order id of item(s) to be exchanged Example: "OR123456" - `original_secondary_order_id` (string) The original secondary order id of item(s) to be exchanged Example: "OR987654" - `is_gift` (boolean, required) Treat as a gift order, don’t show price or allow refund to original form of payment. - `items` (array, required) An array of order line items. Example: [{"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"}]}] - `items.sku` (string, required) An identifier which matches the catalog and represents the product for this order item. Example: "888812345678" - `items.quantity` (integer, required) The number of units within the order for each SKU (or UPC). Must be less than or equal to 1000. Example: 2 - `items.title` (string) Title of product Example: "Fuzzy red t-shirt" - `items.unit_price_amount_cents` (integer) Unit price amount in cents of a single unit of a product. Example: 100 - `items.product_amount_cents` (integer) Product amount in cents, before discounts, taxes or shipping costs. Example: 200 - `items.discount_amount_cents` (integer) Line item discount amount in cents. Example: 20 - `items.tax_amount_cents` (integer) Line item tax amount in cents. Example: 100 - `items.bonus_credit_amount_cents` (integer) Gift card bonus credit amount in cents. This field is only present for an Instant Gift Card exchange. Example: 100 - `items.product_identifier` (string) Id unique to that product (ex. same SKU from different vendors). Example: "1234-5678" - `items.variant_identifier` (string) Variant can help disambiguate specific variant of a product class (e.g. blue color of a sweater product) -- product_identifier can be the same as variant_identifier in some systems. Example: "1234-5678" - `items.original_sku` (string) SKU of the item from original order that is being exchanged. Example: "888812345678" - `items.original_item_identifier` (string) Order line item identifier of the item from original order that is being exchanged. Example: "1234" - `items.concept` (string) The concept brand that this item belongs to. Example: "acme" - `items.return_items` (array) An array of order line items being exchanged for a gift card. This field is only present for an Instant Gift Card exchange. - `customer` (object, required) Customer - `customer.identifier` (string, required) Reference to customer record in your OMS Example: "123" - `customer.first_name` (string) Customer first name Example: "Carmine" - `customer.last_name` (string) Customer last name Example: "Customer" - `customer.email` (string, required) Customer contact email Example: "customer@example.com" - `customer.phone` (string) Customer phone Example: "202-555-1212" - `shipping_address` (object, required) Address to receive goods - `shipping_address.name` (string, required) Name of person. Example: "Carmine Customer" - `shipping_address.street1` (string, required) The street address. Example: "123 Fake St." - `shipping_address.street2` (string) An optional second line for the street address, for suite or other similar additions. Example: "STE 1200" - `shipping_address.city` (string, required) The city for this address. Example: "Utiopiannapolis" - `shipping_address.province` (string, required) The state or province for this address. Example: "WA" - `shipping_address.postal_code` (string, required) The zip or postal code for this address. Example: "99877" - `shipping_address.country_code` (string, required) The country code for this address. Example: "US" - `shipping_address.phone` (string) Phone number. Example: "202-555-1212" - `billing_address` (object, required) Payment billing address - `payment` (object, required) - `payment.transaction_id` (string, required) Optoro generated number for order payment Example: "8ef05fb8-283e-4edd-a3d7-47f9fe520cfe" ## Response 200 fields (application/json): - `order_identifier` (string, required) Identifier of created order, should be the same order id given to shoppers Example: "OR124567" - `total_amount_cents` (integer, required) Total amount of order in cents, including any gift card bonus credit (if applicable) Example: 100 - `product_amount_cents` (integer, required) Product amount of order in cents, before discounts, taxes or shipping costs Example: 100 - `tax_amount_cents` (integer, required) Tax amount of order in cents Example: 110