Quote carrier services
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/orders/1/shipments/quote';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"weight_gr":1500,"length_cm":20,"width_cm":15,"height_cm":10,"cod_amount":0,"freight_payment_method":"cash","use_insurance":true,"note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://apibase.ecomweb.app/api/v1/stores/example/orders/1/shipments/quote \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "weight_gr": 1500, "length_cm": 20, "width_cm": 15, "height_cm": 10, "cod_amount": 0, "freight_payment_method": "cash", "use_insurance": true, "note": "example" }'Asks the AllinGo carrier for live prices of every service that can carry this order’s package, and books nothing. Send the package size, weight, COD amount and who pays the freight; the pickup and delivery addresses come from the store and the order. Each call contacts the carrier.
Required scopes: write:orders
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The order ID.
The store’s ref, as returned by GET /stores.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Grams
Example
1500Cm
Example
20Cm
Example
15Cm
Example
10VND to collect; 0 for prepaid
Example
0Note to the courier
Responses
Section titled “Responses”object
One entry per carrier service.
object
ID of the carrier service. Pass it as service_id when booking.
Name of the carrier service.
Code of the delivery partner.
Name of the delivery partner.
Logo URL of the delivery partner, or null.
Price of the service for this package.
Whether the service can carry this package.
Why the service is unavailable, or null.
Estimated delivery time as a label, such as 1-2 days, or null.
Example generated
{ "quotes": [ { "service_id": "example", "service_name": "example", "partner_code": "example", "partner_name": "example", "partner_logo_url": "example", "price": 1, "available": true, "error_code": "example", "estimated_label": "example" } ]}The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The request conflicts with the resource’s current state.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The request is valid but cannot be processed.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}