Discussions

Ask a Question
ANSWERED

I am unable to request /api/rates endpoints

app.get('/api/rates', (request, response) => { response.setHeader("Access-Control-Allow-Origin", "\*"); response.header( "Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept" ); const options = { method: 'POST', url: '<https://api.easyship.com/2023-01/rates'>, headers: { accept: 'application/json', 'content-type': 'application/json', authorization: '<my production toke>' }, data: { origin_address: { line_1: 'Kennedy Town', line_2: 'Block 3', state: 'Yuen Long', city: 'Hong Kong', postal_code: '0000', country_alpha2: 'HK', contact_name: 'Foo Bar', company_name: null, contact_phone: null, contact_email: '[[email protected]](mailto:[email protected])' }, destination_address: { country_alpha2: 'HK', line_1: 'Kennedy Town', line_2: 'Block 3', state: 'Yuen Long', city: 'Hong Kong', postal_code: '0000', contact_name: 'Foo Bar', company_name: null, contact_phone: null, contact_email: '[[email protected]](mailto:[email protected])' }, incoterms: 'DDU', insurance: {is_insured: false}, courier_selection: {show_courier_logo_url: true, apply_shipping_rules: true}, shipping_settings: {units: {weight: 'kg', dimensions: 'cm'}, custom_markup_rate: 0.1}, parcels: \[ { box: null, items: [ { quantity: 2, dimensions: {length: 1, width: 2, height: 3}, description: 'item', category: 'fashion', sku: 'sku', origin_country_alpha2: 'HK', actual_weight: 10, declared_currency: 'USD', declared_customs_value: 20 } ], total_actual_weight: 1 } ] } }; axios .request(options) .then(function (response) { response.send(response.data); }) .catch(function (error) { response.send(error); }); }) The response that I am getting: {"message":"Request failed with status code 403","name":"AxiosError","stack":"AxiosError: Request failed with status code 403\\n at settle (\\axios.cjs:1970:12)\\n at BrotliDecompress.handleStreamEnd (C:\\Users\\BlackHat\\Documents\\WebProjects\\github\\projects\\Vamoby\\backend\\node_modules\\axios\\dist\\node\\axios.cjs:3069:11)\\n at BrotliDecompress.emit (node:events:526:35)\\n at endReadableNT (node:internal/streams/readable:1359:12)\\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json","Content-Type":"application/json","authorization":"Bearer sand_93QscCPXsq/1mrqXt+erJeefUoKTuwD1DDIT7h5o7BM=","User-Agent":"axios/1.6.5","Content-Length":"982","Accept-Encoding":"gzip, compress, deflate, br"},"method":"post","url":"<https://api.easyship.com/2023-01/rates","data":"{\"origin_address\":{\"line_1\":\"Kennedy> Town\",\"line_2\":\"Block 3\",\"state\":\"Yuen Long\",\"city\":\"Hong Kong\",\"postal_code\":\"0000\",\"country_alpha2\":\"HK\",\"contact_name\":\"Foo Bar\",\"company_name\":null,\"contact_phone\":null,\"contact_email\":\"[[email protected]](mailto:[email protected])\"},\"destination_address\":{\"country_alpha2\":\"HK\",\"line_1\":\"Kennedy Town\",\"line_2\":\"Block 3\",\"state\":\"Yuen Long\",\"city\":\"Hong Kong\",\"postal_code\":\"0000\",\"contact_name\":\"Foo Bar\",\"company_name\":null,\"contact_phone\":null,\"contact_email\":\"[[email protected]](mailto:[email protected])\"},\"incoterms\":\"DDU\",\"insurance\":{\"is_insured\":false},\"courier_selection\":{\"show_courier_logo_url\":true,\"apply_shipping_rules\":true},\"shipping_settings\":{\"units\":{\"weight\":\"kg\",\"dimensions\":\"cm\"},\"custom_markup_rate\":0.1},\"parcels\":\[{\"box\":null,\"items\":[{\"quantity\":2,\"dimensions\":{\"length\":1,\"width\":2,\"height\":3},\"description\":\"item\",\"category\":\"fashion\",\"sku\":\"sku\",\"origin_country_alpha2\":\"HK\",\"actual_weight\":10,\"declared_currency\":\"USD\",\"declared_customs_value\":20}],\"total_actual_weight\":1}]}"},"code":"ERR_BAD_REQUEST","status":403} *** The error Request failed with status code 403 (not authorized!!!) { "error": { "code": "forbidden", "details": [ "Access to this resource requires scope(s) rate, custom_markup_rate." ], "message": "You do not have permission to access this resource. Please contact our support team or your account manager if you believe you should have access.", "request_id": "70e7fd2c1e8646ad5f873fe858cb133c", "type": "invalid_request_error" } }
ANSWERED

Australia DDP DDU setting is not available?

Hello, is DDP DDU not required for imports to Australia? We are setting it manually via API, the came code works for the UK so not sure why it does not work for AU, we assume the country code for Australia is 'AU' We have also tried manually creating a shipment and the taxpayer setting is not reflected correctly, it is always DDU, (we would like DDP) on the easyship shipment details for the package it is stated as 'Import Tax & Duty: Not required' Is this correct? is it not possible to set the DDP/ DDU for Australia? Seems weird and this is for all couriers DHL, FEDEX, UPS ``` if ($order->country->code === 'GB') { if ($order->tax_amount != 0) { $body['consignee_tax_id'] = 'xxxxxxxxxxxxx'; $body['incoterms'] = 'DDP'; } else { $body['consignee_tax_id'] = null; $body['incoterms'] = 'DDU'; } } elseif ($order->country->code === 'AU') { if ($order->subtotal < 95000) { $body['incoterms'] = 'DDP'; } else { $body['incoterms'] = 'DDU'; } } ``` the code works for GB labels and the variables are correct, please can you confirm if this is an Easyship issue and not our code! Best regards

Use USPS delivery confirmation service when create a shipment

Hello Team, I want to use USPS delivery confirmation service through your shipment creation API. Does your API support this? I found the delivery_confirmation key but its value does not have the USPS value. I need the USPS value to use that service.

Using the "set_as_residential: true" in the "rates_request" api route, doesn't work.

I've posted this in a 3 year old thread which was marked as answered and I'm afraid that it will not be addressed due to seeing other questions after the ticket was marked answered left without the reply. So starting new one, in hopes to receive a reply from EasyShip Team. In our frontend ecommerce flow, we present customers with shipping rates and allow them to choose their preferred shipping company/method. Our API requests for rates consistently include the parameter "set_as_residential = true". However, we recently faced a puzzling situation. An order was processed with a delivery charge of $48.80. Our system initially captures the order and the customer’s payment for the chosen shipping rate. Following this, our admin team verifies the order and then forwards (using API) the order to EasyShip for label generation and to arrange pickup from our warehouse. In this specific instance, despite having "set_as_residential = true" in both requests (front-end and back-end), an additional Residential surcharge of $2.75 was added to the shipment as displayed on the EasyShip dashboard only on the back-end request. This occurrence is perplexing as the "set_as_residential" parameter was correctly set to true in both instances, and our customers do not have the option to alter this setting (we do not provide any UI controls for customers to switch between residential and non-residential settings). We would greatly appreciate it if a member of the EasyShip team could provide insights into why this additional surcharge was NOT applied in rates rates_request API route, and assist us in understanding how to prevent such discrepancies in the future. Thank you for your attention to this matter.
ANSWERED

Created Shipments showing in API call, but not Dashboard

I'm trying to create shipments on a client's website and they would then use the easyship dashboard from there to complete the process. The shipments create fine (201) and I can see them if I use the endpoint to pull all the shipments, but I don't see them in the Dashboard view. Am I missing something on how this is supposed to work? I'm using the prod key.
ANSWERED

Tennis Bot -> Aktyva - Shipment and Pick Up Bookings

Good day! Please be advised that we are finalizing our new website and it will be using the Shopify platform. We have already integrated with the shipping API. We would like to understand how the pickups of our shipments will be scheduled. Please find below our questions. - Is the pickup automatically scheduled as part of booking the shipment via the API? - If yes, what are the terms? (can you specify days, times, etc.) - If not, how does this work?
ANSWERED

Create a shipment - 202 response

We were told last week that the 202 response we were getting was because we were using the sandbox. We are using the production key and still getting 202 responses. Can you review this shipment id and tell us what we are doing wrong: ``` "easyship_shipment_id": "ESUS175182037", ``` We would love to pay for this service but can't get it to work! Please help!
ANSWERED

My BackerKit orders aren't pulling through

My BackerKit orders aren't pulling through to Easyship. Can you help today please?
ANSWERED

Create a shipment API call - no valid responses

I had asked this question 3 days ago and no one responded. We have tried using the sandbox and spent 10-15 hours trying to get a valid response on the "create a shipment" api call. We have tried thousands of combinations of data and no matter what we do we never get anything other than a 202 response. The 202 response also doesn't show us why no couriers are providing rates. Happy to provide our API code if there is anyone who can help us with this.
ANSWERED

API-Based Creation of Return Shipments without Forward Shipment Dependency

While developing Easyship APIs, we discovered a limitation—return shipments can only be created if there's an existing forward shipment in Easyship. To address this, we created forward shipment and included additional information like "RETURNS" and "RETURNED GOODS" on the label. Return Shipment API - <https://developers.easyship.com/reference/return_shipments_create> The initial shipment and label creation were successful; however, an issue arose when the customs declaration categorized the goods as "sale of goods" instead of "returned goods," leading to unexpected customs charges. This is due to shipment being created as forward shipment and we have no control over what to mark in category on customs declaration. This poses a challenge for us as we seek to fetch rates and generate return shipments independently, without relying on a pre-existing shipment. Is there any way we can create return shipments without replying on a pre-existing shipment in easyship?