Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
description: "\nKarrio is a multi-carrier shipping API that simplifies the integration of logistics carrier services.\n\nThe Karrio API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded\nrequest bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.\n\nThe Karrio API differs for every account as we release new versions.\nThese docs are customized to your version of the API.\n\n\n## Versioning\n\nWhen backwards-incompatible changes are made to the API, a new, dated version is released.\nThe current version is `2026.1.32`.\n\nRead our API changelog to learn more about backwards compatibility.\n\nAs a precaution, use API versioning to check a new API version before committing to an upgrade.\n\n\n## Environments\n\nThe Karrio API offer the possibility to create and retrieve certain objects in `test_mode`.\nIn development, it is therefore possible to add carrier connections, get live rates,\nbuy labels, create trackers and schedule pickups in `test_mode`.\n\n\n## Pagination\n\nAll top-level API resources have support for bulk fetches via \"list\" API methods. For instance, you can list addresses,\nlist shipments, and list trackers. These list API methods share a common structure, taking at least these\ntwo parameters: limit, and offset.\n\nKarrio utilizes offset-based pagination via the offset and limit parameters.\nBoth parameters take a number as value (see below) and return objects in reverse chronological order.\nThe offset parameter returns objects listed after an index.\nThe limit parameter take a limit on the number of objects to be returned from 1 to 100.\n\n\n```json\n{\n \"count\": 100,\n \"next\": \"/v1/shipments?limit=25&offset=50\",\n \"previous\": \"/v1/shipments?limit=25&offset=25\",\n \"results\": [\n { ... },\n ]\n}\n```\n\n## Metadata\n\nUpdateable Karrio objects—including Shipment and Order have a metadata parameter.\nYou can use this parameter to attach key-value data to these Karrio objects.\n\nMetadata is useful for storing additional, structured information on an object.\nAs an example, you could store your user's full name and corresponding unique identifier\nfrom your system on a Karrio Order object.\n\nDo not store any sensitive information as metadata.\n\n## Authentication\n\nAPI keys are used to authenticate requests. You can view and manage your API keys in the Dashboard.\n\nYour API keys carry many privileges, so be sure to keep them secure! Do not share your secret\nAPI keys in publicly accessible areas such as GitHub, client-side code, and so forth.\n\nAuthentication to the API is performed via HTTP Basic Auth. Provide your API token as\nthe basic auth username value. You do not need to provide a password.\n\n```shell\n$ curl https://instance.api.com/v1/shipments \\\n -u key_xxxxxx:\n# The colon prevents curl from asking for a password.\n```\n\nIf you need to authenticate via bearer auth (e.g., for a cross-origin request),\nuse `-H \"Authorization: Token key_xxxxxx\"` instead of `-u key_xxxxxx`.\n\nAll API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure).\nAPI requests without authentication will also fail.\n"
title: Karrio Shipments API
version: 2026.1.32
tags:
- name: Shipments
description: "This is an object representing your Karrio shipment.\n A Shipment guides you through process of preparing and purchasing a label for an order.\n A Shipment transitions through multiple statuses throughout its lifetime as the package\n shipped makes its journey to it's destination.\n "
paths:
/v1/shipments:
get:
operationId: $$$$$list
description: Retrieve all shipments.
summary: List all shipments
parameters:
- in: query
name: address
schema:
type: string
- in: query
name: carrier_name
schema:
type: string
description: 'The unique carrier slug. <br/>Values: `aramex`, `asendia`, `asendia_us`, `australiapost`, `boxknight`, `bpost`, `canadapost`, `canpar`, `chronopost`, `colissimo`, `dhl_express`, `dhl_parcel_de`, `dhl_poland`, `dhl_universal`, `dicom`, `dpd`, `dpd_meta`, `dtdc`, `easypost`, `easyship`, `eshipper`, `fedex`, `freightcom`, `generic`, `geodis`, `gls`, `hay_post`, `hermes`, `landmark`, `laposte`, `locate2u`, `mydhl`, `nationex`, `parcelone`, `postat`, `purolator`, `roadie`, `royalmail`, `sapient`, `seko`, `sendle`, `shipengine`, `smartkargo`, `spring`, `teleship`, `tge`, `tnt`, `ups`, `usps`, `usps_international`, `veho`, `zoom2u`'
- in: query
name: created_after
schema:
type: string
format: date-time
- in: query
name: created_before
schema:
type: string
format: date-time
- in: query
name: has_manifest
schema:
type: boolean
- in: query
name: has_tracker
schema:
type: boolean
- in: query
name: id
schema:
type: string
- in: query
name: is_archived
schema:
type: boolean
- in: query
name: is_return
schema:
type: boolean
- in: query
name: keyword
schema:
type: string
- in: query
name: meta_key
schema:
type: string
- in: query
name: meta_value
schema:
type: string
- in: query
name: metadata_key
schema:
type: string
- in: query
name: metadata_value
schema:
type: string
- in: query
name: option_key
schema:
type: string
- in: query
name: option_value
schema:
type: string
- in: query
name: order_id
schema:
type: string
- in: query
name: reference
schema:
type: string
- in: query
name: request_id
schema:
type: string
- in: query
name: service
schema:
type: string
- in: query
name: status
schema:
type: string
description: 'Valid shipment status. <br/>Values: `draft`, `created`, `cancelled`, `shipped`, `in_transit`, `delivered`, `needs_attention`, `out_for_delivery`, `delivery_failed`'
- in: query
name: tracking_number
schema:
type: string
tags:
- Shipments
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
x-operationId: listShipments
post:
operationId: $$$$$create
description: Create a new shipment instance.
summary: Create a shipment
tags:
- Shipments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShipmentData'
required: true
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'424':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessages'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
x-operationId: createShipment
/v1/shipments/{id}:
get:
operationId: $$$$$retrieve
description: Retrieve a shipment.
summary: Retrieve a shipment
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Shipments
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
x-operationId: retrieveShipment
put:
operationId: $$$$$update
description: 'This operation allows for updating properties of a shipment including `label_type`, `reference`, `payment`, `options` and `metadata`.
It is not for editing the parcels of a shipment.'
summary: Update a shipment
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Shipments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShipmentUpdateData'
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'424':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessages'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
x-operationId: updateShipment
/v1/shipments/{id}/cancel:
post:
operationId: $$$$$cancel
description: 'Void a shipment with the associated label.
``pk`` can be either the karrio shipment ID (``shp_…``) or a
``request_id`` stored in ``shipment.meta["request_id"]``.
When multiple records share the same ``request_id`` the most
recently created one is used.'
summary: Cancel a shipment
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Shipments
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'304':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'424':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessages'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
x-operationId: cancelShipment
/v1/shipments/{id}/documents/{doc}:
post:
operationId: $$$$$document
description: Retrieve a shipment document (label or invoice) as base64 encoded content.
summary: Retrieve a shipment document
parameters:
- in: path
name: doc
schema:
type: string
required: true
- in: path
name: id
schema:
type: string
required: true
tags:
- Shipments
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingDocument'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
x-operationId: retrieveShipmentDocument
/v1/shipments/{id}/purchase:
post:
operationId: $$$$$purchase
description: Select your preferred rates to buy a shipment label.
summary: Buy a shipment label
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Shipments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShipmentPurchaseData'
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'424':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessages'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
/v1/shipments/{id}/rates:
post:
operationId: $$$$$rates
description: Refresh the list of the shipment rates
summary: Fetch new shipment rates
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Shipments
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ShipmentRateData'
security:
- TokenBasic: []
- Token: []
- OAuth2: []
- JWT: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Shipment'
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
'424':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessages'
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: ''
components:
schemas:
ShipmentRateData:
type: object
properties:
services:
type:
- array
- 'null'
items:
type: string
description: "The requested carrier service for the shipment.<br/>\n Please consult [the reference](#operation/references) for specific carriers services.<br/>\n **Note that this is a list because on a Multi-carrier rate request you could\n specify a service per carrier.**\n "
carrier_ids:
type:
- array
- 'null'
items:
type: string
description: "The list of configured carriers you wish to get rates from.<br/>\n **Note that the request will be sent to all carriers in nothing is specified**\n "
options:
type: object
additionalProperties: {}
default: {}
description: "<details>\n <summary>The options available for the shipment.</summary>\n\n {\n \"currency\": \"USD\",\n \"insurance\": 100.00,\n \"insured_by\": \"carrier\",\n \"cash_on_delivery\": 30.00,\n \"dangerous_good\": true,\n \"declared_value\": 150.00,\n \"sms_notification\": true,\n \"email_notification\": true,\n \"email_notification_to\": \"shipper@mail.com\",\n \"hold_at_location\": true,\n \"locker_id\": \"123456789\",\n \"paperless_trade\": true,\n \"preferred_service\": \"fedex_express_saver\",\n \"shipment_date\": \"2020-01-01\", # TODO: deprecate\n \"shipping_date\": \"2020-01-01T00:00\",\n \"shipment_note\": \"This is a shipment note\",\n \"signature_confirmation\": true,\n \"saturday_delivery\": true,\n \"shipping_charges\": 10.00,\n \"doc_files\": [\n {\n \"doc_type\": \"commercial_invoice\",\n \"doc_file\": \"base64 encoded file\",\n \"doc_name\": \"commercial_invoice.pdf\",\n \"doc_format\": \"pdf\",\n }\n ],\n \"doc_references\": [\n {\n \"doc_id\": \"123456789\",\n \"doc_type\": \"commercial_invoice\",\n }\n ],\n }\n </details>\n "
reference:
type:
- string
- 'null'
description: The shipment reference
metadata:
type: object
additionalProperties: {}
description: User metadata for the shipment
Parcel:
type: object
properties:
id:
type: string
description: A unique identifier
weight:
type: number
format: double
description: The parcel's weight
width:
type:
- number
- 'null'
format: double
description: The parcel's width
height:
type:
- number
- 'null'
format: double
description: The parcel's height
length:
type:
- number
- 'null'
format: double
description: The parcel's length
packaging_type:
type:
- string
- 'null'
description: "The parcel's packaging type.<br/>\n **Note that the packaging is optional when using a package preset.**<br/>\n values: <br/>\n `envelope` `pak` `tube` `pallet` `small_box` `medium_box` `your_packaging`<br/>\n For carrier specific packaging types, please consult the reference.\n "
maxLength: 100
package_preset:
type:
- string
- 'null'
description: "The parcel's package preset.<br/>\n For carrier specific package presets, please consult the reference.\n "
maxLength: 100
description:
type:
- string
- 'null'
description: The parcel's description
maxLength: 250
content:
type:
- string
- 'null'
description: The parcel's content description
maxLength: 100
is_document:
type:
- boolean
- 'null'
default: false
description: Indicates if the parcel is composed of documents only
weight_unit:
enum:
- KG
- LB
- OZ
- G
type: string
x-spec-enum-id: 3a766910e8401666
description: The parcel's weight unit
dimension_unit:
enum:
- CM
- IN
- null
type:
- string
- 'null'
x-spec-enum-id: 41993cb8117c279c
description: The parcel's dimension unit
items:
type: array
items:
$ref: '#/components/schemas/Commodity'
description: The parcel items.
reference_number:
type:
- string
- 'null'
description: "The parcel reference number.<br/>\n (can be used as tracking number for custom carriers)\n "
maxLength: 100
freight_class:
type:
- string
- 'null'
description: The parcel's freight class for pallet and freight shipments.
maxLength: 6
options:
type: object
additionalProperties: {}
default: {}
description: "<details>\n <summary>Parcel specific options.</summary>\n\n {\n \"insurance\": \"100.00\",\n \"insured_by\": \"carrier\",\n }\n </details>\n "
meta:
type:
- object
- 'null'
additionalProperties: {}
description: "Template metadata for template identification.\n Structure: {\"label\": \"Standard Box\", \"is_default\": true}\n "
object_type:
type: string
default: parcel
description: Specifies the object type
required:
- weight
- weight_unit
Rate:
type: object
properties:
id:
type: string
description: A unique identifier
object_type:
type: string
default: rate
description: Specifies the object type
carrier_name:
type: string
description: The rate's carrier
carrier_id:
type: string
description: The targeted carrier's name (unique identifier)
currency:
type: string
description: The rate monetary values currency code
service:
type:
- string
- 'null'
description: The carrier's rate (quote) service
total_charge:
type: number
format: double
default: 0.0
description: "The rate's monetary amount of the total charge.<br/>\n This is the gross amount of the rate after adding the additional charges\n "
transit_days:
type:
- integer
- 'null'
description: The estimated delivery transit days
extra_charges:
type: array
items:
$ref: '#/components/schemas/Charge'
default: []
description: list of the rate's additional charges
estimated_delivery:
type:
- string
- 'null'
description: The delivery estimated date
meta:
type:
- object
- 'null'
additionalProperties: {}
description: provider specific metadata
test_mode:
type: boolean
description: Specified whether it was created with a carrier in test mode
required:
- carrier_id
- carrier_name
- test_mode
CustomsData:
type: object
properties:
commodities:
type: array
items:
$ref: '#/components/schemas/CommodityData'
description: The parcel content items
duty:
allOf:
- $ref: '#/components/schemas/Duty'
description: "The payment details.<br/>\n **Note that this is required for a Dutiable parcel shipped internationally.**\n "
duty_billing_address:
allOf:
- $ref: '#/components/schemas/AddressData'
description: The duty payor address.
content_type:
enum:
- documents
- gift
- sample
- merchandise
- return_merchandise
- other
- ''
- null
type:
- string
- 'null'
x-spec-enum-id: b8935f22b570da75
content_description:
type:
- string
- 'null'
incoterm:
enum:
- CFR
- CIF
- CIP
- CPT
- DAP
- DAF
- DDP
- DDU
- DEQ
- DES
- EXW
- FAS
- FCA
- FOB
- null
type:
- string
- 'null'
x-spec-enum-id: 61b2121fbcca17a7
description: The customs 'term of trade' also known as 'incoterm'
invoice:
type:
- string
- 'null'
description: The invoice reference number
maxLength: 50
invoice_date:
type:
- string
- 'null'
description: "The invoice date.<br/>\n Date Format: `YYYY-MM-DD`\n "
commercial_invoice:
type:
- boolean
- 'null'
description: Indicates if the shipment is commercial
certify:
type:
- boolean
- 'null'
description: Indicate that signer certified confirmed all
signer:
type:
- string
- 'null'
maxLength: 50
options:
type: object
additionalProperties: {}
default: {}
description: "<details>\n <summary>Customs identification options.</summary>\n\n {\n \"aes\": \"5218487281\",\n \"eel_pfc\": \"5218487281\",\n \"license_number\": \"5218487281\",\n \"certificate_number\": \"5218487281\",\n \"nip_number\": \"5218487281\",\n \"eori_number\": \"5218487281\",\n \"vat_registration_number\": \"5218487281\",\n }\n </details>\n "
required:
- commodities
ErrorMessages:
type: object
properties:
messages:
type: array
items:
$ref: '#/components/schemas/Message'
description: The list of error messages
Shipment:
type: object
properties:
id:
type: string
description: A unique identifier
object_type:
type: string
default: shipment
description: Specifies the object type
tracking_url:
type:
- string
- 'null'
format: uri
description: The shipment tracking url
shipper:
allOf:
- $ref: '#/components/schemas/Address'
description: "The address of the party.<br/>\n Origin address (ship from) for the **shipper**<br/>\n Destination address (ship to) for the **recipient**\n "
recipient:
allOf:
- $ref: '#/components/schemas/Address'
description: "The address of the party.<br/>\n Origin address (ship from) for the **shipper**<br/>\n Destination address (ship to) for the **recipient**\n "
return_address:
allOf:
- $ref: '#/components/schemas/Address'
description: The return address for this shipment. Defaults to the shipper address.
billing_address:
allOf:
- $ref: '#/components/schemas/Address'
description: The payor address.
parcels:
type: array
items:
$ref: '#/components/schemas/Parcel'
description: The shipment's parcels
services:
type:
- array
- 'null'
items:
type: string
default: []
description: "The carriers services requested for the shipment.<br/>\n Please consult the reference for specific carriers services.<br/>\n **Note that this is a list because on a Multi-carrier rate request you could specify a service per carrier.**\n "
options:
type: object
additionalProperties: {}
default: {}
description: "<details>\n <summary>The options available for the shipment.</summary>\n\n {\n \"currency\": \"USD\",\n \"insurance\": 100.00,\n \"cash_on_delivery\": 30.00,\n \"dangerous_good\": true,\n \"declared_value\": 150.00,\n \"sms_notification\": true,\n \"email_notification\": true,\n \"email_notification_to\": \"shipper@mail.com\",\n \"hold_at_location\": true,\n \"paperless_trade\": true,\n \"preferred_service\": \"fedex_express_saver\",\n \"shipment_date\": \"2020-01-01\", # TODO: deprecate\n \"shipping_date\": \"2020-01-01T00:00\",\n \"shipment_note\": \"This is a shipment note\",\n \"signature_confirmation\": true,\n \"saturday_delivery\": true,\n \"shipper_instructions\": \"This is a shipper instruction\",\n \"recipient_instructions\": \"This is a recipient instruction\",\n \"doc_files\": [\n {\n \"doc_type\": \"commercial_invoice\",\n \"doc_file\": \"base64 encoded file\",\n \"doc_name\": \"commercial_invoice.pdf\",\n \"doc_format\": \"pdf\",\n }\n ],\n \"doc_references\": [\n {\n \"doc_id\": \"123456789\",\n \"doc_type\": \"commercial_invoice\",\n }\n ],\n }\n </details>\n "
payment:
allOf:
- $ref: '#/components/schemas/Payment'
default:
paid_by: sender
currency: null
account_number: null
description: The payment details
customs:
allOf:
- $ref: '#/components/schemas/CustomsData'
description: "The customs details.<br/>\n **Note that this is required for the shipment of an international Dutiable parcel.**\n "
rates:
type: array
items:
$ref: '#/components/schemas/Rate'
default: []
description: The list for shipment rates fetched previously
reference:
type:
- string
- 'null'
description: The shipment reference
order_id:
type:
- string
- 'null'
description: The order identifier associated with this shipment
label_type:
enum:
- PDF
- ZPL
- PNG
# --- truncated at 32 KB (87 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/karrio/refs/heads/main/openapi/karrio-shipments-api-openapi.yml