Discussions

Ask a Question

problem in api integration in php

hello, i want to integrate your api in php, when i pass static parameter inside CURLOPT_POSTFIELDS it works great but now problem is we have to pass multiple data using mysqli so i create one code with php all details are stored same as static in variable and when i tried to pass that varialbe inside CURLOPT_POSTFIELDS it is not working i am writing hre my code so please help me we are trying from since last 4 days, when i try to chat the dont have any answer, so please help us..here is the code. <?php $a = "{"; $a = $a."\\" . '"' . "origin_country_alpha2" . "\\" . '"' . ":" . "\\" . '"' . "SG" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "origin_postal_code" . "\\" . '"' . ":" . "\\" . '"' . "WC2N" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "destination_country_alpha2" . "\\" . '"' . ":" . "\\" . '"' . "US" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "destination_postal_code" . "\\" . '"' . ":" . "\\" . '"' . "90001" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "taxes_duties_paid_by" . "\\" . '"' . ":" . "\\" . '"' . "Sender" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "is_insured" . "\\" . '"' . ":" . "false" . ","; $a = $a . "\\" . '"' . "items" . "\\" . '"' . ":"; $a = $a . "["; $a = $a . "{"; $a = $a . "\\" . '"' . "actual_weight" . "\\" . '"' . ":" . "1.2" . ","; $a = $a . "\\" . '"' . "height" . "\\" . '"' . ":" . "10" . ","; $a = $a . "\\" . '"' . "width" . "\\" . '"' . ":" . "15" . ","; $a = $a . "\\" . '"' . "length" . "\\" . '"' . ":" . "20" . ","; $a = $a . "\\" . '"' . "category" . "\\" . '"' . ":" . "\\" . '"' . "mobiles" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "declared_currency" . "\\" . '"' . ":" . "\\" . '"' . "SGD" . "\\" . '"' . ","; $a = $a . "\\" . '"' . "declared_customs_value" . "\\" . '"' . ":" . "100"; $a = $a . "}"; $a = $a . "]"; $a = $a . "}"; $a=str_replace("<br>","",$a); echo $a; //$file = fopen("test.txt","w"); //fwrite($file,$a); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.easyship.com/rate/v1/rates"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS,$a); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type: application/json", "Authorization:Bearer sand_UnYzduaox5VgXzcBNMR+DROGpG/36KbaCBmmEjlVeUE=" )); $response = curl_exec($ch); curl_close($ch); var_dump($response); ?>

Plugin is adding the 'no-cache' header

We are using EasyShip plugin in our wordpress website https://kidzparadize.sg. The website is hosted in DreamHost hosting. DreamHost run their own proprietary caching system in all their servers. We found that Easyship plugin is adding the 'no-cache' header and using cookies for non-logged users. This cause several errors with the current caching system which lead to 504 Gateway Time-out to our website. The cookie can be bypassed in the caching system if we know specify the name we need to look for. But we need EasyShip wordpress plugin not to add 'no-cache' or 'must-revalidate'. Appreciate urgent reply as we been experience this issues quite a while. Thanks

Only 1 courier available for selection

We have our own FedEx courier account (with 9 services active) attached to our Easyship account, but it never shows up in the available couriers when creating a shipment or in the API rate/v1/rates call (rate/v1/rates). For example when we try to ship from The Netherlands to the USA we always only get the DHL option as a courier, which is very expensive and not logical as an option. The weird thing is that 2 weeks ago, when we had the free account and a different FedEx account, we would always get multiple options like: DHL, our FedEx service, Easyship FedEx. This is for both the API and manually adding a shipment in the dashboard. We have the Plus plan and there were no other changes made in our account that would cause this weird behavior. Thanks in advance.

Error when requesting a courier pickup - Magento-Easyship Booking Management

Hi all, Having an issue where a shipment is created and information is sent from Magento to EasyShip however receiving an error when trying to book the courier. Within Magento>Sales>EasyShip Booking Management reads 'Failed to create Pickup: Something went wrong when requesting a pickup to Couriers Please, please try later or contact Easyship Customer Service' Can anyone suggest how we can amend this so that we can book in future? Regards, Mark

Technical Documentation (Submitting an Electronic Invoice)

Hello all, the customer I am talking to is looking for docs on how they can code to this via our API. Are there docs I can share with this client to pass along to their product team?

EDI capability

Can your system interface with EDI transactions?

Webhook Response Not triggered(sandbox account)

I have already requested with an Ticket ID: 249674 I am Using the Sandbox URL for Testing My Application, I am using two API call for 1. Create Shipment API: https://api.easyship.com/shipment/v1/shipments 2. Confirm and by label: https://api.easyship.com/label/v1/labels 3. Webhook Created with an account: [email protected] (Endpoint URL to get it) But Still, I am not able to get the Webhook Label Response from the Endpoint URL .Please Provide a Solution ASAP.

Api error

i'm not able to test API. I'm using these datas { "origin_country_alpha2": "SG", "origin_postal_code": "059405", "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 } ] } and i have the this response {"rates":[],"messages":["Validation Failure: [\"Sorry, we can't estimate the taxes \u0026 duties for this country.\"]","Sorry, we couldn't find any shipping solutions based on the information provided."]} on sandbox and this one on prod {"rates":[],"messages":["Sorry, we couldn't find any shipping solutions based on the information provided."]} can you help me?

Shift4shop (formerly 3dcart) integration

Hello we are using shift 4 shop for our website and I am looking for step by step instructions on how to make easyship and our web host work together. I looked at the docs for API and I have created an API I guess but the access token is what I was given and I am not sure where that would go on shift4shop or how to manually input the api code into the website code I have. Is it even possible to integrate the two?

I have created shipment with test account(sandbox)

I am developing an easy ship extension using the Sandbox account credentials. I am not getting the shipment id when the shipment is created to get a label response is there any mandatory fields to be passed in order to get the label response for a particular courier Type ?. I want solid it solutions to generated label shipment carrier through the easy ship. I couldn't find an API related to this problem. Kindly provide a solution.