Address
Overview
Addresses represent physical locations associated with parties - where to ship orders, where to send bills, where to send payments. They capture structured address data with proper geographic hierarchy and formatting rules, supporting both domestic and international shipping and billing operations.
Each address belongs to a party and serves a specific purpose. Shipping addresses indicate where goods should be delivered. Billing addresses show where invoices should be sent. Payment addresses specify where payments should be mailed. A party can have multiple addresses of each type, supporting complex organizational structures where different departments or locations handle different functions.
The address structure captures standard components: street address (with up to three lines for complex addresses), city, state/region, postal code, and country. This structure supports international addresses with varying formats while maintaining enough structure for address validation and shipping label generation. The formatted field provides a single-string representation of the complete address for display purposes.
Additional address lines handle edge cases like care-of information, apartment numbers, or building names. Direction lines provide delivery instructions - gate codes, suite numbers, or special handling notes. These additional fields ensure delivery personnel have all the information they need to successfully deliver shipments.
Addresses are versioned and immutable once used on orders or shipments. When a customer updates their address, the old address is retained for historical orders while new orders use the new address. This ensures you can always see where a past shipment was sent, supporting customer service and preventing confusion about historical transactions.
The system can validate addresses through integration with shipping carriers. This validation catches errors before shipment, reducing undeliverable packages and shipping costs. Some carriers require specific address formats or validated addresses for their services, making this validation essential for smooth shipping operations.
Addresses link to the party's contact information, providing a complete picture of how to communicate with and ship to that party. When creating an order, you can select from the party's existing addresses or create a new one. This balance between reuse and flexibility supports both routine orders and special situations.
GraphQL API
The address collection provides access to address data via the GraphQL API. All queries use the Relay connection specification with cursor-based pagination.
Query Name: addressViewConnection
Available Features:
- Cursor-based pagination (first/last/after/before)
Query Examples
Basic Query
The address collection is accessed via the addressViewConnection query, which returns a Relay-style connection with pagination support.
query {
addressViewConnection(first: 10) {
edges {
node {
additionalLines
additionalLinesLine1
additionalLinesLine2
additionalLinesLine3
city
}
}
pageInfo {
hasNextPage
endCursor
}
}
}Pagination
Use cursor-based pagination to retrieve large datasets:
# First page
query {
addressViewConnection(first: 50) {
edges {
node { additionalLines }
}
pageInfo {
hasNextPage
endCursor
}
}
}
# Subsequent pages
query {
addressViewConnection(first: 50, after: "cursor-from-previous-page") {
edges {
node { additionalLines }
}
pageInfo {
hasNextPage
endCursor
}
}
}Fields
This collection has 18 fields:
- 16 simple fields
- 2 enum fields (with predefined values)
- 0 parameterized fields (accept query options)
Note on Field Formatting: All scalar fields support the
formatterargument to control output format. Available options:"html","none","abbreviated","blank-zero". Some fields have a default formatter (shown below). See the Formatting guide for details.
Note on Sorting: Field sortability may vary depending on the UI context and query parameters used. Some parameter options explicitly disable sorting (marked with ⚠️ not sortable).
Simple Fields
These fields return values directly without additional options.
additionalLines
additionalLinesSupplementary address information beyond the street address. This field provides space for additional location details such as suite numbers, building names, or other descriptive information that helps identify the specific delivery point.
Label: Additional lines
Sortable: No
additionalLinesLine1
additionalLinesLine1First line of additional address information. This is the first of three separate lines available for supplementary location details beyond the primary street address.
Label: Additional lines line 1
Sortable: No
additionalLinesLine2
additionalLinesLine2Second line of additional address information. This is the second of three separate lines available for supplementary location details beyond the primary street address.
Label: Additional lines line 2
Sortable: No
additionalLinesLine3
additionalLinesLine3Third line of additional address information. This is the third of three separate lines available for supplementary location details beyond the primary street address.
Label: Additional lines line 3
Sortable: No
city
cityThe city or municipality component of the address. This field identifies the incorporated city, town, or other municipal entity where the address is located.
Label: City
Sortable: No
directions
directionsAdditional instructions for finding or accessing the location. This field provides supplementary guidance beyond the standard address components to help with delivery or navigation.
Label: Directions
Sortable: No
directionsLine1
directionsLine1The first line of the directions field when split into individual lines for display or formatting purposes.
Label: Directions line 1
Sortable: No
directionsLine2
directionsLine2The second line of the directions field when split into individual lines for display or formatting purposes.
Label: Directions line 2
Sortable: No
directionsLine3
directionsLine3The third line of the directions field when split into individual lines for display or formatting purposes.
Label: Directions line 3
Sortable: No
formatted
formattedThe complete address presented as a single formatted string with all components combined for display or mailing label purposes.
Label: Formatted
Sortable: No
name
nameThe name of the person or organization receiving mail at this address. This field is used when the recipient's name differs from the primary party name, such as "Attention to" information on shipping labels.
Label: Name
Sortable: No
postalCode
postalCodeThe postal or ZIP code for the address. This field is used for mail delivery and can be used with other address fields to validate and format complete mailing addresses.
Label: Postal code
Sortable: No
streetAddress
streetAddressThe primary street address line containing the building number and street name. This is the main address field used for shipping, billing, and facility locations.
Label: Street address
Sortable: No
streetAddressLine1
streetAddressLine1The first line of the street address when the full street address is split across multiple lines. This allows for more granular control when importing or exporting address data line by line.
Label: Street address line 1
Sortable: No
streetAddressLine2
streetAddressLine2The second line of the street address when the full street address is split across multiple lines. This allows for more granular control when importing or exporting address data line by line.
Label: Street address line 2
Sortable: No
streetAddressLine3
streetAddressLine3The third line of the street address when the full street address is split across multiple lines. This allows for more granular control when importing or exporting address data line by line.
Label: Street address line 3
Sortable: No
Enum Fields
These fields return one of a predefined set of values.
country
countryThe country where the address is located. This field uses standardized geographic codes and can be formatted as country names or ISO 3166 alpha-2 codes for international address compatibility.
Label: Country
Sortable: No
Possible Values: See Country Codes (ISO 3166-1 alpha-3)
stateRegion
stateRegionThe state, province, or region component of the address. This field stores geographic identifiers and provides options for state/province selection based on the country.
Label: State / region
Sortable: No
Possible Values:
AL- AlabamaAK- AlaskaAB- AlbertaAZ- ArizonaAR- ArkansasAA- Armed Forces AmericasAE- Armed Forces EuropeAP- Armed Forces PacificAU-ACT- Australian Capital TerritoryBC- British ColumbiaUK-BFP- British ForcesCA- CaliforniaCO- ColoradoCT- ConnecticutDE- DelawareDC- District of ColumbiaUK-ENG- EnglandFL- FloridaGA- GeorgiaGU- GuamHI- HawaiiID- IdahoIL- IllinoisIN- IndianaIA- IowaKS- KansasKY- KentuckyLA- LouisianaME- MaineMB- ManitobaMD- MarylandMA- MassachusettsMI- MichiganMN- MinnesotaMS- MississippiMO- MissouriMT- MontanaNE- NebraskaNV- NevadaNB- New BrunswickNH- New HampshireNJ- New JerseyNM- New MexicoAU-NSW- New South WalesNY- New YorkNL- Newfoundland and LabradorNC- North CarolinaND- North DakotaUK-NIR- Northern IrelandAU-NT- Northern TerritoryNT- Northwest TerritoriesNS- Nova ScotiaNU- NunavutOH- OhioOK- OklahomaON- OntarioOR- OregonPA- PennsylvaniaPE- Prince Edward IslandPR- Puerto RicoQC- QuebecAU-QLD- QueenslandRI- Rhode IslandSK- SaskatchewanUK-SCT- ScotlandAU-SA- South AustraliaSC- South CarolinaSD- South DakotaAU-TAS- TasmaniaTN- TennesseeTX- TexasUT- UtahVT- VermontAU-VIC- VictoriaVI- Virgin IslandsVA- VirginiaUK-WLS- WalesWA- WashingtonWV- West VirginiaAU-WA- Western AustraliaWI- WisconsinWY- WyomingYT- Yukon
Relations
No relations available.
Filters
No filters available.
