Get a user's address by type
GET/api/users/:userId/addresses/:type
Requires admin token. Returns the user's address of the given type. Supported types: policy.
Request
Path Parameters
userId stringrequired
type stringrequired
Address type
Example: policy
Responses
- 200
- 400
- 401
- 403
- 404
- 500
The address.
- application/json
- Schema
- Example (from schema)
Schema
addressLine1 string
Street Address Line 1
addressLine2 string
Street Address Line 2
city string
City
state string
2 Letter State Code
country string
2 Letter Country Code
zip string
Zip
{
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"state": "string",
"country": "string",
"zip": "string"
}
Unknown address type. Possible error codes
-
ERROR_INVALID_PARAMETERS
- application/json
- Schema
- Example (from schema)
Schema
error_code string
Error code
error_message string
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 string
Error code
error_message string
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
User or address not found. Possible error codes
-
ERROR_USER_NOT_FOUND
-
ERROR_ADDRESS_NOT_FOUND
- application/json
- Schema
- Example (from schema)
Schema
error_code string
Error code
error_message string
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 string
Error code
error_message string
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Loading...