Skip to content
Logo

GET /customers/address-requirements

Whether an address in a given country carries a state / region and a postal code. Fetch it before rendering an address form so the form is shaped correctly up front, instead of learning at submit that Singapore addresses have no state and Hong Kong addresses have no postal code.

Values reflect the country's national address format, the same rule the Address shape is validated against:

  • required — the field is part of the country's format and must be sent.
  • optional — accepted, never blocks a submit.
  • absent — the country's format has no such field. Omit it; sending an empty string is still a rejection.

No authentication required. Requirements are country-scoped, not org-scoped, so the answer is identical for every caller. Fetch it without an API key.

Query parameters

ParameterTypeNotes
countrystring (ISO-3166 α-2)Two-letter country code of the address, e.g. SG. Case-insensitive.

Response 200

FieldTypeNotes
countrystringEcho of the query, normalized to uppercase.
state"required" | "optional" | "absent"Requirement for the address state field (an ISO-3166-2 subdivision when present).
postal_code"required" | "optional" | "absent"Requirement for the address postal_code field.

A country code Seismic holds no address format for answers optional for both fields — an unlisted country still has an address, the shape just isn't narrowed. It is never a 404.

Errors

  • 400: country isn't a two-letter country code. Country names are rejected — Singapore fails, SG is what the parameter wants.

Example

No API key needed:

curl "$SEISMIC_ORCHESTRATION_URL/v0/customers/address-requirements?country=SG"
{
  "country": "SG",
  "state": "absent",
  "postal_code": "required"
}

Hong Kong is the mirror image — an area is part of every address, and there is no postal code:

{
  "country": "HK",
  "state": "required",
  "postal_code": "absent"
}