shipengine-json-schema
Version:
The official JSON Schemas for ShipEngine™
1,039 lines • 41.7 kB
JSON
{
"$id": "create_label_request_body",
"title": "create_label_request_body",
"type": "object",
"required": [
"shipment"
],
"additionalProperties": false,
"allOf": [
{
"title": "label",
"type": "object",
"additionalProperties": false,
"properties": {
"shipment": {
"allOf": [
{
"title": "shipment",
"type": "object",
"required": [
"ship_to",
"ship_from",
"warehouse_id",
"return_to",
"confirmation",
"customs",
"advanced_options",
"insurance_provider"
],
"additionalProperties": false,
"allOf": [
{
"title": "partial_shipment",
"type": "object",
"additionalProperties": false,
"properties": {
"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_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": [],
"additionalProperties": false,
"properties": {
"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"
]
}
]
},
"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"
]
}
]
}
}
}
]
}
]
},
"is_return_label": {
"type": "boolean"
},
"rma_number": {
"type": "string"
},
"charge_event": {
"allOf": [
{
"title": "label_charge_event",
"type": "string",
"enum": [
"carrier_default",
"on_creation",
"on_carrier_acceptance"
]
}
]
},
"outbound_label_id": {
"allOf": [
{
"title": "se_id",
"type": "string",
"minLength": 1,
"maxLength": 25,
"pattern": "^se(-[a-z0-9]+)+$"
}
]
},
"test_label": {
"type": "boolean",
"default": false
},
"validate_address": {
"default": "validate_and_clean",
"allOf": [
{
"title": "validate_address",
"type": "string",
"enum": [
"no_validation",
"validate_only",
"validate_and_clean"
]
}
]
},
"label_download_type": {
"default": "url",
"allOf": [
{
"title": "label_download_type",
"type": "string",
"enum": [
"url",
"inline"
]
}
]
},
"label_format": {
"default": "pdf",
"allOf": [
{
"title": "label_format",
"type": "string",
"enum": [
"pdf",
"png",
"zpl"
]
}
]
},
"display_scheme": {
"default": "label",
"allOf": [
{
"title": "display_scheme",
"type": "string",
"enum": [
"label",
"qr_code"
]
}
]
},
"label_layout": {
"default": "4x6",
"allOf": [
{
"title": "label_layout",
"type": "string",
"enum": [
"4x6",
"letter"
]
}
]
},
"label_image_id": {
"allOf": [
{
"title": "image_id",
"type": "string",
"minLength": 4
}
]
},
"relay_points": {
"allOf": [
{
"type": "object",
"properties": {
"ship_to": {
"type": "object",
"properties": {
"relay_point_id": {
"type": "string"
},
"company_name": {
"type": "string"
},
"address_line1": {
"type": "string"
},
"city_locality": {
"type": "string"
},
"state_province": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country_code": {
"type": "string"
}
}
},
"ship_from": {
"type": "object",
"properties": {
"relay_point_id": {
"type": "string"
},
"company_name": {
"type": "string"
},
"address_line1": {
"type": "string"
},
"city_locality": {
"type": "string"
},
"state_province": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"country_code": {
"type": "string"
}
}
}
}
}
]
}
}
}
]
}