UNPKG

shipengine-json-schema

Version:
859 lines 29.5 kB
{ "$id": "list_shipment_rates_response_body", "title": "list_shipment_rates_response_body", "type": "object", "required": [ "rates", "invalid_rates", "rate_request_id", "shipment_id", "created_at", "status", "errors" ], "additionalProperties": false, "allOf": [ { "title": "rates_information", "type": "object", "additionalProperties": false, "properties": { "rates": { "type": "array", "items": { "allOf": [ { "title": "rate", "type": "object", "required": [ "rate_id", "rate_type", "carrier_id", "shipping_amount", "insurance_amount", "confirmation_amount", "other_amount", "zone", "package_type", "guaranteed_service", "negotiated_rate", "service_type", "service_code", "trackable", "carrier_code", "carrier_nickname", "carrier_friendly_name", "validation_status", "warning_messages", "error_messages" ], "additionalProperties": false, "properties": { "rate_id": { "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "rate_type": { "allOf": [ { "title": "rate_type", "type": "string", "enum": [ "check", "shipment" ] } ] }, "carrier_id": { "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "shipping_amount": { "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 } } } ] }, "insurance_amount": { "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 } } } ] }, "confirmation_amount": { "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 } } } ] }, "other_amount": { "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 } } } ] }, "tax_amount": { "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 } } } ] }, "zone": { "type": "integer", "format": "int32", "minimum": 0 }, "package_type": { "type": "string", "minLength": 1 }, "delivery_days": { "type": "integer", "format": "int32", "minimum": 1 }, "guaranteed_service": { "type": "boolean" }, "estimated_delivery_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}))?$" } ] }, "carrier_delivery_days": { "type": "string", "minLength": 1 }, "ship_date": { "type": "string", "format": "date-time", "minLength": 1 }, "negotiated_rate": { "type": "boolean" }, "service_type": { "type": "string", "minLength": 1 }, "service_code": { "type": "string", "minLength": 1 }, "trackable": { "type": "boolean" }, "carrier_code": { "type": "string", "minLength": 1 }, "carrier_nickname": { "type": "string", "minLength": 1 }, "carrier_friendly_name": { "type": "string", "minLength": 1 }, "validation_status": { "allOf": [ { "title": "validation_status", "type": "string", "enum": [ "valid", "invalid", "has_warnings", "unknown" ] } ] }, "warning_messages": { "type": "array", "minItems": 0, "items": { "type": "string", "minLength": 0 } }, "error_messages": { "type": "array", "minItems": 0, "items": { "type": "string", "minLength": 0 } } } } ] } }, "invalid_rates": { "type": "array", "default": [], "items": { "allOf": [ { "title": "rate", "type": "object", "required": [ "rate_id", "rate_type", "carrier_id", "shipping_amount", "insurance_amount", "confirmation_amount", "other_amount", "zone", "package_type", "guaranteed_service", "negotiated_rate", "service_type", "service_code", "trackable", "carrier_code", "carrier_nickname", "carrier_friendly_name", "validation_status", "warning_messages", "error_messages" ], "additionalProperties": false, "properties": { "rate_id": { "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "rate_type": { "allOf": [ { "title": "rate_type", "type": "string", "enum": [ "check", "shipment" ] } ] }, "carrier_id": { "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "shipping_amount": { "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 } } } ] }, "insurance_amount": { "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 } } } ] }, "confirmation_amount": { "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 } } } ] }, "other_amount": { "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 } } } ] }, "tax_amount": { "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 } } } ] }, "zone": { "type": "integer", "format": "int32", "minimum": 0 }, "package_type": { "type": "string", "minLength": 1 }, "delivery_days": { "type": "integer", "format": "int32", "minimum": 1 }, "guaranteed_service": { "type": "boolean" }, "estimated_delivery_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}))?$" } ] }, "carrier_delivery_days": { "type": "string", "minLength": 1 }, "ship_date": { "type": "string", "format": "date-time", "minLength": 1 }, "negotiated_rate": { "type": "boolean" }, "service_type": { "type": "string", "minLength": 1 }, "service_code": { "type": "string", "minLength": 1 }, "trackable": { "type": "boolean" }, "carrier_code": { "type": "string", "minLength": 1 }, "carrier_nickname": { "type": "string", "minLength": 1 }, "carrier_friendly_name": { "type": "string", "minLength": 1 }, "validation_status": { "allOf": [ { "title": "validation_status", "type": "string", "enum": [ "valid", "invalid", "has_warnings", "unknown" ] } ] }, "warning_messages": { "type": "array", "minItems": 0, "items": { "type": "string", "minLength": 0 } }, "error_messages": { "type": "array", "minItems": 0, "items": { "type": "string", "minLength": 0 } } } } ] } }, "rate_request_id": { "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "shipment_id": { "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "created_at": { "type": "string", "format": "date-time", "allOf": [ { "title": "se_id", "type": "string", "minLength": 1, "maxLength": 25, "pattern": "^se(-[a-z0-9]+)+$" } ] }, "status": { "allOf": [ { "title": "rate_response_status", "type": "string", "enum": [ "working", "completed", "partial", "error" ] } ] }, "errors": { "type": "array", "items": { "allOf": [ { "title": "error", "type": "object", "required": [ "error_source", "error_type", "error_code", "message" ], "additionalProperties": false, "properties": { "error_source": { "allOf": [ { "title": "error_source", "type": "string", "enum": [ "carrier", "order_source", "shipengine" ] } ] }, "error_type": { "allOf": [ { "title": "error_type", "type": "string", "enum": [ "account_status", "business_rules", "validation", "security", "system", "integrations" ] } ] }, "error_code": { "allOf": [ { "title": "error_code", "type": "string", "enum": [ "auto_fund_not_supported", "batch_cannot_be_modified", "carrier_conflict", "carrier_disconnected", "carrier_not_connected", "carrier_not_supported", "confirmation_not_supported", "default_warehouse_cannot_be_deleted", "field_conflict", "field_value_required", "forbidden", "identifier_conflict", "identifiers_must_match", "insufficient_funds", "invalid_address", "invalid_billing_plan", "invalid_field_value", "invalid_identifier", "invalid_status", "invalid_string_length", "label_images_not_supported", "meter_failure", "order_source_not_active", "rate_limit_exceeded", "refresh_not_supported", "request_body_required", "return_label_not_supported", "settings_not_supported", "subscription_inactive", "terms_not_accepted", "tracking_not_supported", "trial_expired", "unauthorized", "unknown", "unspecified", "verification_failure", "warehouse_conflict", "webhook_event_type_conflict" ] } ] }, "message": { "type": "string", "minLength": 1 } } } ] } } } } ] }