My company uses Shippingbo as an OMS and WMS
I try to create a return order from the OMS to the WMS
The return order is rightly created in my OMS but not in my WMS and I have to trigger the propagation in the UI and I would like to do it automaticaly
The request I made:
curl --request POST \
--url https://app.shippingbo.com/returns_orders \
--header 'X-API-USER: my_user' \
--header 'X-API-TOKEN: passwd' \
--header 'X-API-VERSION: 1' \
--header 'Content-Type: application/json' \
--data '{
"source": "Prestashop-staging",
"source_ref": "XMLPJGHU",
"reason": "Bad size",
"reason_ref": "S/M",
"return_order_type": "return_order_customer",
"return_order_expected_items_attributes": [
{
"quantity": 1,
"user_ref": "shirt-and-flag"
}
]
}'
You must add an additional parameter that is the supplier_id
curl --request POST \
--url https://app.shippingbo.com/returns_orders \
--header 'X-API-USER: my_user' \
--header 'X-API-TOKEN: passwd' \
--header 'X-API-VERSION: 1' \
--header 'Content-Type: application/json' \
--data '{
"source": "Prestashop-staging",
"source_ref": "XMLPJGHU",
"reason": "Bad size",
"reason_ref": "S/M",
"return_order_type": "return_order_customer",
"supplier_id": __your_id__,
"return_order_expected_items_attributes": [
{
"quantity": 1,
"user_ref": "shirt-and-flag"
}
]
}'
To get the supplier_id you can request:
curl --request GET \
--url https://app.shippingbo.com/suppliers/available_for_return_order \
--header 'Content-Type: application/json'
Don't forget to add your credentials in the header