shipengine-json-schema
Version:
The official JSON Schemas for ShipEngine™
1,642 lines • 62.1 kB
JSON
{
"$id": "update_shipment_response_body",
"title": "update_shipment_response_body",
"type": "object",
"required": [
"errors",
"has_errors",
"address_validation",
"shipment_id",
"carrier_id",
"service_code",
"ship_date",
"created_at",
"shipment_status",
"ship_to",
"ship_from",
"return_to",
"confirmation",
"customs",
"advanced_options",
"insurance_provider",
"tags",
"packages",
"total_weight"
],
"additionalProperties": false,
"allOf": [
{
"title": "create_and_validate_shipment",
"type": "object",
"additionalProperties": false,
"allOf": [
{
"title": "partial_shipment",
"type": "object",
"additionalProperties": false,
"properties": {
"shipment_id": {
"allOf": [
{
"title": "se_id",
"type": "string",
"minLength": 1,
"maxLength": 25,
"pattern": "^se(-[a-z0-9]+)+$"
}
]
},
"carrier_id": {
"allOf": [
{
"title": "se_id",
"type": "string",
"minLength": 1,
"maxLength": 25,
"pattern": "^se(-[a-z0-9]+)+$"
}
]
},
"service_code": {
"allOf": [
{
"title": "service_code",
"type": "string",
"pattern": "^[a-z0-9]+(_[a-z0-9-]+)* ?$"
}
]
},
"external_order_id": {
"type": "string"
},
"items": {
"type": "array",
"default": [],
"items": {
"allOf": [
{
"title": "shipment_item",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 0
},
"sales_order_id": {
"type": "string"
},
"sales_order_item_id": {
"type": "string"
},
"quantity": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"sku": {
"type": "string"
},
"external_order_id": {
"type": "string"
},
"external_order_item_id": {
"type": "string"
},
"asin": {
"type": "string",
"minLength": 10,
"maxLength": 10
},
"order_source_code": {
"allOf": [
{
"title": "order_source_name",
"type": "string",
"enum": [
"amazon_ca",
"amazon_us",
"brightpearl",
"channel_advisor",
"cratejoy",
"ebay",
"etsy",
"jane",
"groupon_goods",
"magento",
"paypal",
"seller_active",
"shopify",
"stitch_labs",
"squarespace",
"three_dcart",
"tophatter",
"walmart",
"woo_commerce",
"volusion"
]
}
]
}
}
}
]
}
},
"tax_identifiers": {
"type": "array",
"items": {
"allOf": [
{
"title": "tax_identifier",
"type": "object",
"additionalProperties": false,
"required": [
"taxable_entity_type",
"identifier_type",
"issuing_authority",
"value"
],
"properties": {
"taxable_entity_type": {
"allOf": [
{
"title": "taxable_entity_type",
"type": "string",
"enum": [
"shipper",
"recipient"
]
}
]
},
"identifier_type": {
"allOf": [
{
"title": "identifier_type",
"type": "string",
"enum": [
"vat",
"eori",
"ssn",
"ein",
"tin",
"ioss",
"pan",
"voec"
]
}
]
},
"issuing_authority": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
]
}
},
"external_shipment_id": {
"type": "string",
"maxLength": 50
},
"ship_date": {
"allOf": [
{
"title": "date",
"type": "string",
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[-+]\\d{2}:\\d{2}))?$"
}
]
},
"created_at": {
"allOf": [
{
"title": "date_time",
"type": "string",
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[-+]\\d{2}:\\d{2})$"
}
]
},
"modified_at": {
"allOf": [
{
"title": "date_time",
"type": "string",
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[-+]\\d{2}:\\d{2})$"
}
]
},
"shipment_status": {
"default": "pending",
"allOf": [
{
"title": "shipment_status",
"type": "string",
"enum": [
"pending",
"processing",
"label_purchased",
"cancelled"
]
}
]
},
"ship_to": {
"allOf": [
{
"title": "address",
"type": "object",
"required": [
"name",
"phone",
"address_line1",
"city_locality",
"state_province",
"postal_code",
"country_code",
"address_residential_indicator"
],
"additionalProperties": false,
"allOf": [
{
"title": "partial_address",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"phone": {
"type": "string",
"minLength": 1
},
"company_name": {
"type": "string",
"minLength": 1
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string",
"minLength": 1
},
"address_line3": {
"type": "string",
"minLength": 1
},
"city_locality": {
"type": "string",
"minLength": 1
},
"state_province": {
"type": "string",
"minLength": 1
},
"postal_code": {
"allOf": [
{
"title": "postal_code",
"minLength": 1,
"type": "string"
}
]
},
"country_code": {
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"address_residential_indicator": {
"default": "unknown",
"allOf": [
{
"title": "address_residential_indicator",
"type": "string",
"enum": [
"unknown",
"yes",
"no"
]
}
]
}
}
}
]
}
]
},
"ship_from": {
"allOf": [
{
"title": "address",
"type": "object",
"required": [
"name",
"phone",
"address_line1",
"city_locality",
"state_province",
"postal_code",
"country_code",
"address_residential_indicator"
],
"additionalProperties": false,
"allOf": [
{
"title": "partial_address",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"phone": {
"type": "string",
"minLength": 1
},
"company_name": {
"type": "string",
"minLength": 1
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string",
"minLength": 1
},
"address_line3": {
"type": "string",
"minLength": 1
},
"city_locality": {
"type": "string",
"minLength": 1
},
"state_province": {
"type": "string",
"minLength": 1
},
"postal_code": {
"allOf": [
{
"title": "postal_code",
"minLength": 1,
"type": "string"
}
]
},
"country_code": {
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"address_residential_indicator": {
"default": "unknown",
"allOf": [
{
"title": "address_residential_indicator",
"type": "string",
"enum": [
"unknown",
"yes",
"no"
]
}
]
}
}
}
]
}
]
},
"warehouse_id": {
"default": null,
"allOf": [
{
"title": "se_id",
"type": "string",
"minLength": 1,
"maxLength": 25,
"pattern": "^se(-[a-z0-9]+)+$"
}
]
},
"return_to": {
"allOf": [
{
"title": "address",
"type": "object",
"required": [
"name",
"phone",
"address_line1",
"city_locality",
"state_province",
"postal_code",
"country_code",
"address_residential_indicator"
],
"additionalProperties": false,
"allOf": [
{
"title": "partial_address",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"phone": {
"type": "string",
"minLength": 1
},
"company_name": {
"type": "string",
"minLength": 1
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string",
"minLength": 1
},
"address_line3": {
"type": "string",
"minLength": 1
},
"city_locality": {
"type": "string",
"minLength": 1
},
"state_province": {
"type": "string",
"minLength": 1
},
"postal_code": {
"allOf": [
{
"title": "postal_code",
"minLength": 1,
"type": "string"
}
]
},
"country_code": {
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"address_residential_indicator": {
"default": "unknown",
"allOf": [
{
"title": "address_residential_indicator",
"type": "string",
"enum": [
"unknown",
"yes",
"no"
]
}
]
}
}
}
]
}
]
},
"confirmation": {
"default": "none",
"allOf": [
{
"title": "delivery_confirmation",
"type": "string",
"enum": [
"none",
"delivery",
"signature",
"adult_signature",
"direct_signature",
"delivery_mailed",
"verbal_confirmation"
]
}
]
},
"customs": {
"default": null,
"allOf": [
{
"title": "international_shipment_options",
"type": "object",
"required": [
"contents",
"non_delivery"
],
"additionalProperties": false,
"properties": {
"contents": {
"default": "merchandise",
"allOf": [
{
"title": "package_contents",
"type": "string",
"enum": [
"merchandise",
"documents",
"gift",
"returned_goods",
"sample"
]
}
]
},
"non_delivery": {
"default": "return_to_sender",
"allOf": [
{
"title": "non_delivery",
"type": "string",
"enum": [
"return_to_sender",
"treat_as_abandoned"
]
}
]
},
"customs_items": {
"type": "array",
"default": [],
"minItems": 0,
"items": {
"title": "customs_item",
"type": "object",
"required": [
"customs_item_id"
],
"additionalProperties": false,
"properties": {
"customs_item_id": {
"allOf": [
{
"title": "se_id",
"type": "string",
"minLength": 1,
"maxLength": 25,
"pattern": "^se(-[a-z0-9]+)+$"
}
]
},
"quantity": {
"type": "integer",
"format": "int32",
"minimum": 0,
"default": 0
},
"value": {
"allOf": [
{
"title": "monetary_value",
"type": "object",
"required": [
"currency",
"amount"
],
"additionalProperties": false,
"properties": {
"currency": {
"allOf": [
{
"title": "currency",
"type": "string",
"enum": [
"usd",
"cad",
"aud",
"gbp",
"eur",
"nzd"
]
}
]
},
"amount": {
"type": "number",
"format": "double",
"minimum": 0
}
}
}
]
},
"harmonized_tariff_code": {
"type": "string",
"default": null
},
"country_of_origin": {
"default": null,
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"unit_of_measure": {
"type": "string"
},
"sku": {
"type": "string"
},
"sku_description": {
"type": "string"
}
}
}
}
}
}
]
},
"advanced_options": {
"allOf": [
{
"title": "advanced_shipment_options",
"type": "object",
"additionalProperties": false,
"properties": {
"bill_to_account": {
"type": "string",
"default": null
},
"bill_to_country_code": {
"default": null,
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"bill_to_party": {
"default": null,
"allOf": [
{
"title": "bill_to_party",
"type": "string",
"enum": [
"recipient",
"third_party"
]
}
]
},
"bill_to_postal_code": {
"type": "string",
"default": null
},
"contains_alcohol": {
"type": "boolean",
"default": false
},
"delivered_duty_paid": {
"type": "boolean",
"default": false
},
"dry_ice": {
"type": "boolean",
"default": false
},
"dry_ice_weight": {
"allOf": [
{
"title": "weight",
"type": "object",
"required": [
"value",
"unit"
],
"additionalProperties": false,
"properties": {
"value": {
"type": "number",
"format": "double",
"exclusiveMinimum": 0
},
"unit": {
"allOf": [
{
"title": "weight_unit",
"type": "string",
"enum": [
"pound",
"ounce",
"gram",
"kilogram"
]
}
]
}
}
}
]
},
"non_machinable": {
"type": "boolean",
"default": false
},
"saturday_delivery": {
"type": "boolean",
"default": false
},
"fedex_freight": {
"type": "object",
"properties": {
"shipper_load_and_count": {
"type": "string"
},
"booking_confirmation": {
"type": "string"
}
}
},
"use_ups_ground_freight_pricing": {
"type": "boolean",
"default": null
},
"freight_class": {
"type": "string",
"default": null
},
"custom_field1": {
"type": "string",
"default": null,
"maxLength": 100
},
"custom_field2": {
"type": "string",
"default": null,
"maxLength": 100
},
"custom_field3": {
"type": "string",
"default": null,
"maxLength": 100
},
"origin_type": {
"default": null,
"allOf": [
{
"title": "origin_type",
"type": "string",
"enum": [
"pickup",
"drop_off"
]
}
]
},
"shipper_release": {
"type": "boolean",
"default": null
},
"collect_on_delivery": {
"title": "collect_on_delivery",
"type": "object",
"properties": {
"payment_type": {
"allOf": [
{
"title": "collect_on_delivery_payment_type",
"type": "string",
"enum": [
"any",
"cash",
"cash_equivalent",
"none"
]
}
]
},
"payment_amount": {
"title": "payment_amount",
"type": "object",
"properties": {
"currency": {
"allOf": [
{
"title": "currency",
"type": "string",
"enum": [
"usd",
"cad",
"aud",
"gbp",
"eur",
"nzd"
]
}
]
},
"amount": {
"minimum": 0,
"format": "double",
"type": "number"
}
}
}
}
}
}
}
]
},
"origin_type": {
"allOf": [
{
"title": "origin_type",
"type": "string",
"enum": [
"pickup",
"drop_off"
]
}
]
},
"insurance_provider": {
"default": "none",
"allOf": [
{
"title": "insurance_provider",
"type": "string",
"enum": [
"none",
"shipsurance",
"carrier",
"third_party"
]
}
]
},
"tags": {
"type": "array",
"default": [],
"minItems": 0,
"items": {
"allOf": [
{
"title": "tag",
"type": "object",
"required": [
"name"
],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
}
}
}
]
}
},
"order_source_code": {
"allOf": [
{
"title": "order_source_name",
"type": "string",
"enum": [
"amazon_ca",
"amazon_us",
"brightpearl",
"channel_advisor",
"cratejoy",
"ebay",
"etsy",
"jane",
"groupon_goods",
"magento",
"paypal",
"seller_active",
"shopify",
"stitch_labs",
"squarespace",
"three_dcart",
"tophatter",
"walmart",
"woo_commerce",
"volusion"
]
}
]
},
"packages": {
"type": "array",
"minItems": 1,
"items": {
"allOf": [
{
"title": "package",
"type": "object",
"required": [
"weight"
],
"additionalProperties": false,
"properties": {
"package_id": {
"type": "integer",
"format": "int32"
},
"package_code": {
"allOf": [
{
"title": "package_code",
"type": "string",
"pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
}
]
},
"weight": {
"allOf": [
{
"title": "weight",
"type": "object",
"required": [
"value",
"unit"
],
"additionalProperties": false,
"properties": {
"value": {
"type": "number",
"format": "double",
"exclusiveMinimum": 0
},
"unit": {
"allOf": [
{
"title": "weight_unit",
"type": "string",
"enum": [
"pound",
"ounce",
"gram",
"kilogram"
]
}
]
}
}
}
]
},
"dimensions": {
"allOf": [
{
"title": "dimensions",
"type": "object",
"required": [
"unit",
"length",
"width",
"height"
],
"additionalProperties": false,
"properties": {
"unit": {
"default": "inch",
"allOf": [
{
"title": "dimension_unit",
"type": "string",
"enum": [
"inch",
"centimeter"
]
}
]
},
"length": {
"type": "number",
"format": "double",
"minimum": 0,
"default": 0
},
"width": {
"type": "number",
"format": "double",
"minimum": 0,
"default": 0
},
"height": {
"type": "number",
"format": "double",
"minimum": 0,
"default": 0
}
}
}
]
},
"insured_value": {
"allOf": [
{
"title": "monetary_value",
"type": "object",
"required": [
"currency",
"amount"
],
"additionalProperties": false,
"properties": {
"currency": {
"allOf": [
{
"title": "currency",
"type": "string",
"enum": [
"usd",
"cad",
"aud",
"gbp",
"eur",
"nzd"
]
}
]
},
"amount": {
"type": "number",
"format": "double",
"minimum": 0
}
}
}
],
"default": [
{
"currency": "usd",
"amount": 0
}
]
},
"tracking_number": {
"allOf": [
{
"title": "tracking_number",
"type": "string",
"minLength": 1
}
]
},
"label_messages": {
"allOf": [
{
"title": "label_messages",
"type": "object",
"required": [
"reference1",
"reference2",
"reference3"
],
"additionalProperties": false,
"properties": {
"reference1": {
"type": "string",
"default": null
},
"reference2": {
"type": "string",
"default": null
},
"reference3": {
"type": "string",
"default": null
}
}
}
]
},
"external_package_id": {
"type": "string",
"minLength": 1
},
"label_download": {
"allOf": [
{
"title": "label_download",
"type": "object",
"additionalProperties": false,
"properties": {
"href": {
"allOf": [
{
"title": "url",
"type": "string",
"format": "url",
"minLength": 1
}
]
},
"pdf": {
"allOf": [
{
"title": "url",
"type": "string",
"format": "url",
"minLength": 1
}
]
},
"png": {
"allOf": [
{
"title": "url",
"type": "string",
"format": "url",
"minLength": 1
}
]
},
"zpl": {
"allOf": [
{
"title": "url",
"type": "string",
"format": "url",
"minLength": 1
}
]
}
}
}
]
},
"form_download": {
"allOf": [
{
"title": "optional_link",
"type": "object",
"additionalProperties": false,
"properties": {
"href": {
"allOf": [
{
"title": "url",
"type": "string",
"format": "url",
"minLength": 1
}
]
},
"type": {
"type": "string",
"minLength": 1
}
}
}
]
},
"sequence": {
"format": "int32",
"type": "integer"
}
}
}
]
}
},
"total_weight": {
"allOf": [
{
"title": "weight",
"type": "object",
"required": [
"value",
"unit"
],
"additionalProperties": false,
"properties": {
"value": {
"type": "number",
"format": "double",
"exclusiveMinimum": 0
},
"unit": {
"allOf": [
{
"title": "weight_unit",
"type": "string",
"enum": [
"pound",
"ounce",
"gram",
"kilogram"
]
}
]
}
}
}
]
}
}
},
{
"title": "create_shipment_response_body_fields",
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"address_validation": {
"allOf": [
{
"title": "address_validation_result",
"type": "object",
"required": [
"status",
"original_address",
"matched_address",
"messages"
],
"additionalProperties": false,
"properties": {
"status": {
"allOf": [
{
"title": "address_validation_status",
"type": "string",
"enum": [
"unverified",
"verified",
"warning",
"error"
]
}
]
},
"original_address": {
"allOf": [
{
"title": "address",
"type": "object",
"required": [
"name",
"phone",
"address_line1",
"city_locality",
"state_province",
"postal_code",
"country_code",
"address_residential_indicator"
],
"additionalProperties": false,
"allOf": [
{
"title": "partial_address",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"phone": {
"type": "string",
"minLength": 1
},
"company_name": {
"type": "string",
"minLength": 1
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string",
"minLength": 1
},
"address_line3": {
"type": "string",
"minLength": 1
},
"city_locality": {
"type": "string",
"minLength": 1
},
"state_province": {
"type": "string",
"minLength": 1
},
"postal_code": {
"allOf": [
{
"title": "postal_code",
"minLength": 1,
"type": "string"
}
]
},
"country_code": {
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"address_residential_indicator": {
"default": "unknown",
"allOf": [
{
"title": "address_residential_indicator",
"type": "string",
"enum": [
"unknown",
"yes",
"no"
]
}
]
}
}
}
]
}
]
},
"matched_address": {
"allOf": [
{
"title": "address",
"type": "object",
"required": [
"name",
"phone",
"address_line1",
"city_locality",
"state_province",
"postal_code",
"country_code",
"address_residential_indicator"
],
"additionalProperties": false,
"allOf": [
{
"title": "partial_address",
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"phone": {
"type": "string",
"minLength": 1
},
"company_name": {
"type": "string",
"minLength": 1
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string",
"minLength": 1
},
"address_line3": {
"type": "string",
"minLength": 1
},
"city_locality": {
"type": "string",
"minLength": 1
},
"state_province": {
"type": "string",
"minLength": 1
},
"postal_code": {
"allOf": [
{
"title": "postal_code",
"minLength": 1,
"type": "string"
}
]
},
"country_code": {
"allOf": [
{
"title": "country_code",
"type": "string",
"minLength": 2,
"maxLength": 2
}
]
},
"address_residential_indicator": {
"default": "unknown",
"allOf": [
{
"title": "address_residential_indicator",
"type": "string",
"enum": [
"unknown",
"yes",
"no"
]
}
]
}
}
}
]
}
]
},
"messages": {
"type": "array",
"default": [],
"items": {
"title": "response_message",
"type": "object",
"additionalProperties": false,
"required": [
"code",
"message",
"type",
"detail_code"
],
"properties": {
"code": {
"allOf": [
{
"title": "address_validation_code",
"type": "string",
"enum": [
"a1000",
"a1001",
"a1002",
"a1003",
"a1004",
"a1005",
"a1006",
"a1007",
"a1008",
"r1000",
"r1001",
"r1002",
"r1003"
]
}
]
},
"message": {
"type": "string",
"minLength": 1
},
"type": {
"allOf": [
{
"title": "address_validation_message_type",
"type": "string",
"enum": [
"error",
"warning",
"info"
]
}
]
},
"detail_code": {
"allOf": [
{
"title": "address_validation_detail_code",
"type": "string",
"enum": [
"unsupported_country",
"non_supported_country",
"minimum_postal_code_verification_failed",
"street_does_not_match_unique_street_name",
"multiple_directionals",
"multiple_matches",
"suite_not_valid",
"suite_missing",
"incompatible_paired_labels",
"invalid_house_number",
"missing_house_number",
"invalid_box_number",
"invalid_charge_event",
"missing_box_number",
"missing_cmra_or_private_mail_box_number",
"suite_has_no_secondaries",
"postal_code_changed_or_added",
"state_province_changed_or_added",
"city_locality_changed_or_added",
"urbanization_changed",
"street_name_spelling_changed_or_added",
"street_name_type_changed_or_added",
"street_direction_changed_or_added",
"suite_type_changed_or_added",
"suite_unit_number_changed_or_added",
"double_dependent_locality_changed_or_added",
"subadministrative_area_changed_or_added",
"subnational_area_changed_or_added",
"po_box_changed_or_added",
"premise_type_changed_or_added",
"house_number_changed",
"organization_changed_or_added",
"partially_verified_to_state_level",
"partially_verified_to_city_level",
"partially_verified_to_street_level",
"partially_verified_to_premise_level",
"verified_to_state_level",
"verified_to_city_level",
"verified_to_street_level",
"verified_to_premise_level",
"verified_to_suite_level",
"coded_to_street_lavel",
"coded_to_neighborhood_level",
"coded_to_community_level",
"coded_to_state_level",
"coded_to_rooftop_level",
"coded_to_rooftop_interpolation_level",
"name_max_length_exceeded",
"phone_max_length_exceeded",
"company_name_max_length_exceeded",
"line1_min_max_length",
"line2_max_length_exceeded",
"line3_max_length_exceeded",
"city_locality_max_length_exceeded",
"state_province_max_length_exceeded",
"invalid_postal_code",
"country_invalid_length",
"address_not_found"
]
}
]
}
}
}
}
}
}
]
}
}
}
]
}
]
}