Set a user's address by type
PUT/api/users/:userId/addresses/:type
Requires admin token. Creates or fully replaces the user's address of the given type. Fields left out are cleared. state is required. Supported types: policy.
Request
Path Parameters
Address type
- application/json
Body
required
Street Address
City
2 Letter State Code (eg. AL, CA, CO etc.
2 Letter Country Code. Must be US.
Zipcode
Responses
- 200
- 400
- 401
- 403
- 404
- 500
The saved address.
- application/json
- Schema
- Example (from schema)
Schema
Street Address Line 1
Street Address Line 2
City
2 Letter State Code
2 Letter Country Code
Zip
{
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string"
}
Invalid parameters, state code or address type. Possible error codes
-
ERROR_INVALID_STATE_CODE
-
ERROR_INVALID_PARAMETERS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Authorization error e.g. due to an invalid or missing API keys.
Forbidden. Possible error codes
-
ERROR_NO_PERMISSIONS_TO_RESOURCE
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
User not found. Possible error codes
-
ERROR_USER_NOT_FOUND
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Internal error. Possible error codes
-
INTERNAL_SERVER_ERROR
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}