For the complete documentation index, see llms.txt. This page is also available as Markdown.

Shipping Cost

Manage shipping costs

Calculating the final shipping cost

post

The endpoint returns shipping methods, which contain the matching fee for all zones.

The storefront uses this endpoint to list available methods for a destination and cart total. Checkout Service calls the same endpoint again to re-price the selected method and zone.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Body

Example of payload for shipping cost calculation.

customerIdstringOptional

Customer unique identifier.

Responses
200

Shipping costs calculated.

application/json

Example quote response which contains a list of fees for various methods and delivery zone.

post/shipping/{tenant}/{site}/quote
POST /shipping/{tenant}/{site}/quote HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 419

{
  "customerId": "C001",
  "cartTotal": {
    "amount": 100.34,
    "currency": "USD"
  },
  "shipFromAddress": {
    "street": "Patterson Fork Road",
    "streetNumber": "2095",
    "zipCode": "60606",
    "city": "Chicago",
    "country": "US",
    "state": "IL"
  },
  "shipToAddress": {
    "street": "Cheng Xiang Zhen Guan Tang Lu",
    "streetNumber": "1031",
    "extraLine1": "No. 2058",
    "extraLine2": "Suzhou City",
    "zipCode": "201202",
    "city": "Taicang City",
    "state": "Jiangsu Province",
    "country": "CN"
  }
}
[
  {
    "zone": {
      "id": "europe",
      "name": {
        "en": "Europe",
        "de": "Europa"
      }
    },
    "methods": [
      {
        "id": "fedex-2dayground",
        "name": {
          "en": "FedEx 2Day",
          "de": "FedEx 2 Tage"
        },
        "fee": {
          "amount": 4.99,
          "currency": "EUR"
        }
      },
      {
        "id": "dhl",
        "name": "DHL",
        "fee": {
          "amount": 2.99,
          "currency": "EUR"
        }
      }
    ]
  },
  {
    "zone": {
      "id": "northamerica",
      "name": {
        "en": "North America",
        "de": "Nord Amerika"
      }
    },
    "methods": [
      {
        "id": "dhl-air",
        "name": {
          "en": "DHL Air",
          "de": "DHL Flug"
        },
        "fee": {
          "amount": 9.99,
          "currency": "EUR"
        }
      },
      {
        "id": "dhl-normal",
        "name": "DHL Normal",
        "fee": {
          "amount": 5.99,
          "currency": "EUR"
        }
      }
    ]
  }
]

Calculating the minimum shipping cost

post

Retrieves the minimum shipping cost for a destination and cart total.

Cart Service uses this endpoint to show an estimated shipping amount on the cart when no delivery window is set. Checkout Service does not call this endpoint.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Body

Example of payload for shipping cost calculation.

customerIdstringOptional

Customer unique identifier.

Responses
200

Shipping costs calculated.

application/json

Minimum available delivery fee for given parameters.

post/shipping/{tenant}/{site}/quote/minimum
POST /shipping/{tenant}/{site}/quote/minimum HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 419

{
  "customerId": "C001",
  "cartTotal": {
    "amount": 100.34,
    "currency": "USD"
  },
  "shipFromAddress": {
    "street": "Patterson Fork Road",
    "streetNumber": "2095",
    "zipCode": "60606",
    "city": "Chicago",
    "country": "US",
    "state": "IL"
  },
  "shipToAddress": {
    "street": "Cheng Xiang Zhen Guan Tang Lu",
    "streetNumber": "1031",
    "extraLine1": "No. 2058",
    "extraLine2": "Suzhou City",
    "zipCode": "201202",
    "city": "Taicang City",
    "state": "Jiangsu Province",
    "country": "CN"
  }
}
{
  "fee": {
    "amount": 4.99,
    "currency": "EUR"
  }
}

Calculating the shipping cost for a given slot

post

Retrieves the shipping cost related to a particular delivery slot.

Cart Service uses this endpoint to show an estimated shipping amount when the cart has a delivery window and a slot. This is not a checkout step.

Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
sitestringRequired

Site unique identifier. A site is a specific shop.

If the tenant owns only one shop, the value should be set to main.

Body

Example of payload for shipping cost calculation.

customerIdstringOptional

Customer unique identifier.

slotIdstringRequired

The `slotId`` which the quote should be calculated for.

deliveryWindowIdstringRequired

The delivery window id which the slot with selected shipping method exists for.

Responses
200

Shipping costs calculated.

application/json

Minimum available delivery fee for given parameters.

post/shipping/{tenant}/{site}/quote/slot
POST /shipping/{tenant}/{site}/quote/slot HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "customerId": "C0012",
  "cartTotal": {
    "amount": 100.34,
    "currency": "USD"
  },
  "deliveryWindowId": "123",
  "slotId": "456"
}
{
  "fee": {
    "amount": 4.99,
    "currency": "EUR"
  }
}

Last updated

Was this helpful?