Shipping
Introduction
Through the endpoints included in the Shipping section, you will be able to:
Calculate shipping rate for a given country and variant with specified quantity
Retrieve information about the shipping types
Retrieve information about the shipping methods
Retrieve a list of countries in our system
Retrieve a list of regions in a specific country
Endpoints
Shipping rates
This API endpoint retrieves a list of calculated shipping rates for the given items and shipping info
POST /api/beta/shipping/rates HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"shipping": {
"country": 276
},
"items": [
{
"quantity": 5,
"variant_id": 4
}
]
}
{
"data": [
{
"code": "DHL",
"name": "DHL",
"price": 6.02,
"price_details": {
"currency": "EUR",
"formatted": "6.02 €",
"in_subunit": 602
}
},
{
"code": "DHL",
"name": "DHL",
"price": 6.02,
"price_details": {
"currency": "EUR",
"formatted": "6.02 €",
"in_subunit": 602
}
}
]
}
Shipping types
This API endpoint retrieves a list of all available shipping types
GET /api/beta/shipping/types HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"priority": 1,
"code": "UNTRACKED"
},
{
"priority": 2,
"code": "TRACKED"
}
]
}
Shipping methods
This API endpoint retrieves a list of all available shipping methods
GET /api/beta/shipping/methods HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"code": "GEL",
"name": "GEL"
},
{
"code": "UPS",
"name": "UPS"
}
]
}
Countries
This endpoint retrieves a list of countries with IDs and their corresponding codes.
GET /api/beta/countries HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"name": "Germany",
"country_id": 276,
"country_code": "DE"
},
{
"name": "Latvia",
"country_id": 428,
"country_code": "LV"
}
]
}
Regions
This API endpoint retrieves the list of regions within a specific country by providing its ID.
ID of country from our system
GET /api/beta/regions/{country_id} HTTP/1.1
Host: api.merchone.com
Authorization: Basic username:password
Accept: */*
{
"data": [
{
"id": 52,
"code": "AB",
"name": "Alberta"
},
{
"id": 53,
"code": "LB",
"name": "Labrador"
}
]
}
Parameters
shipping
An object that contains the country property.
shipping.country
The ID of the country from our system, check /api/beta/countries
for more information about the countries.
items
An array of objects that contains information about the quantity and variant.
items.*.quantity
Quantity of a variant.
items.*.variant_id
The ID of the variant, please check /api/beta/products/{product_id}
for more details about the variants.
Last updated