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...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[API Details| Go to API overview]]
 +
 
[[File:helpheader_small.png|right]]
 
[[File:helpheader_small.png|right]]
  
Line 5: Line 7:
 
Update a client:
 
Update a client:
  
[POST] https://api.dizions.co.uk/v2/clients/id/CLIENT_ID
+
[POST] https<nowiki/>://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)
 
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)
Line 11: Line 13:
 
Update a referral:
 
Update a referral:
  
[POST] https://api.dizions.co.uk/v2/referrals/id/REFERRAL_ID
+
[POST] https<nowiki/>://api.dizions.co.uk/v2/referrals/id/REFERRAL_ID
  
 
Update due contact
 
Update due contact
  
[POST] https://api.dizions.co.uk/v2/due_contacts/id/CONTACT_ID
+
[POST] https<nowiki/>://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)
 
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
+
[POST] https<nowiki/>://api.dizions.co.uk/v2/done_contacts/id/CONTACT_ID
 
 
----
 

Latest revision as of 13:55, 1 May 2024

Go to API overview

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