Discussions
Unable to create shipment with missing contact phone in destination address
Here is the payload:
{"destination_address":{"line_1":"XXX","line_2":"","state":"KY","city":"CORBIN","postal_code":"40701-7440","country_alpha2":"US","contact_name":"XXX XXX","contact_phone":null,"contact_email":"[email protected]"},"metadata":{"shipment_id":326689},"order_data":{"platform_name":"Amazon","platform_order_number":"112-6472843-7173009"},"shipping_settings":{"units":{"weight":"lb","dimensions":"in"}},"parcels":[{"items":[{"dimensions":{"length":1,"width":1,"height":1},"description":"Health Fitness Tracker","category":"Accessory (with battery)","sku":"XXXX","quantity":2,"actual_weight":0.325,"declared_currency":"USD","declared_customs_value":60}]}],"origin_address":{"line_1":"XXXX","line_2":"","state":"IL","city":"Gurnee","postal_code":"60031","country_alpha2":"US","company_name":"XXX","contact_name":"XXX","contact_phone":"XXXXXXXXX","contact_email":"[email protected]"}}
And here is the response:
{"error":{"code":"invalid_content","details":["destination_address.contact_phone can't be blank"],"links":[{"kind":"documentation","name":"Errors","url":"https://developers.easyship.com/reference/errors"},{"kind":"documentation","name":"Create a Shipment","url":"https://developers.easyship.com/reference/shipments_create"},{"kind":"how-to-guide","name":"How to Automate your Shipments","url":"https://developers.easyship.com/docs/how-to-automate-your-shipments"}],"message":"The request body content is not valid.","request_id":"d085bc488ada19fd65aa505f29650f4c","type":"invalid_request_error"}}
According to the documentation null
is a valid value for phone number: https://developers.easyship.com/reference/shipments_create