Validate a return
POST {{baseUrl}}/returns/validate
This endpoint allows you to validate whether a return can be announced without actually creating the return or announcing it with the carrier. You can structure the request body exactly as you would if you were making a request to the Create a return
endpoint.
When you make the request, the response will indicate whether the parcel is valid and can be announced. Validation is based mainly on the to
and from
address, the parcel weight
and the shipping product id
provided.
Note: The parcel_items
field is mandatory if you're creating a return from outside-EU.
Request Body
{"from_address"=>{"name"=>"<string>", "company_name"=>"<string>", "address_line_1"=>"<string>", "house_number"=>"<string>", "address_line_2"=>"<string>", "postal_code"=>"<string>", "city"=>"<string>", "po_box"=>"<string,null>", "state_province_code"=>"<string>", "country_code"=>"<string>", "email"=>"<email>", "phone_number"=>"<string>"}, "to_address"=>{"name"=>"<string>", "company_name"=>"<string>", "address_line_1"=>"<string>", "house_number"=>"<string>", "address_line_2"=>"<string>", "postal_code"=>"<string>", "city"=>"<string>", "po_box"=>"<string,null>", "state_province_code"=>"<string>", "country_code"=>"<string>", "email"=>"<email>", "phone_number"=>"<string>"}, "ship_with"=>{"shipping_product_code"=>"<string>", "functionalities"=>{"age_check"=>18, "b2b"=>"<boolean>", "b2c"=>"<boolean>", "boxable"=>"<boolean>", "bulky_goods"=>"<boolean>", "carrier_billing_type"=>"zonal", "cash_on_delivery"=>"<integer,null>", "dangerous_goods"=>"<boolean>", "delivery_attempts"=>"<integer,null>", "delivery_before"=>"3317", "delivery_deadline"=>"within_72h", "direct_contract_only"=>"<boolean>", "eco_delivery"=>"<boolean>", "first_mile"=>"pickup", "flex_delivery"=>"<boolean>", "form_factor"=>"mailbox", "fragile_goods"=>"<boolean>", "fresh_goods"=>"<boolean>", "harmonized_label"=>"<boolean>", "id_check"=>"<boolean>", "incoterm"=>nil, "insurance"=>"<integer,null>", "last_mile"=>"home_delivery", "manually"=>"<boolean>", "multicollo"=>"<boolean>", "neighbor_delivery"=>"<boolean>", "non_conveyable"=>"<boolean>", "personalized_delivery"=>"<boolean>", "premium"=>"<boolean>", "priority"=>"economical", "registered_delivery"=>"<boolean>", "returns"=>"<boolean>", "segment"=>"c", "service_area"=>nil, "signature"=>"<boolean>", "size"=>"xl", "sorted"=>"<boolean>", "surcharge"=>"<boolean>", "tracked"=>"<boolean>", "tyres"=>"<boolean>", "weekend_delivery"=>"weekends", "ers"=>"<boolean>", "pick_up"=>"<boolean>", "labelless"=>"<boolean>"}, "contract"=>"<integer>"}, "weight"=>{"value"=>"<number>", "unit"=>"g"}, "dimensions"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"in"}, "collo_count"=>1, "parcel_items"=>[{"description"=>"<string>", "quantity"=>"<integer>", "weight"=>{"value"=>"<number>", "unit"=>"kg"}, "value"=>{"value"=>"<number>", "currency"=>"EUR"}, "hs_code"=>"<string>", "origin_country"=>"<string>", "sku"=>"<string>", "product_id"=>"<string>", "return_reason_id"=>"<string,null>", "return_message"=>"<string,null>"}, {"description"=>"<string>", "quantity"=>"<integer>", "weight"=>{"value"=>"<number>", "unit"=>"oz"}, "value"=>{"value"=>"<number>", "currency"=>"GBP"}, "hs_code"=>"<string>", "origin_country"=>"<string>", "sku"=>"<string>", "product_id"=>"<string>", "return_reason_id"=>"<string,null>", "return_message"=>"<string,null>"}], "send_tracking_emails"=>false, "brand_id"=>"<integer>", "total_insured_value"=>{"value"=>"<number>", "currency"=>"EUR"}, "order_number"=>"<string>", "total_order_value"=>{"value"=>"<number>", "currency"=>"USD"}, "external_reference"=>"<string>", "customs_invoice_nr"=>"<string,null>", "delivery_option"=>"drop_off_point", "customs_information"=>nil}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"is_valid":"\u003cboolean\u003e","return_data":{"from_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"to_address":{"name":"\u003cstring\u003e","company_name":"\u003cstring\u003e","address_line_1":"\u003cstring\u003e","house_number":"\u003cstring\u003e","address_line_2":"\u003cstring\u003e","postal_code":"\u003cstring\u003e","city":"\u003cstring\u003e","po_box":"\u003cstring,null\u003e","state_province_code":"\u003cstring\u003e","country_code":"\u003cstring\u003e","email":"\u003cemail\u003e","phone_number":"\u003cstring\u003e"},"ship_with":{"shipping_product_code":"\u003cstring\u003e","functionalities":{"age_check":16,"b2b":"\u003cboolean\u003e","b2c":"\u003cboolean\u003e","boxable":"\u003cboolean\u003e","bulky_goods":"\u003cboolean\u003e","carrier_billing_type":"country","cash_on_delivery":"\u003cinteger,null\u003e","dangerous_goods":"\u003cboolean\u003e","delivery_attempts":"\u003cinteger,null\u003e","delivery_before":"3757","delivery_deadline":null,"direct_contract_only":"\u003cboolean\u003e","eco_delivery":"\u003cboolean\u003e","first_mile":"pickup","flex_delivery":"\u003cboolean\u003e","form_factor":"parcel","fragile_goods":"\u003cboolean\u003e","fresh_goods":"\u003cboolean\u003e","harmonized_label":"\u003cboolean\u003e","id_check":"\u003cboolean\u003e","incoterm":"dap","insurance":"\u003cinteger,null\u003e","last_mile":"mailbox","manually":"\u003cboolean\u003e","multicollo":"\u003cboolean\u003e","neighbor_delivery":"\u003cboolean\u003e","non_conveyable":"\u003cboolean\u003e","personalized_delivery":"\u003cboolean\u003e","premium":"\u003cboolean\u003e","priority":"express","registered_delivery":"\u003cboolean\u003e","returns":"\u003cboolean\u003e","segment":null,"service_area":"domestic","signature":"\u003cboolean\u003e","size":"xs","sorted":"\u003cboolean\u003e","surcharge":"\u003cboolean\u003e","tracked":"\u003cboolean\u003e","tyres":"\u003cboolean\u003e","weekend_delivery":"weekends","ers":"\u003cboolean\u003e","pick_up":"\u003cboolean\u003e","labelless":"\u003cboolean\u003e"},"contract":"\u003cinteger\u003e"},"weight":"\u003cnumber\u003e","dimensions":{"height":"\u003cnumber\u003e","width":"\u003cnumber\u003e","length":"\u003cnumber\u003e"},"collo_count":1,"parcel_items":[{"description":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","weight":{"value":"\u003cnumber\u003e","unit":"kg"},"value":{"value":"\u003cnumber\u003e","currency":"GBP"},"hs_code":"\u003cstring\u003e","origin_country":"\u003cstring\u003e","sku":"\u003cstring\u003e","product_id":"\u003cstring\u003e","return_reason_id":"\u003cstring,null\u003e","return_message":"\u003cstring,null\u003e"},{"description":"\u003cstring\u003e","quantity":"\u003cinteger\u003e","weight":{"value":"\u003cnumber\u003e","unit":"kg"},"value":{"value":"\u003cnumber\u003e","currency":"EUR"},"hs_code":"\u003cstring\u003e","origin_country":"\u003cstring\u003e","sku":"\u003cstring\u003e","product_id":"\u003cstring\u003e","return_reason_id":"\u003cstring,null\u003e","return_message":"\u003cstring,null\u003e"}],"send_tracking_emails":false,"brand_id":"\u003cinteger\u003e","total_insured_value":{"value":"\u003cnumber\u003e","currency":"GBP"},"order_number":"\u003cstring\u003e","total_order_value":{"value":"\u003cnumber\u003e","currency":"EUR"},"external_reference":"\u003cstring\u003e","customs_shipment_type":2,"delivery_option":"in_store"}}