Data

Address JSON Example

A precise JSON example for a postal address object — includes street, city, state, postal code, country, and coordinates. Copy-ready for shipping, billing, and geolocation APIs.

{
  "id": "addr_5Xp2nQmKrL",
  "type": "shipping",
  "label": "Home",
  "recipientName": "Ravi Mehta",
  "company": null,
  "line1": "42, Shyamal Cross Road",
  "line2": "Near Rajpath Club",
  "city": "Ahmedabad",
  "district": "Ahmedabad",
  "state": "Gujarat",
  "postalCode": "380015",
  "country": "IN",
  "countryName": "India",
  "phone": "+91-98765-43210",
  "isDefault": true,
  "isVerified": true,
  "coordinates": {
    "latitude": 23.0225,
    "longitude": 72.5714
  },
  "createdAt": "2024-11-01T08:00:00Z",
  "updatedAt": "2025-02-14T10:30:00Z"
}

Field Reference

typestringrequiredAddress purpose: shipping, billing, or both
line1stringrequiredPrimary street address line (house number, street name)
line2string | nulloptionalSecondary address line for apartment, suite, or landmark
citystringrequiredCity or town name
statestringrequiredState, province, or region
postalCodestringrequiredZIP or postal code — stored as string to preserve leading zeros
countrystringrequiredISO 3166-1 alpha-2 country code (e.g. IN, US, GB)
coordinatesobjectoptionalGeocoded latitude/longitude pair for map display and delivery routing

Variants

MinimalBare address with only required fields — no coordinates or metadata.
{
  "line1": "15, Vesu Main Road",
  "city": "Surat",
  "state": "Gujarat",
  "postalCode": "395007",
  "country": "IN"
}
ExtendedFull address with verification status, geocoordinates, and delivery instructions.
Extended
{
  "id": "addr_5Xp2nQmKrL",
  "type": "shipping",
  "label": "Home",
  "recipientName": "Ravi Mehta",
  "company": "TechCraft Solutions Pvt Ltd",
  "line1": "42, Shyamal Cross Road",
  "line2": "Near Rajpath Club",
  "city": "Ahmedabad",
  "district": "Ahmedabad",
  "state": "Gujarat",
  "postalCode": "380015",
  "country": "IN",
  "countryName": "India",
  "phone": "+91-98765-43210",
  "isDefault": true,
  "isVerified": true,
  "verifiedAt": "2025-01-10T09:00:00Z",
  "coordinates": {
    "latitude": 23.0225,
    "longitude": 72.5714
  },
  "deliveryInstructions": "Ring bell twice. Do not leave with security.",
  "timeZone": "Asia/Kolkata",
  "createdAt": "2024-11-01T08:00:00Z",
  "updatedAt": "2025-02-14T10:30:00Z"
}

Common Use Cases

  • Storing and validating shipping and billing addresses at checkout
  • Geocoding addresses for last-mile delivery routing and map display
  • Pre-filling address forms from a user's saved address book
addresspostalshippinggeolocationlocation

Validate or format this JSON

Paste the example above into JSONKit's tools to validate, minify, or explore the structure interactively.

Frequently Asked Questions

Leading zeros in postal codes (e.g. 01001 in the US) are lost when stored as integers. Always use string type to preserve the exact format.

Multiple structured fields (line1, city, state, postalCode, country) are strongly preferred. A single free-text field is impossible to validate, geocode, or display consistently across countries.

Use ISO 3166-1 alpha-2 codes (IN, US, GB) for machine processing, and optionally include a 'countryName' string for display. Two-letter codes are compact and universally understood.

Related JSON Examples