{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/aftership/main/json-schema/aftership-courier-response-v1-schema.json", "title": "Courier response", "description": "Model of all couriers endpoint response", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/aftership-courier-api-openapi.yml#/components/schemas/Courier_response.v1", "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/$defs/Meta.v1" }, "data": { "type": "object", "properties": { "total": { "type": "integer", "description": "Total count of courier objects" }, "couriers": { "description": "Array of [Courier](../../model/resource/courier.json) object.", "type": "array", "items": { "$ref": "#/$defs/Courier", "x-stoplight": { "id": "dh84q02xjf082" } } } } } }, "$defs": { "Additional_fields.v1": { "x-stoplight": { "id": "v0x73k8xspiqw" }, "type": "string", "title": "additional_fields", "description": "All available additional fields
", "enum": [ "tracking_account_number", "destination_postal_code", "destination_state", "tracking_key", "origin_country_region", "destination_country_region", "tracking_ship_date" ], "pattern": "^[a-z_0-9]+$" }, "Courier": { "x-stoplight": { "id": "dh84q02xjf082" }, "title": "Courier", "type": "object", "description": "Courier object\n\n", "x-tags": [ "Resource" ], "properties": { "slug": { "type": "string", "description": "Unique code of courier. Get the slugs from [here](../../reference/api.json/paths/~1couriers/get).", "pattern": "^[a-z0-9-]+$", "x-stoplight": { "id": "mzakwc7om47vb" } }, "name": { "type": "string", "description": "Name of courier", "x-stoplight": { "id": "6mknhl154gjzu" } }, "phone": { "type": [ "string", "null" ], "description": "Contact phone number of courier", "x-stoplight": { "id": "h48o2lon0t2fa" } }, "other_name": { "type": [ "string", "null" ], "description": "Other name of courier", "x-stoplight": { "id": "fbpgwz6ol8g3h" } }, "web_url": { "type": [ "string", "null" ], "description": "Website link of courier", "format": "uri", "x-stoplight": { "id": "baczpwcd13r99" } }, "required_fields": { "type": [ "array", "null" ], "description": "The extra fields need for tracking, such as `tracking_account_number`, `tracking_postal_code`, `tracking_ship_date`, `tracking_key`, `tracking_destination_country_region`", "minItems": 0, "x-stoplight": { "id": "5oa8tnsiixss8" }, "items": { "$ref": "#/$defs/Additional_fields.v1", "x-stoplight": { "id": "v0x73k8xspiqw" } } }, "optional_fields": { "type": [ "array", "null" ], "description": "The extra fields which are optional for tracking. Basically it's the same as required_fields, but the difference is that only some of the tracking numbers require these fields.", "minItems": 0, "x-stoplight": { "id": "mfv2fyoq3yvke" }, "items": { "$ref": "#/$defs/Additional_fields.v1", "x-stoplight": { "id": "bkwkfbsrhgwn5" } } }, "default_language": { "type": [ "string", "null" ], "description": "Default language of tracking results", "minLength": 2, "maxLength": 2, "pattern": "^[a-z]{2}$", "x-stoplight": { "id": "mdfm0cpgzgq0e" } }, "support_languages": { "type": [ "array", "null" ], "description": "Other supported languages", "minItems": 1, "x-stoplight": { "id": "w4rrvom5g6ggu" }, "items": { "type": "string", "minLength": 2, "maxLength": 2, "pattern": "^[a-z]{2}$", "x-stoplight": { "id": "1bneo988dbmbm" } } }, "service_from_country_regions": { "type": [ "array", "null" ], "description": "Country/Region code (ISO Alpha-3) where the courier provides service", "minItems": 1, "x-stoplight": { "id": "zlnhlze1c88mg" }, "items": { "type": "string", "minLength": 3, "maxLength": 3, "pattern": "^[A-Z]{3}$", "x-stoplight": { "id": "642xkrivaraks" } } }, "credentials": { "type": "object", "x-stoplight": { "id": "zvw9dpmmwxytx" }, "description": "Refers to the authentication details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to create a carrier connection. The content varies by carrier.", "properties": { "fields": { "type": "array", "x-stoplight": { "id": "a9kuffmc3pk61" }, "description": "Through this field, users can get the specific authentication information needed when creating a courier connection to one specific carrier, such as API keys, usernames, and passwords. Each field includes properties like name, data type, and whether it's required.", "items": { "$ref": "#/$defs/Credential_field", "x-stoplight": { "id": "pdnkudi6x3v5e" } } } } } } }, "Credential_field": { "x-stoplight": { "id": "pdnkudi6x3v5e" }, "title": "credential_field", "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "qeajuoafnpc4x" }, "description": "The display name of the credential field that users must provide when creating a carrier connection." }, "type": { "type": "string", "x-stoplight": { "id": "kl9858csb43ay" }, "description": "The data type of the credential field, indicating what kind of input is expected." }, "required": { "type": "boolean", "x-stoplight": { "id": "fe9gi4g81r95f" }, "description": "It indicates whether the credentials field must be provided or not when creating a carrier connection." } } }, "Meta.v1": { "title": "meta", "type": "object", "description": "Meta data", "required": [ "code" ], "properties": { "code": { "type": "integer", "description": "meta code" }, "message": { "type": "string", "description": "error message, only exist if the response status is not 2xx" }, "type": { "type": "string", "enum": [ "BadRequest", "Unauthorized", "Forbidden", "NotFound", "TooManyRequests", "InternalError" ], "description": "error type, only exist if the response status is not 2xx" } } } } }