Create an address
Create an address
POST
/v1/addresses/authorization<token>
Use device JWT token
In: header
address1string
Length
1 <= lengthaddress2?string|null
citystring
Length
1 <= lengthcountrystring
Length
1 <= lengthzipCodestring
Length
1 <= lengthregionCode?string|null
isPrimary?boolean
Default
truetypestring
Value in
"shipping" | "billing" | "both"customerIdstring
Format
uuidResponse Body
application/json
application/json
application/json
curl -X POST "http://localhost:4012/v1/addresses/" \ -H "Content-Type: application/json" \ -d '{ "address1": "12 Avenue des Champs-Élysées", "address2": "3ème étage", "city": "Paris", "country": "France", "zipCode": "75008", "regionCode": "IDF", "isPrimary": true, "type": "shipping", "customerId": "abcdef01-2345-6789-abcd-ef0123456789" }'{
"id": "003b9759-320d-44db-98d4-d37a17c84b0c",
"createdAt": "2023-10-01T12:00:00.000Z",
"updatedAt": "2023-10-01T12:00:00.000Z",
"address1": "12 Avenue des Champs-Élysées",
"address2": "3ème étage",
"city": "Paris",
"country": "France",
"zipCode": "75008",
"regionCode": "IDF",
"isPrimary": true,
"type": "shipping",
"customerId": "abcdef01-2345-6789-abcd-ef0123456789"
}{
"message": "string",
"code": "INSUFFICIENT_BALANCE",
"meta": {
"property1": null,
"property2": null
}
}{
"message": "string",
"code": "INSUFFICIENT_BALANCE",
"meta": {
"property1": null,
"property2": null
}
}