addedInput schema / properties / consignment
Added value: +{
+ "additionalProperties": false,
+ "description": "Alternative to the other arguments: the consignment object (https://www.freightutils.com/schema/consignment-object.v1.json) — lines[] (description, un_number, packing_group, variant_index, quantity {value, unit, basis}, packages {count, type, gross_kg}, hs_code, value {amount, currency}, dims, stackable), journey {origin, destination, date, tunnels_on_route, mode}, vehicle, options. Send it alone; an input the tool needs and the object lacks comes back in missing_inputs.",
+ "properties": {
+ "journey": {
+ "additionalProperties": false,
+ "properties": {
+ "date": {
+ "description": "Date of carriage, YYYY-MM-DD.",
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
+ "type": "string"
+ },
+ "destination": {
+ "description": "UN/LOCODE or ISO country code of the destination.",
+ "pattern": "^[A-Za-z]{2}(?:\\s?[A-Za-z2-9]{3})?$",
+ "type": "string"
+ },
+ "mode": {
+ "description": "road | air | sea | multimodal.",
+ "enum": [
+ "road",
+ "air",
+ "sea",
+ "multimodal"
+ ],
+ "type": "string"
+ },
+ "origin": {
+ "description": "UN/LOCODE or ISO country code of the origin.",
+ "pattern": "^[A-Za-z]{2}(?:\\s?[A-Za-z2-9]{3})?$",
+ "type": "string"
+ },
+ "tunnels_on_route": {
+ "description": "ADR tunnel categories on the route (A–E).",
+ "items": {
+ "enum": [
+ "A",
+ "B",
+ "C",
+ "D",
+ "E"
+ ],
+ "type": "string"
+ },
+ "maxItems": 20,
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "lines": {
+ "description": "The lines of the load. Required.",
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "description": {
+ "description": "What the line is, at most 200 characters.",
+ "maxLength": 200,
+ "type": "string"
+ },
+ "dims": {
+ "additionalProperties": false,
+ "description": "Dimensions of ONE package: { l, w, h, unit: mm | cm | m | in }.",
+ "properties": {
+ "h": {
+ "exclusiveMinimum": 0,
+ "maximum": 100000,
+ "type": "number"
+ },
+ "l": {
+ "exclusiveMinimum": 0,
+ "maximum": 100000,
+ "type": "number"
+ },
+ "unit": {
+ "enum": [
+ "mm",
+ "cm",
+ "m",
+ "in"
+ ],
+ "type": "string"
+ },
+ "w": {
+ "exclusiveMinimum": 0,
+ "maximum": 100000,
+ "type": "number"
+ }
+ },
+ "required": [
+ "l",
+ "w",
+ "h",
+ "unit"
+ ],
+ "type": "object"
+ },
+ "hs_code": {
+ "description": "HS / tariff commodity code, 6–10 digits.",
+ "pattern": "^\\d{6,10}$",
+ "type": "string"
+ },
+ "packages": {
+ "additionalProperties": false,
+ "description": "The pieces: how many, of what type, and their total gross mass.",
+ "properties": {
+ "count": {
+ "description": "Number of identical packages (pieces) on the line.",
+ "exclusiveMinimum": 0,
+ "maximum": 100000,
+ "type": "integer"
+ },
+ "gross_kg": {
+ "description": "Gross mass of ALL the line's packages together, in kg.",
+ "exclusiveMinimum": 0,
+ "maximum": 1000000,
+ "type": "number"
+ },
+ "type": {
+ "description": "Package type, e.g. \"pallet\", \"drum\", \"carton\".",
+ "maxLength": 40,
+ "type": "string"
+ }
+ },
+ "required": [
+ "count"
+ ],
+ "type": "object"
+ },
+ "packing_group": {
+ "description": "Packing group, to pin one ADR Table A row of a multi-row UN.",
+ "enum": [
+ "I",
+ "II",
+ "III"
+ ],
+ "type": "string"
+ },
+ "quantity": {
+ "additionalProperties": false,
+ "description": "The dangerous-goods quantity (ADR 1.1.3.6.3), separate from the gross mass of the packages.",
+ "properties": {
+ "basis": {
+ "description": "\"net\" (the goods) or \"gross\" (with packaging). 1.1.3.6.3 counts net; a gross figure scores no points.",
+ "enum": [
+ "net",
+ "gross"
+ ],
+ "type": "string"
+ },
+ "unit": {
+ "description": "\"L\" or \"kg\" — checked against the dimension ADR 1.1.3.6.3 counts for the row.",
+ "enum": [
+ "L",
+ "kg"
+ ],
+ "type": "string"
+ },
+ "value": {
+ "description": "The dangerous-goods quantity for the whole line, all packages together.",
+ "exclusiveMinimum": 0,
+ "maximum": 1000000000,
+ "type": "number"
+ }
+ },
+ "required": [
+ "value"
+ ],
+ "type": "object"
+ },
+ "stackable": {
+ "description": "Whether the packages may be stacked.",
+ "type": "boolean"
+ },
+ "un_number": {
+ "description": "UN number of a dangerous-goods line.",
+ "pattern": "^(?:UN\\s?)?\\d{4}$",
+ "type": "string"
+ },
+ "value": {
+ "additionalProperties": false,
+ "description": "Customs value of the whole line (all packages together).",
+ "properties": {
+ "amount": {
+ "description": "The amount, 0 or more.",
+ "maximum": 1000000000000,
+ "minimum": 0,
+ "type": "number"
+ },
+ "currency": {
+ "description": "ISO 4217 currency code, e.g. \"GBP\".",
+ "pattern": "^[A-Z]{3}$",
+ "type": "string"
+ }
+ },
+ "required": [
+ "amount",
+ "currency"
+ ],
+ "type": "object"
+ },
+ "variant_index": {
+ "description": "ADR Table A variant index (as adr_lookup returns it), to pin one row.",
+ "maximum": 1000,
+ "minimum": 0,
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "maxItems": 50,
+ "minItems": 1,
+ "type": "array"
+ },
+ "options": {
+ "additionalProperties": false,
+ "properties": {
+ "air_volumetric_divisor": {
+ "description": "IATA volumetric divisor, cm³/kg (default 6000).",
+ "exclusiveMinimum": 0,
+ "maximum": 10000,
+ "type": "number"
+ },
+ "awb_number": {
+ "description": "IATA air waybill number (check digit validated, advisory).",
+ "maxLength": 20,
+ "type": "string"
+ },
+ "container_number": {
+ "description": "ISO 6346 container number (check digit validated, advisory).",
+ "maxLength": 20,
+ "type": "string"
+ },
+ "freight_cost": {
+ "additionalProperties": false,
+ "description": "Freight cost for the customs value.",
+ "properties": {
+ "amount": {
+ "description": "The amount, 0 or more.",
+ "maximum": 1000000000000,
+ "minimum": 0,
+ "type": "number"
+ },
+ "currency": {
+ "description": "ISO 4217 currency code, e.g. \"GBP\".",
+ "pattern": "^[A-Z]{3}$",
+ "type": "string"
+ }
+ },
+ "required": [
+ "amount",
+ "currency"
+ ],
+ "type": "object"
+ },
+ "incoterm": {
+ "description": "Incoterms 2020 rule.",
+ "enum": [
+ "EXW",
+ "FCA",
+ "FAS",
+ "FOB",
+ "CFR",
+ "CIF",
+ "CPT",
+ "CIP",
+ "DAP",
+ "DPU",
+ "DDP"
+ ],
+ "type": "string"
+ },
+ "insurance_cost": {
+ "additionalProperties": false,
+ "description": "Insurance cost for the customs value.",
+ "properties": {
+ "amount": {
+ "description": "The amount, 0 or more.",
+ "maximum": 1000000000000,
+ "minimum": 0,
+ "type": "number"
+ },
+ "currency": {
+ "description": "ISO 4217 currency code, e.g. \"GBP\".",
+ "pattern": "^[A-Z]{3}$",
+ "type": "string"
+ }
+ },
+ "required": [
+ "amount",
+ "currency"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "vehicle": {
+ "additionalProperties": false,
+ "properties": {
+ "axles": {
+ "maximum": 12,
+ "minimum": 1,
+ "type": "integer"
+ },
+ "max_mass_t": {
+ "description": "Maximum permissible mass, tonnes.",
+ "exclusiveMinimum": 0,
+ "maximum": 100,
+ "type": "number"
+ },
+ "type": {
+ "description": "Vehicle type, e.g. \"artic\", \"rigid 7.5 t\".",
+ "maxLength": 60,
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "required": [
+ "lines"
+ ],
+ "type": "object"
+}