Create a Swap. This includes creating a return that is associated with the swap.
Request
Body Params application/json
{
"no_notification": true,
"allow_backorder": true,
"return_shipping": {
"option_id": "string",
"price": 0
},
"additional_items": [
{
"variant_id": "string",
"quantity": 0
}
],
"custom_shipping_options": [
{
"option_id": "string",
"price": 0
}
],
"return_items": [
{
"item_id": "string",
"quantity": 0,
"reason_id": "string",
"note": "string"
}
]
}
Request samples
curl --location --request POST 'https://api.medusa-commerce.com/admin/orders//swaps' \
--header 'Content-Type: application/json' \
--data-raw '{
"no_notification": true,
"allow_backorder": true,
"return_shipping": {
"option_id": "string",
"price": 0
},
"additional_items": [
{
"variant_id": "string",
"quantity": 0
}
],
"custom_shipping_options": [
{
"option_id": "string",
"price": 0
}
],
"return_items": [
{
"item_id": "string",
"quantity": 0,
"reason_id": "string",
"note": "string"
}
]
}'
Responses
application/json Modified at 2023-10-08 12:50:29