Difference between revisions of "API clinics"
(10 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Attendances= | =Attendances= | ||
− | Attendances are the planned and actual attendances at meetings. They can be retrieved, typically by filtering on project and date using: | + | Attendances are the planned and actual attendances at meetings. They can be retrieved, typically by filtering on project and date, using: |
[GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/project/1/start/2024-12-01,2024-12-31/attended/Y | [GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/project/1/start/2024-12-01,2024-12-31/attended/Y | ||
+ | |||
+ | Note the /attended/Y filter. Non-attendances can be used using /attended/N. | ||
+ | |||
+ | You may also want to filter by the clinic, e.g. this will add a filter to only show attendances at clinics 3 and 7. | ||
+ | |||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/clinic/3;7 | ||
+ | |||
+ | To select specific fields, add them after /field, e.g. | ||
+ | |||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/start/2024-12-01,2024-12-31/field/client;attended | ||
+ | |||
+ | To see a list of selectable fields, use: | ||
+ | |||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/selectable_fields | ||
=Clinics= | =Clinics= | ||
Line 19: | Line 33: | ||
[GET] https<nowiki/>://api.dizions.co.uk/v2/clinics/project_id/5 | [GET] https<nowiki/>://api.dizions.co.uk/v2/clinics/project_id/5 | ||
− | To select specific fields, add them after / | + | To select specific fields, add them after /field: |
[GET] https<nowiki/>://api.dizions.co.uk/v2/clinics/field/id;name;maximum_number_of_members | [GET] https<nowiki/>://api.dizions.co.uk/v2/clinics/field/id;name;maximum_number_of_members | ||
Line 28: | Line 42: | ||
Typically you would use this list as a lookup list for attendances | Typically you would use this list as a lookup list for attendances | ||
+ | |||
+ | =Rates= | ||
+ | Rates are like any other field. Add /field/rate to /attendances to get the rate for each attendance | ||
+ | |||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/start/2024-12-01,2024-12-31/field/client;attended;rate | ||
+ | |||
+ | To get a list of rates, use the dictionary: | ||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/dictionary/rates | ||
+ | |||
+ | =Treatments and Activities= | ||
+ | These are the extra things like lunch that can be added to attendance. Add /field/treatments to /attendances to get a list of each treatment for each attendance, with the properties: ticked (Y/N), paid (Y/N), treatment (the id of treatment), amount_paid. | ||
+ | |||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/attendances/start/2024-12-01,2024-12-31/field/client;attended;treatments | ||
+ | |||
+ | To get a list of treatment, use the dictionary: | ||
+ | [GET] https<nowiki/>://api.dizions.co.uk/v2/dictionary/treatments |
Latest revision as of 11:52, 25 November 2024
Attendances
Attendances are the planned and actual attendances at meetings. They can be retrieved, typically by filtering on project and date, using:
[GET] https://api.dizions.co.uk/v2/attendances/project/1/start/2024-12-01,2024-12-31/attended/Y
Note the /attended/Y filter. Non-attendances can be used using /attended/N.
You may also want to filter by the clinic, e.g. this will add a filter to only show attendances at clinics 3 and 7.
[GET] https://api.dizions.co.uk/v2/attendances/clinic/3;7
To select specific fields, add them after /field, e.g.
[GET] https://api.dizions.co.uk/v2/attendances/start/2024-12-01,2024-12-31/field/client;attended
To see a list of selectable fields, use:
[GET] https://api.dizions.co.uk/v2/attendances/selectable_fields
Clinics
Clinics are the names of the groups, after-school clubs, day centres etc that your organisation runs. They can be retrieved using:
[GET] https://api.dizions.co.uk/v2/clinics
You can also filter, typically by project:
[GET] https://api.dizions.co.uk/v2/clinics/project_id/5
To select specific fields, add them after /field:
[GET] https://api.dizions.co.uk/v2/clinics/field/id;name;maximum_number_of_members
To see a list of selectable fields, use:
[GET] https://api.dizions.co.uk/v2/clinics/selectable_fields
Typically you would use this list as a lookup list for attendances
Rates
Rates are like any other field. Add /field/rate to /attendances to get the rate for each attendance
[GET] https://api.dizions.co.uk/v2/attendances/start/2024-12-01,2024-12-31/field/client;attended;rate
To get a list of rates, use the dictionary:
[GET] https://api.dizions.co.uk/v2/dictionary/rates
Treatments and Activities
These are the extra things like lunch that can be added to attendance. Add /field/treatments to /attendances to get a list of each treatment for each attendance, with the properties: ticked (Y/N), paid (Y/N), treatment (the id of treatment), amount_paid.
[GET] https://api.dizions.co.uk/v2/attendances/start/2024-12-01,2024-12-31/field/client;attended;treatments
To get a list of treatment, use the dictionary:
[GET] https://api.dizions.co.uk/v2/dictionary/treatments