Difference between revisions of "API due contacts"

From Charitylog Manual
Jump to: navigation, search
Line 1: Line 1:
 
[[API Details|Go to API overview]]
 
[[API Details|Go to API overview]]
  
These are outstanding actions that typically make up the Action List in the web application. They are the equivalent of the bottom half of the Record a Contact page.
+
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:
 
Typically, there are 3 things you might want to do with a due contact:
  
1) Create a due contact against an existing referral
+
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.
  
  [PUT] https<nowiki/>://api.dizions.co.uk/v2/dictionary
+
  [PUT] https<nowiki/>://api.dizions.co.uk/due_contacts/referral/127
  
Add values for user, start_date, end_date and description. Note that as an outstanding action, the start_date and end_date refer to the planned start and end time of the action.
+
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
+
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
 +
 
 +
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<nowiki/>://api.dizions.co.uk/done_contacts/456
 +
 
 +
The body must contain at least one of the following keys: user, 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 12:27, 12 August 2021

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.

[PUT] https://api.dizions.co.uk/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/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/done_contacts/456

The body must contain at least one of the following keys: user, 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.