curl --location -g --request POST '{{BASE_URL}}/admin/customers//addresses' \
--header 'Content-Type: application/json' \
--data-raw '{
"address_name": "string",
"is_default_shipping": true,
"is_default_billing": true,
"company": "string",
"first_name": "string",
"last_name": "string",
"address_1": "string",
"address_2": "string",
"city": "string",
"country_code": "string",
"postal_code": "string",
"phone": "string",
"metadata": {},
"province": "us-ca",
"additional_data": {}
}'
{
"customer": {
"id": "string",
"has_account": true,
"groups": [
{
"id": "string",
"name": "string",
"metadata": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"customers": [
{}
]
}
],
"email": "user@example.com",
"default_billing_address_id": "string",
"default_shipping_address_id": "string",
"company_name": "string",
"first_name": "string",
"last_name": "string",
"addresses": [
{
"id": "string",
"address_name": "string",
"is_default_shipping": true,
"is_default_billing": true,
"customer_id": "string",
"company": "string",
"first_name": "string",
"last_name": "string",
"address_1": "string",
"address_2": "string",
"city": "string",
"country_code": "us",
"postal_code": "string",
"phone": "string",
"metadata": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"province": "us-ca"
}
],
"phone": "string",
"metadata": {},
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
}
+
it will be added to the default fields, using -
will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the Retrieve Custom Links documentation.