Company details
Company details store the details of a nominated system administrator or a generic contact.
These details are available as merge fields within the system and are used in standard message templates.
Company Details is a single instance endpoint which means only one database record with Company Details exists.
Permissions
Permissions for Company details can be checked by:
| Context | Endpoint | Location | Available perms |
|---|---|---|---|
| Global scope | GET /api/users/permissions/ | "company_details" | edit, view |
GET /api/administration/company-details/
Retrieves the Company details.
Permissions
Requires authentication and company_details.view permission.
Request
- Headers
Content-Type: application/json
Authorization: JWT access_token- Schema
json
GET /api/administration/company-details/Response
| Key | Type | Notes |
|---|---|---|
| admin_first_name | string | |
| admin_last_name | string | |
| admin_email_address | ||
| admin_phone_number | string | |
| admin_job_title | string | |
| admin_email_signature | string | |
| _meta.permissions | Object | Object describing permissions. |
- Successful status
200 OK - Response body schema:
json
{
"admin_first_name": <string>,
"admin_last_name": <string>,
"admin_email_address": <email>,
"admin_phone_number": <string>,
"admin_job_title": <string>,
"admin_email_signature": <string>,
"_meta": {
"permissions": {
"edit": <bool>,
"view": <bool>
}
}
}Errors
| Error | Response code | Message |
|---|---|---|
| Insufficient permissions | 403 Forbidden | "detail": "You do not have permission to perform this action." |
PATCH /api/administration/company-details/
Updates Company details.
Permissions
Requires authentication and company_details.edit permission.
Request
- Body parameters
| Key | Type | Notes |
|---|---|---|
| admin_first_name | string | Optional, with max length of 25 characters |
| admin_last_name | string | Optional, with max length of 25 characters |
| admin_email_address | Optional, with max length of 100 characters | |
| admin_phone_number | string | Optional, with max length of 20 characters |
| admin_job_title | string | Optional, with max length of 100 characters |
| admin_email_signature | string | Optional, with max length of 255 characters |
- Headers
Content-Type: application/json
Authorization: JWT access_token- Schema
json
PATCH /api/administration/company-details/
{
"admin_first_name": <string>,
"admin_email_address": <email>
...
}Response
| Key | Type | Notes |
|---|---|---|
| admin_first_name | string | |
| admin_last_name | string | |
| admin_email_address | ||
| admin_phone_number | string | |
| admin_job_title | string | |
| admin_email_signature | string | |
| _meta.permissions | Object | Object describing permissions. |
- Successful status
200 OK - Response body schema:
json
{
"admin_first_name": <string>,
"admin_last_name": <string>,
"admin_email_address": <email>,
"admin_phone_number": <string>,
"admin_job_title": <string>,
"admin_email_signature": <string>,
"_meta": {
"permissions": {
"edit": <bool>,
"view": <bool>
}
}
}Errors
| Error | Response code | Message |
|---|---|---|
| "admin_first_name" is too long | 400 Bad Request | "admin_first_name": ["Ensure this field has no more than 25 characters."] |
| "admin_first_name" is null | 400 Bad Request | "admin_first_name": ["This field may not be null."] |
| "admin_first_name" is not a string | 400 Bad Request | "admin_first_name": ["Not a valid string."] |
| "admin_last_name" is too long | 400 Bad Request | "admin_last_name": ["Ensure this field has no more than 25 characters."] |
| "admin_last_name" is null | 400 Bad Request | "admin_last_name": ["This field may not be null."] |
| "admin_last_name" is not a string | 400 Bad Request | "admin_last_name": ["Not a valid string."] |
| "admin_email_address" is too long | 400 Bad Request | "admin_email_address": ["Ensure this field has no more than 100 characters."] |
| "admin_email_address" is null | 400 Bad Request | "admin_email_address": ["This field may not be null."] |
| "admin_email_address" is not a valid email | 400 Bad Request | "admin_email_address": ["Enter a valid email address."] |
| "admin_phone_number" is too long | 400 Bad Request | "admin_phone_number": ["Ensure this field has no more than 20 characters."] |
| "admin_phone_number" is null | 400 Bad Request | "admin_phone_number": ["This field may not be null."] |
| "admin_phone_number" is not a string | 400 Bad Request | "admin_phone_number": ["Not a valid string."] |
| "admin_job_title" is too long | 400 Bad Request | "admin_job_title": ["Ensure this field has no more than 100 characters."] |
| "admin_job_title" is null | 400 Bad Request | "admin_job_title": ["This field may not be null."] |
| "admin_job_title" is not a string | 400 Bad Request | "admin_job_title": ["Not a valid string."] |
| "admin_email_signature" is too long | 400 Bad Request | "admin_email_signature": ["Ensure this field has no more than 255 characters."] |
| "admin_email_signature" is null | 400 Bad Request | "admin_email_signature": ["This field may not be null."] |
| "admin_email_signature" is not a string | 400 Bad Request | "admin_email_signature": ["Not a valid string."] |
| Insufficient permissions | 403 Forbidden | "detail": "You do not have permission to perform this action." |
OPTIONS /api/administration/company-details/
Permissions
Requires authentication only.
Request
- Headers
Content-Type: application/json
Authorization: JWT access_token- Schema
json
OPTIONS /api/administration/company-details/Response
- Successful status
200 OK - Response body:
json
{
"details": {
"schema": [
{
"alias": "admin_first_name",
"type": "string",
"required": false,
"validators": [
{
"type": "max_length",
"length": 25
}
]
},
{
"alias": "admin_last_name",
"type": "string",
"required": false,
"validators": [
{
"type": "max_length",
"length": 25
}
]
},
{
"alias": "admin_email_address",
"type": "email",
"required": false,
"validators": [
{
"type": "max_length",
"length": 100
}
]
},
{
"alias": "admin_phone_number",
"type": "string",
"required": false,
"validators": [
{
"type": "max_length",
"length": 20
}
]
},
{
"alias": "admin_job_title",
"type": "string",
"required": false,
"validators": [
{
"type": "max_length",
"length": 100
}
]
},
{
"alias": "admin_email_signature",
"type": "string",
"required": false,
"validators": [
{
"type": "max_length",
"length": 255
}
]
}
]
}
}