Skip to content

Create a saved address​

POST
/customers/me/addresses

Creates a saved address for the authenticated customer. Setting it as the default billing or shipping address clears that flag on the customer's other addresses. The label field is not stored: it is always returned as null.

Auth: Bearer JWT required; allowed realms: customer.

Authorizations​

bearerAuth

Jeton client obtenu par POST /auth/login (ou /auth/register), renouvelé par POST /auth/refresh.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"firstName": "string",
  
"lastName": "string",
  
"address1": "string",
  
"address2": "string",
  
"city": "string",
  
"state": "string",
  
"postcode": "string",
  
"countryCode": "TN",
  
"phone": "string",
  
"isDefaultBilling": false,
  
"isDefaultShipping": false
}

Responses​

Address created

application/json
JSON
{
  
"ok": true,
  
"data": {
  
  
"addressId": "123e4567-e89b-12d3-a456-426614174000",
  
  
"customerId": "string",
  
  
"accountId": "string",
  
  
"firstName": "string",
  
  
"lastName": "string",
  
  
"address1": "string",
  
  
"address2": "string",
  
  
"city": "string",
  
  
"state": "string",
  
  
"postcode": "string",
  
  
"countryCode": "string",
  
  
"phone": "string",
  
  
"isDefaultBilling": true,
  
  
"isDefaultShipping": true,
  
  
"createdAt": "2024-01-01T00:00:00Z"
  
}
}

Playground​

Authorization
Body

Samples​

Powered by VitePress OpenAPI

Tarifs : contactez-nous — contact@marketkit.ai