Difference between revisions of "API due contacts"

From Charitylog Manual
Jump to: navigation, search
Line 8: Line 8:
 
1) Create a due contact against an existing referral. This is the equivalent of the bottom half of the Record a Contact page in the web application.
 
1) Create a due contact against an existing referral. This is the equivalent of the bottom half of the Record a Contact page in the web application.
  
  [POST] https<nowiki/>://api.dizions.co.uk/due_contacts/referral/127
+
  [POST] https<nowiki/>://api.dizions.co.uk/v2/due_contacts/referral/127
  
 
Add values for the keys: user, start_date, end_date and description to the body. Note that as an outstanding action, the start_date and end_date refer to the planned start and end time of the action. This will return the id of the newly-created due_contact.
 
Add values for the keys: user, start_date, end_date and description to the body. Note that as an outstanding action, the start_date and end_date refer to the planned start and end time of the action. This will return the id of the newly-created due_contact.
Line 15: Line 15:
 
2) Edit an existing due contact, e.g. if you want to reassign the action to a different user. This is the equivalent of editing the left hand side of the referral edit page in the web application.
 
2) Edit an existing due contact, e.g. if you want to reassign the action to a different user. This is the equivalent of editing the left hand side of the referral edit page in the web application.
  
  [POST] https<nowiki/>://api.dizions.co.uk/due_contacts/456
+
  [POST] https<nowiki/>://api.dizions.co.uk/v2/due_contacts/456
  
 
The body must contain at least one of the following keys: user, start_date, end_date and description.
 
The body must contain at least one of the following keys: user, start_date, end_date and description.
Line 22: Line 22:
 
3) Complete the due contact once the contact has taken place. This is the equivalent of pressing the Update buttom in the web application.
 
3) Complete the due contact once the contact has taken place. This is the equivalent of pressing the Update buttom in the web application.
  
  [POST] https<nowiki/>://api.dizions.co.uk/done_contacts/456
+
  [POST] https<nowiki/>://api.dizions.co.uk/v2/done_contacts/456
  
 
The body must contain at least one of the following keys: user, stage, start_date, end_date and description. Note that this call is made to the done_contact endpoint, using same id. These keys therefore represent the user and date that the outstanding action was completed.
 
The body must contain at least one of the following keys: user, stage, start_date, end_date and description. Note that this call is made to the done_contact endpoint, using same id. These keys therefore represent the user and date that the outstanding action was completed.

Revision as of 17:00, 23 February 2022

Go to API overview

These are outstanding actions that typically make up the Action List in the web application.

Typically, there are 3 things you might want to do with a due contact:


1) Create a due contact against an existing referral. This is the equivalent of the bottom half of the Record a Contact page in the web application.

[POST] https://api.dizions.co.uk/v2/due_contacts/referral/127

Add values for the keys: user, start_date, end_date and description to the body. Note that as an outstanding action, the start_date and end_date refer to the planned start and end time of the action. This will return the id of the newly-created due_contact.


2) Edit an existing due contact, e.g. if you want to reassign the action to a different user. This is the equivalent of editing the left hand side of the referral edit page in the web application.

[POST] https://api.dizions.co.uk/v2/due_contacts/456

The body must contain at least one of the following keys: user, start_date, end_date and description.


3) Complete the due contact once the contact has taken place. This is the equivalent of pressing the Update buttom in the web application.

[POST] https://api.dizions.co.uk/v2/done_contacts/456

The body must contain at least one of the following keys: user, stage, start_date, end_date and description. Note that this call is made to the done_contact endpoint, using same id. These keys therefore represent the user and date that the outstanding action was completed.