Skip to content
HALOWERK

Ortwerk

cn23 generate

Fields and rules follow the CN 23 instructions in the WCO-UPU Postal Customs Guide (2024): detailed description per article (general terms such as "spare parts", "samples" or "food products" are rejected), quantity, net weight per article, total gross weight (must not be below the sum of net weights), value per article and total with currency, 6-digit HS tariff number and country of origin (warnings when missing on commercial items), postal charges, category (commercial sample, gift,.

POST https://ort.halowerk.com/v1/cn23-generate

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
senderobjectYes
addresseeobjectYes
itemsarrayYes
currencystringNo
categorySee schemaYes
category_explanationstringNo
gross_weight_kgnumberYes
postal_chargesnumberNo
commentsstringNo
licence_numbersarrayNo
certificate_numbersarrayNo
invoice_numberstringNo
office_of_originstringNo
posting_datestringNo
declaration_datestringNo
signatory_namestringNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sender",
    "addressee",
    "items",
    "category",
    "gross_weight_kg"
  ],
  "properties": {
    "sender": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "street",
        "city",
        "country"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "company": {
          "type": "string",
          "maxLength": 80
        },
        "street": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "postal_code": {
          "type": "string",
          "maxLength": 12
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "country": {
          "type": "string",
          "pattern": "^[A-Za-z]{2}$",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "phone": {
          "type": "string",
          "maxLength": 30
        },
        "email": {
          "type": "string",
          "maxLength": 120
        },
        "customs_reference": {
          "type": "string",
          "maxLength": 40,
          "description": "Sender: EORI or VAT number (optional)."
        },
        "importer_reference": {
          "type": "string",
          "maxLength": 60,
          "description": "Addressee: tax code, VAT number or importer code (optional)."
        }
      }
    },
    "addressee": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "street",
        "city",
        "country"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "company": {
          "type": "string",
          "maxLength": 80
        },
        "street": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "postal_code": {
          "type": "string",
          "maxLength": 12
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "country": {
          "type": "string",
          "pattern": "^[A-Za-z]{2}$",
          "description": "ISO 3166-1 alpha-2 country code."
        },
        "phone": {
          "type": "string",
          "maxLength": 30
        },
        "email": {
          "type": "string",
          "maxLength": 120
        },
        "customs_reference": {
          "type": "string",
          "maxLength": 40,
          "description": "Sender: EORI or VAT number (optional)."
        },
        "importer_reference": {
          "type": "string",
          "maxLength": 60,
          "description": "Addressee: tax code, VAT number or importer code (optional)."
        }
      }
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 30,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "description",
          "quantity",
          "net_weight_kg",
          "value"
        ],
        "properties": {
          "description": {
            "type": "string",
            "minLength": 3,
            "maxLength": 150,
            "description": "Detailed description, e.g. \"men's cotton shirts\"."
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100000
          },
          "unit": {
            "type": "string",
            "maxLength": 10,
            "default": "pcs"
          },
          "net_weight_kg": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "description": "Net weight of the whole line."
          },
          "value": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000,
            "description": "Value of the whole line."
          },
          "hs_code": {
            "type": "string",
            "pattern": "^\\d{6,10}$",
            "description": "HS tariff number, 6 digits (national extensions up to 10)."
          },
          "origin_country": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$",
            "description": "ISO 3166-1 alpha-2 country code."
          }
        }
      }
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "default": "EUR"
    },
    "category": {
      "enum": [
        "commercial_sample",
        "gift",
        "documents",
        "returned_goods",
        "sale_of_goods",
        "other"
      ]
    },
    "category_explanation": {
      "type": "string",
      "maxLength": 120
    },
    "gross_weight_kg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1000
    },
    "postal_charges": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000
    },
    "comments": {
      "type": "string",
      "maxLength": 200
    },
    "licence_numbers": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "maxLength": 40
      }
    },
    "certificate_numbers": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "maxLength": 40
      }
    },
    "invoice_number": {
      "type": "string",
      "maxLength": 40
    },
    "office_of_origin": {
      "type": "string",
      "maxLength": 60
    },
    "posting_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "declaration_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "signatory_name": {
      "type": "string",
      "maxLength": 60
    }
  }
}

Open original schema

Published input example

{
  "sender": {
    "name": "Versandabteilung Nord",
    "company": "Musterwerkstatt",
    "street": "Hallenweg 1",
    "postal_code": "48599",
    "city": "Gronau",
    "country": "DE",
    "email": "api@halowerk.com"
  },
  "addressee": {
    "name": "Goods receiving department",
    "street": "Warehouse Road 12",
    "postal_code": "SW1A 2AA",
    "city": "London",
    "country": "GB"
  },
  "items": [
    {
      "description": "Men's cotton T-shirts, printed",
      "quantity": 3,
      "net_weight_kg": 0.6,
      "value": 45,
      "hs_code": "610910",
      "origin_country": "PT"
    },
    {
      "description": "Ceramic coffee mug, 300 ml",
      "quantity": 1,
      "net_weight_kg": 0.35,
      "value": 12.5,
      "hs_code": "691200",
      "origin_country": "DE"
    }
  ],
  "currency": "EUR",
  "category": "sale_of_goods",
  "gross_weight_kg": 1.2,
  "postal_charges": 15.49,
  "invoice_number": "RE-2026-0815",
  "posting_date": "2026-11-02",
  "declaration_date": "2026-11-02",
  "signatory_name": "Versandabteilung Nord"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’