createAddress
Requires a customer (portal or buyer app) session.
Adds a delivery or billing address to the signed-in customer's company.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CreateAddress($input: CreateMobileAddressInput!) {
createAddress(input: $input) {
id
postalCode
name
createdAt
addressLine1
addressLine2
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreateAddress($input: CreateMobileAddressInput!) {\n createAddress(input: $input) {\n id\n postalCode\n name\n createdAt\n addressLine1\n addressLine2\n }\n}",
"variables": {
"input": {
"addressLine1": "string",
"city": "string",
"country": "string",
"name": "string",
"phone": "string"
}
}
}
EOF
Variables:
{
"input": {
"addressLine1": "string",
"city": "string",
"country": "string",
"name": "string",
"phone": "string"
}
}
Response:
{
"data": {
"createAddress": {
"id": "id",
"postalCode": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"addressLine1": "string",
"addressLine2": "string"
}
}
}
createAddress(
input: CreateMobileAddressInput!
): MobileAddress!
Arguments
createAddress.input ● CreateMobileAddressInput! non-null input
The address: name, phone, lines, city, state, postal code, country, type and optional coordinates.
Type
MobileAddress object
An ordering address of the buyer.