{
  "$id": "calculate_rates_response_body",
  "title": "calculate_rates_response_body",
  "type": "object",
  "required": [
    "rate_response",
    "shipment_id",
    "ship_date",
    "created_at",
    "modified_at",
    "shipment_status",
    "return_to",
    "confirmation",
    "customs",
    "advanced_options",
    "insurance_provider",
    "tags",
    "packages",
    "total_weight"
  ],
  "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": "rate_response",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "rate_response": {
          "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
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          ]
        }
      }
    }
  ]
}