Exchange Service
{rma_id}
/eventsGiven a product_id and order_id return a list of all products eligible for exchange
Limit: 10 products options with 4 variants each
Request parameters
sku
warehouse_id, bins, country_code
Request headers
Responses
Body
Need to check the business logic for this
price in cents(lowest currency denomination)
["10","20","30"]
GET /v1/exchange_inventory?product_id=p1&order_id=o1&variant_id=v1&locale=en_US HTTP/1.1
retailer_moniker: r1
HTTP/1.1 200 OK
Content-Type: application/json
{
"inventory": [
{
"product_id": "6960134914122",
"variant_id": "40006399590474",
"display_name": "Tribble",
"sku": "TRB-ML",
"available_for_sale": true,
"inventory_quantity": 5,
"options": {
"size": "Medium",
"color": "Longhair",
"material": null
},
"images": [
{
"image_src": "",
"image_alt": "",
"option": ""
}
],
"price": {
"amount": "",
"currency": "USD"
}
}
],
"variant_options": [
{
"title": "Size",
"code": "size",
"values":
[
"10",
"20",
"30"
]
},
{
"title": "Color",
"code": "color",
"values":
[
"White",
"Blue"
]
},
{
"title": "Material",
"code": "material",
"values":
[
"Cotton",
"Polyester"
]
}
]
}
Request headers
Request body
Object containing items to be returned.
sku
["https://cdn.shopify.com/s/files/1/0566/6324/4874/products/ST_TroubleWithTribbles.jpg?v=1662058136"]
Object containing items to be exchanged.
New Item
New Item
New Item
Object containing order details including customer information and shipping address.
Object containing any applicable fees such as restocking fee or shipping fee.
Examples
Responses
Calculation result
Body
List of Money Object
Total amount of all the exchange items adjusted agains return items excluding the tax
Total tax on all the exchange items adjusted agains return items
Net total which includes subtotal and fees including taxes. Intent would be created on this amount
POST /v1/calculate_cart HTTP/1.1
Content-Type: application/json
{
"return_items": [
{
"variant_id": "",
"product_id": "",
"line_item_id": "123456789",
"return_reason": "I don't like it",
"return_reason_id": "123456789",
"child_return_reason": "It's too big",
"child_return_reason_id": "123456789",
"comment": "I don't like it",
"quantity": 1,
"image_srcs": [
"https://cdn.shopify.com/s/files/1/0566/6324/4874/products/ST_TroubleWithTribbles.jpg?v=1662058136"
],
"price": {
"price_in_cents": 1,
"currency": ""
},
"discount": {
"price_in_cents": 1,
"currency": ""
}
}
],
"exchange_items": [
{
"product_id": "6960134914122",
"variant_id": "40006399590474",
"new_product_id": "",
"new_variant_id": "",
"new_sku": "",
"display_name": "Tribble",
"image_src": "https://cdn.shopify.com/s/files/1/0566/6324/4874/products/ST_TroubleWithTribbles.jpg?v=1662058136",
"options": [
{
"size": "Medium",
"color": "Longhair",
"material": null
}
],
"price": {
"price_in_cents": 1,
"currency": ""
},
"quantity": 1,
"new_price": {
"price_in_cents": 1,
"currency": ""
}
}
],
"order_information": {
"order_number": "SD123456789",
"order_date": "2021-10-01T12:00:00Z",
"customer_email": "",
"from_address": {},
"ext_order_id": ""
},
"fees": {
"shipping_fee": {
"price_in_cents": 1,
"currency": ""
},
"return_fee": {
"price_in_cents": 1,
"currency": ""
},
"restocking_fee": {
"price_in_cents": 1,
"currency": ""
},
"exchange_fee": {
"price_in_cents": 1,
"currency": ""
}
},
"return_method": "",
"refund_method": "original_form_of_payment"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"summary": {
"fees": [
{
"price_in_cents": 1,
"currency": "",
"fee_type": "RESTOCKING_FEE",
"tax_in_cents": 1
}
],
"discounts": [
{
"price_in_cents": 1,
"currency": ""
}
],
"subtotal": {
"price_in_cents": 1,
"currency": ""
},
"subtotal_tax": {
"price_in_cents": 1,
"currency": ""
},
"total": {
"price_in_cents": 1,
"currency": ""
}
},
"cart": {
"return_items": "",
"exchange_items": "",
"cart_id": ""
}
}
Request body
Responses
Order submission result
Body
Unique identifier for the draft order created./Basket
Total payment amount calculated, including taxes and fees.
Stripe payment intent for the total in Calculate Cart
POST /v1/submit_order HTTP/1.1
Content-Type: application/json
{
"return_items": "",
"exchange_items": "",
"cart_id": ""
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"order_id": "",
"payment_infomation": {
"price_in_cents": 1,
"currency": ""
},
"cart_id": "",
"payment_intent_id": ""
}
Request body
Name of the payment gateway.
Amount to be captured.
Reference transaction ID/payment ID associated with the order.
Reference to the Cart created in Submit Order
Responses
Payment capture result
Body
Status of the payment capture.
POST /v1/place_order HTTP/1.1
Content-Type: application/json
{
"payment_gateway": "",
"price": {
"price_in_cents": 1,
"currency": ""
},
"payment_authorization_token": {},
"order_id": "",
"payment_id": ""
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": ""
}
{rma_id}
/eventsPath variables
The ID of the Return Merchandise Authorization.
Request body
Description of the event occurring.
Object containing RMA details.
Responses
RMA event processing result
Body
Status of the event reported.
A descriptive message about the outcome of the event processing.
Given a product_id and order_id return a list of all products eligible for exchange
Limit: 10 products options with 4 variants each
Request headers
Request body
warehouse_id, bins, country_code
POST /v1/exchange_inventory HTTP/1.1
Content-Type: application/json
{
"product_id": "",
"order_id": "",
"exchange_config": {
"uneven_variant_exchange_enabled": true,
"even_variant_exchange_enabled": "",
"uneven_recommended_product_exchange_enabled": "",
"even_recommended_product_exchange_enabled": "",
"full_store_exchange_enabled": ""
},
"locale": "",
"variant_id": "",
"locations": ""
}