Create Company Address

Creates an address for a Company account, if address book management is enabled for your storefront. You can designate whether the address is for shipping, billing, or both. Equivalent Storefront GraphQL API Mutation: `addressCreate`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).

Authentication

AuthorizationBearer
### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| |`Authorization`|`Bearer {{B2B_JWT_TOKEN}}`| You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section[...]

Path parameters

companyIdstringRequired
The unique numeric ID of the Company account.

Request

Extra Field Values
firstNamestringRequired
The first name of the address.
addressLine1stringRequired
The first line of the address
citystringRequired
City of the address.
countryobjectRequired

Country of the address as an object with both the name and the two-character code.

isShippingstringOptional
Indicates whether the address can be used as a shipping address.
isBillingstringOptional
Indicates whether the address can be used as a billing address.
phoneNumberstringOptional
The phone number associated with the address.
addressLine2stringOptional
The second line of the address
zipCodestringOptional
Zip or Postal Code of the address.
stateobjectOptional
State of the address, as an object with the state name and its two-character code. Required when the address `country` is one of the countries listed in [Get State](/developer/api-reference/rest/b2b/management/addresses/get-addresses-states-state-name-code). Optional otherwise. An empty string for `stateName` or `stateCode` is treated as missing, not as "not provided", so it is rejected the same as omitting the field for a country that requires a state.
isDefaultShippingstringOptional
Indicates whether the address is the default shipping address for the Company account.
isDefaultBillingstringOptional
Indicates whether the address is the default billing address for the Company account.
labelstringOptional
The label used on the storefront to identify the address.
extraFieldslist of objectsOptional

Response

OK
messagestringOptional
codedoubleOptionalDefaults to 200
dataobjectOptional

Errors

400
Bad Request Error