{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/artashippinginc/json-schema/artashippinginc-import-cost-estimate-schema.json",
  "title": "ImportCostEstimate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/artashippinginc-import-cost-estimates-api-openapi.yml#/components/schemas/ImportCostEstimate",
  "properties": {
    "currency": {
      "default": "USD",
      "description": "ISO 4217 three-letter alphabetic currency code. Options are defined in the Currencies metadata endpoint",
      "maxLength": 3,
      "minLength": 3,
      "pattern": "^[A-Z]{3}$",
      "title": "Currency",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "destination": {
      "description": "Details about the destination where it will be imported to",
      "properties": {
        "city": {
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "country": {
          "description": "ISO 3166-1 alpha-2 country code of the destination",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "postal_code": {
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "region": {
          "description": "State, province, or region of the destination.",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        }
      },
      "type": "object",
      "x-struct": null,
      "x-validate": null
    },
    "end_use": {
      "description": "The end use of the goods",
      "enum": [
        "for_resale",
        "not_for_resale"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    },
    "estimate": {
      "description": "Breakdown of the estimated import costs",
      "properties": {
        "line_items": {
          "description": "Detailed breakdown of individual charges",
          "items": {
            "properties": {
              "amount": {
                "description": "Amount of the charge in the estimate currency",
                "type": "string",
                "x-struct": null,
                "x-validate": null
              },
              "description": {
                "description": "Description of the charge",
                "type": "string",
                "x-struct": null,
                "x-validate": null
              },
              "subtype": {
                "description": "Subtype classification of the charge",
                "type": "string",
                "x-struct": null,
                "x-validate": null
              },
              "type": {
                "description": "Type of charge (e.g., duty, tax, fee)",
                "type": "string",
                "x-struct": null,
                "x-validate": null
              }
            },
            "type": "object",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "summary": {
          "description": "Summary totals of the import cost estimate",
          "properties": {
            "ddp_service_fees": {
              "description": "Total DDP service fees amount",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "duties": {
              "description": "Total duties amount",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "fees": {
              "description": "Total fees amount",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "taxes": {
              "description": "Total taxes amount",
              "type": "string",
              "x-struct": null,
              "x-validate": null
            }
          },
          "type": "object",
          "x-struct": null,
          "x-validate": null
        }
      },
      "type": "object",
      "x-struct": null,
      "x-validate": null
    },
    "id": {
      "description": "Unique identifier for the import cost estimate",
      "format": "uuid",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "objects": {
      "description": "List of objects/items being imported",
      "items": {
        "properties": {
          "country_of_origin": {
            "description": "ISO 3166-1 alpha-2 country code where the object originated",
            "type": [
              "string",
              "null"
            ],
            "x-struct": null,
            "x-validate": null
          },
          "hs_code": {
            "description": "Harmonized System (HS) tariff code for the object",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "quantity": {
            "description": "Quantity of the object",
            "type": [
              "number",
              "null"
            ],
            "x-struct": null,
            "x-validate": null
          },
          "reference": {
            "description": "Reference identifier for the object",
            "type": [
              "string",
              "null"
            ],
            "x-struct": null,
            "x-validate": null
          },
          "value": {
            "description": "Declared value of the object",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "value_currency": {
            "description": "Currency code (ISO 4217) used for the object's declared value",
            "type": [
              "string",
              "null"
            ],
            "x-struct": null,
            "x-validate": null
          }
        },
        "type": "object",
        "x-struct": null,
        "x-validate": null
      },
      "type": "array",
      "x-struct": null,
      "x-validate": null
    },
    "origin": {
      "description": "Details about the origin location",
      "properties": {
        "country": {
          "description": "ISO 3166-1 alpha-2 country code of the origin",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        }
      },
      "type": "object",
      "x-struct": null,
      "x-validate": null
    },
    "quote_id": {
      "description": "The ID of the quote used to create this import cost estimate, if it was created from a quote",
      "format": "int64",
      "type": [
        "integer",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    },
    "reference": {
      "description": "Reference string for identifying the estimate in your systems",
      "type": [
        "string",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    },
    "shortcode": {
      "description": "Short automatically generated reference code for the identifying import cost estimate in Arta's system",
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "status": {
      "description": "Status of the import cost estimate calculation",
      "enum": [
        "failed",
        "success"
      ],
      "type": "string",
      "x-struct": null,
      "x-validate": null
    },
    "transport": {
      "description": "Information about the transport method and cost",
      "properties": {
        "amount": {
          "description": "Total transport cost",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "amount_currency": {
          "description": "Currency code (ISO 4217) for the transport amount",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "service_level": {
          "description": "Service level for transport (e.g., ups_expedited, fedex_international_first etc). Options are listed in the reference rate service levels metadata endpoint",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        }
      },
      "type": "object",
      "x-struct": null,
      "x-validate": null
    }
  },
  "type": "object",
  "x-struct": "Elixir.DocsWeb.Schemas.Response.ImportCostEstimate",
  "x-validate": null
}