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

Calculate shipping rates

post

This API endpoint retrieves a list of calculated shipping rates for the given items and shipping info

Authorizations
Body
Responses
200
Request completed successfully.
application/json
post
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

Show shipping types

get

This API endpoint retrieves a list of all available shipping types

Authorizations
Responses
200
Request completed successfully.
application/json
get
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

Show shipping methods

get

This API endpoint retrieves a list of all available shipping methods

Authorizations
Responses
200
Request completed successfully.
application/json
get
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

Show countries

get

This endpoint retrieves a list of countries with IDs and their corresponding codes.

Authorizations
Responses
200
Request completed successfully.
application/json
get
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

Show regions

get

This API endpoint retrieves the list of regions within a specific country by providing its ID.

Authorizations
Path parameters
country_idintegerRequired

ID of country from our system

Responses
200
Request completed successfully.
application/json
get
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

Key
Description

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