Difference between revisions of "API: Updating Records"
m (Msim moved page Updating Records Via The API to API: Updating Records) |
|
(No difference)
|
Revision as of 15:26, 26 August 2020
To update records you need to use the [POST] method, with fields in the body. There will be some mandatory fields and some fields that need a value if present.
Update a client:
[POST] https://api.dizions.co.uk/v2/clients/id/CLIENT_ID
Most of the fields are the same fields available via GET, such as name, address and demographic details. In addition to it, relationships can also be created with these fields in the body: id_second (the id number of the related person), relationship_first_to_second and relationship_second_to_first (see /dictionary/relationships), and optionally, relationship_first_to_second_carer and relationship_second_to_first_carer (see /dictionary/carer_relationships)
Update a referral:
[POST] https://api.dizions.co.uk/v2/referrals/id/REFERRAL_ID
Update due contact
[POST] https://api.dizions.co.uk/v2/due_contacts/id/CONTACT_ID
Update done contact, or complete due contact (complete by completing the start_date and end_date in the body)
[POST] https://api.dizions.co.uk/v2/done_contacts/id/CONTACT_ID