---
title: "Calculate shipping"
method: POST
path: "/calculate/shipping"
tags: ["calculate"]
---

# Calculate shipping

`POST /calculate/shipping`

Calculates shipping for the cart.

## Request body

- object
  - `country` string, required — Country is required to calculate shipping.
  - `state` string — State is optional.
  - `city` string — City is optional.
  - `postcode` string — Postcode/ZIP is optional.
  - `return_methods` boolean — Return shipping methods after calculation.

## Response `200`

Shipping calculated successfully.

- union
  - string
  - ShippingMethod
    - `key` string
    - `method_id` string
    - `instance_id` integer
    - `label` string
    - `cost` number
    - `html` string
    - `taxes` object
    - `chosen_method` boolean

## Other responses

- `404` — Invalid postcode or missing country.

---

[API](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication.md) · [All operations](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cocartapi/cocart-jwt-authentication/versions/2031b047ca5f/schema)
