{
"name": "Create Address",
"route": "POST /customer/address",
"description": "Create an address as a customer.",
"parameters": [],
"body": {
"schema": {
"name": "string",
"company": "string",
"street1": "string",
"street2": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"phone": "string",
"email": "string",
"type": "string (shipping or billing)"
},
"example": {
"name": "John Doe",
"company": "ACME Corp",
"street1": "123 Main St",
"street2": "Apt 4B",
"city": "Anytown",
"state": "CA",
"zip": "12345",
"country": "US",
"phone": "+1234567890",
"email": "[email protected]",
"type": "shipping"
}
},
"response": {
"success": {
"code": 201,
"description": "Returns the created address object"
},
"error": [
{
"code": 400,
"description": "Bad Request - Invalid input"
},
{
"code": 401,
"description": "Unauthorized - User is not authenticated"
},
{
"code": 403,
"description": "Forbidden - User does not have permission to create an address"
}
]
},
"notes": [
"This endpoint requires authentication (InternalGuard and AuthorizationGuard)."
]
}