Difference between revisions of "API: Updating Records"

From Charitylog Manual
Jump to: navigation, search
(Created page with "right 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 nee...")
(No difference)

Revision as of 09:39, 5 August 2019

Helpheader small.png

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