Difference between revisions of "API clients"
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[API Details|Go to API overview]] | [[API Details|Go to API overview]] | ||
− | The records in the system are | + | The records in the system are divided into types, which can be People types like clients, staff, volunteers, etc, or Organisation types like funders, schools, GP surgeries etc. The clients endpoint can be used to access any People type, e.g. if volunteers are type 7, a list of volunteers can be retrieved using: |
[GET] https<nowiki/>://api.dizions.co.uk/v2/clients/type/7 | [GET] https<nowiki/>://api.dizions.co.uk/v2/clients/type/7 | ||
Line 12: | Line 12: | ||
type: 8 | type: 8 | ||
− | If the type is | + | If the type is omitted, the record will be automatically be created with type 1. |
These types of people are defined in the dictionary: | These types of people are defined in the dictionary: | ||
[GET] https<nowiki/>://api.dizions.co.uk/v2/dictionary/client_type | [GET] https<nowiki/>://api.dizions.co.uk/v2/dictionary/client_type | ||
+ | |||
+ | An important difference with the web application is that it may have [[Customise_Orgs_%26_People#Minimum_Data_Sets|Minimum Data Sets]] defined, e.g. name, email, phone number etc, for creating records. The API deliberately ignores these, as it's assumed the API consumer will define its own. Instead, it just asks for a first_name and surname. |
Latest revision as of 15:47, 14 August 2024
The records in the system are divided into types, which can be People types like clients, staff, volunteers, etc, or Organisation types like funders, schools, GP surgeries etc. The clients endpoint can be used to access any People type, e.g. if volunteers are type 7, a list of volunteers can be retrieved using:
[GET] https://api.dizions.co.uk/v2/clients/type/7
The type can be specified when creating records, e.g. if staff are type 8, a new staff record can be created like this:
[POST] https://api.dizions.co.uk/v2/clients first_name: John surname: Smith type: 8
If the type is omitted, the record will be automatically be created with type 1.
These types of people are defined in the dictionary:
[GET] https://api.dizions.co.uk/v2/dictionary/client_type
An important difference with the web application is that it may have Minimum Data Sets defined, e.g. name, email, phone number etc, for creating records. The API deliberately ignores these, as it's assumed the API consumer will define its own. Instead, it just asks for a first_name and surname.