Ask A Question



Validation Failure Error in API response

Hello Easyship team, I am using your API in my website in curl format, so i have used the following code: ---------------------------------------------code starts here ------------------------------------------ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ""); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, "{ \"origin_country_alpha2\": \"SG\", \"origin_postal_code\": \"WC2N\", \"destination_country_alpha2\": \"US\", \"destination_postal_code\": \"10030\", \"taxes_duties_paid_by\": \"Sender\", \"is_insured\": false, \"items\": [ { \"actual_weight\": 1.2, \"height\": 10, \"width\": 15, \"length\": 20, \"category\": \"mobiles\", \"declared_currency\": \"SGD\", \"declared_customs_value\": 100 } ] }"); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type: application/json", "Authorization: Bearer 4e2b327e2ef5471885cd0bc50a0c9fe52481793bd309b2c4f2a6bdac3f10ae1f" )); $response = curl_exec($ch); curl_close($ch); var_dump($response); -------------------------------------------------- code ends here ---------------------------------------- but it is giving me the following response : "string(146) "{"rates":[],"messages":["Validation Failure: No credentials","Sorry, we couldn't find any shipping solutions based on the information provided."]}"" Please provide me a solution so that i can use it. thanks

Posted by Mohit about a year ago


Can't create shipment in Sandboc

Hi, I am software developer, i can't able to access the sandbox api. when i tried to create a shipment it throws bad request error. Request : URL : Method : POST Body : {"platform_name": "Shopify","platform_order_number": "Test07Aug001","destination_country_alpha2": "AU","selected_courier_id": "94c3cfc5-e6f1-4200-8dc5-eaef068e9ccd","destination_city": "Wetherill Park","destination_postal_code": "2164","destination_state": "NSW","destination_name": "Aloha Chen","destination_address_line_1": "TCT, Kamarajar Salai","destination_address_line_2": null,"destination_phone_number": "+1 234-567-890","destination_email_address": "[email protected]","items": [{"description": "Silk dress","sku": "test", "actual_weight": 1.2, "height": 10,"width": 15,"length": 20,"category": "fashion","declared_currency": "AUD","declared_customs_value": 100}]} Response : (400) Bad Request {"ActiveRecord::StatementInvalid":"PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block\n: INSERT INTO \"shipments\" (\"type\", \"company_id\", \"shipment_state\", \"pickup_state\", \"transaction_state\", \"label_state\", \"manifest_state\", \"delivery_state\", \"store_state\", \"warehouse_state\", \"fraud_state\", \"destination_name\", \"platform_order_number\", \"platform_name\", \"destination_country_id\", \"buyer_selected_courier_id\", \"address_line_1\", \"state\", \"city\", \"postal_code\", \"phone_number\", \"email_address\", \"store_id\", \"origin_country_id\", \"currency\", \"service\", \"sort_by\", \"tracking_engine\", \"easyship_shipment_id\", \"pickup_address_id\", \"created_at\", \"updated_at\") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32) RETURNING \"id\""}

Posted by Ram about a year ago