Within Duty API

Duty, tax and fees on an order shipped across a border.

GitHub OpenAPI

Operations 1

GET /duty/estimate Duty, tax and fees at the door #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/shopwithin-co:shopwithin-co-duty-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

shopwithin-co-duty-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Shopwithin Co Duty API
  version: 0.3.1
  contact:
    name: within
    url: https://shopwithin.co/contact
    email: hello@shopwithin.co
  termsOfService: https://shopwithin.co/terms
  x-privacy-policy: https://shopwithin.co/privacy
  description: 'Operations tagged duty across 2 of this provider''s published API definitions: openapi.json, shopwithin-co-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://shopwithin.co/api/v1
  description: within
tags:
- name: Duty
  description: Duty, tax and fees on an order shipped across a border.
paths:
  /duty/estimate:
    get:
      operationId: estimate_duty
      summary: Duty, tax and fees at the door
      description: 'Work out what clothing, shoes, a bag, jewellery, a watch or an accessory costs at the door when it is shipped to the US, Canada, the UK or Australia: the duty, any extra tariff on the country it was made in, the tax, the government and carrier fees, and the total. Every line names its official source and the day it was read, and the answer links the page on shopwithin.co/duty-calculator that shows it. Use this when someone asks about customs, duty, tariffs or import tax on an order from another country, or wants an import duty calculator. It is an estimate; the carrier''s bill is the final word.'
      tags:
      - Duty
      x-openai-isConsequential: false
      responses:
        '200':
          description: The answer.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - tool
                - text
                - data
                properties:
                  ok:
                    type: boolean
                    const: true
                  tool:
                    type: string
                    const: estimate_duty
                  text:
                    type: string
                    description: The answer as a short text an assistant can quote whole.
                  data:
                    type: object
                    properties:
                      found:
                        type: boolean
                      to:
                        type: string
                      currency:
                        type: string
                      status:
                        type: string
                      value:
                        type: number
                      lines:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                            detail:
                              type: string
                            amount:
                              anyOf:
                              - type: number
                              - type: string
                            sources:
                              type: array
                              items: {}
                          required:
                          - label
                          - amount
                          additionalProperties: false
                      owed_before_delivery: {}
                      tax_at_checkout: {}
                      total: {}
                      what_changes_it: {}
                      notes: {}
                      exchange_rate_date: {}
                      estimate_note:
                        type: string
                      note:
                        anyOf:
                        - type: string
                        - type: 'null'
                      page:
                        type: string
                    additionalProperties: false
        '400':
          description: 'The request could not be read: a missing or malformed argument. The error names it.'
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - error
                properties:
                  ok:
                    type: boolean
                    const: false
                  tool:
                    type:
                    - string
                    - 'null'
                  error:
                    type: string
                    description: What went wrong, in plain words.
        '429':
          description: 'Over the rate limit: a burst of 60 requests per address, then one a second.'
          headers:
            retry-after:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - error
                properties:
                  ok:
                    type: boolean
                    const: false
                  tool:
                    type:
                    - string
                    - 'null'
                  error:
                    type: string
                    description: What went wrong, in plain words.
        '502':
          description: The shelves could not be read just now. Try again in a moment.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - error
                properties:
                  ok:
                    type: boolean
                    const: false
                  tool:
                    type:
                    - string
                    - 'null'
                  error:
                    type: string
                    description: What went wrong, in plain words.
      parameters:
      - name: to
        in: query
        required: true
        description: Where the piece is shipped to.
        schema:
          type: string
          enum:
          - us
          - canada
          - uk
          - australia
          description: Where the piece is shipped to.
      - name: price
        in: query
        required: true
        description: The price, without shipping.
        schema:
          type: number
          exclusiveMinimum: 0
          maximum: 10000000
          description: The price, without shipping.
      - name: currency
        in: query
        required: true
        description: The currency of the price.
        schema:
          type: string
          enum:
          - CAD
          - USD
          - GBP
          - EUR
          - AUD
          description: The currency of the price.
      - name: kind
        in: query
        required: true
        description: 'What the piece is, one of: coat-wool, coat-cotton, coat-polyester, puffer-down, jacket-wool, jacket-cotton, jacket-polyester, jacket-leather, blazer-wool, blazer-cotton, blazer-polyester, trousers-wool, trousers-cotton, trousers-polyester, dress-wool, dress-cotton, dress-silk, dress-polyester, skirt-wool, skirt-cotton, skirt-polyester, shirt-cotton, shirt-silk, shirt-polyester, tshirt-cotton, tshirt-polyester, sweater-cashmere, sweater-wool, sweater-cotton, sweater-polyester, shoes-leather, sneakers-leather, boots-leather, sneakers-textile, bag-leather, bag-textile, wallet-leather, jewellery-gold, jewellery-silver, jewellery-costume, watch-automatic, watch-gold, belt-leather, scarf-silk, scarf-wool, tie-silk, sunglasses.'
        schema:
          type: string
          maxLength: 40
          description: 'What the piece is, one of: coat-wool, coat-cotton, coat-polyester, puffer-down, jacket-wool, jacket-cotton, jacket-polyester, jacket-leather, blazer-wool, blazer-cotton, blazer-polyester, trousers-wool, trousers-cotton, trousers-polyester, dress-wool, dress-cotton, dress-silk, dress-polyester, skirt-wool, skirt-cotton, skirt-polyester, shirt-cotton, shirt-silk, shirt-polyester, tshirt-cotton, tshirt-polyester, sweater-cashmere, sweater-wool, sweater-cotton, sweater-polyester, shoes-leather, sneakers-leather, boots-leather, sneakers-textile, bag-leather, bag-textile, wallet-leather, jewellery-gold, jewellery-silver, jewellery-costume, watch-automatic, watch-gold, belt-leather, scarf-silk, scarf-wool, tie-silk, sunglasses.'
      - name: department
        in: query
        required: false
        description: Women's or men's; some duty rates differ.
        schema:
          description: Women's or men's; some duty rates differ.
          type: string
          enum:
          - women
          - men
      - name: made_in
        in: query
        required: true
        description: Two letter country code of where it was made, e.g. IT, FR, CA, US, JP.
        schema:
          type: string
          minLength: 2
          maxLength: 2
          description: Two letter country code of where it was made, e.g. IT, FR, CA, US, JP.
      - name: ships_from
        in: query
        required: true
        description: Two letter country code of where it ships from.
        schema:
          type: string
          minLength: 2
          maxLength: 2
          description: Two letter country code of where it ships from.
      - name: ship_by
        in: query
        required: false
        description: 'us: fedex, courier or post. canada: fedex, courier or post. uk: royalmail, parcelforce or courier. australia: courier or post.'
        schema:
          description: 'us: fedex, courier or post. canada: fedex, courier or post. uk: royalmail, parcelforce or courier. australia: courier or post.'
          type: string
          maxLength: 20
      - name: region
        in: query
        required: false
        description: 'Canada only: the province code, e.g. ON, QC, BC.'
        schema:
          description: 'Canada only: the province code, e.g. ON, QC, BC.'
          type: string
          maxLength: 3
      - name: shipping
        in: query
        required: false
        description: Optional shipping cost, in the price's currency.
        schema:
          description: Optional shipping cost, in the price's currency.
          type: number
          minimum: 0
          maximum: 100000
      - name: weight_kg
        in: query
        required: false
        description: Optional weight; a few US lines add a charge per kilogram.
        schema:
          description: Optional weight; a few US lines add a charge per kilogram.
          type: number
          exclusiveMinimum: 0
          maximum: 100
      - name: usmca
        in: query
        required: false
        description: 'US only: true if a piece made in Canada or Mexico qualifies under USMCA.'
        schema:
          description: 'US only: true if a piece made in Canada or Mexico qualifies under USMCA.'
          type: boolean
    servers:
    - url: https://shopwithin.co/api/v1
      description: within
externalDocs:
  description: The server's documentation page
  url: https://shopwithin.co/agents
x-refined-from:
- openapi.json
- shopwithin-co-openapi.json