Difference between revisions of "API external referrals"

From Charitylog Manual
Jump to: navigation, search
Line 9: Line 9:
 
  [PUT] https<nowiki/>://api.dizions.co.uk/v2/external_referral
 
  [PUT] https<nowiki/>://api.dizions.co.uk/v2/external_referral
 
and a body encoded as x-www-form-urlencoded containing:
 
and a body encoded as x-www-form-urlencoded containing:
 +
```
 
[
 
[
 
{
 
{
Line 18: Line 19:
 
}
 
}
 
]
 
]
 +
```
 
You may also want to include a "project" attribute, which will force the referral to be created in that project when it's imported. If you want the user who imports the referral to decide, omit the project as per the example above. Any other fields from the /clients endpoint can be included.
 
You may also want to include a "project" attribute, which will force the referral to be created in that project when it's imported. If you want the user who imports the referral to decide, omit the project as per the example above. Any other fields from the /clients endpoint can be included.

Revision as of 11:10, 30 January 2023

Go to API overview

These are referrals collected externally, e.g. a self-referral form on your website.

If you want an all-in-one solution, where we create the form, and call this API for you, see our Web forms. If you want your developers to create your form, or if the referrals are coming from another application, they'll need this endpoint.

As a minimum, you need an organisation/person type and a name, with a PUT to:

[PUT] https://api.dizions.co.uk/v2/external_referral

and a body encoded as x-www-form-urlencoded containing: ``` [ { "first_name": "Alice", "surname": "Smith", "org_type_id": 1, "date": "2023-01-30 13:45:00", "diary_description": Wants help with getting out and about more" } ] ``` You may also want to include a "project" attribute, which will force the referral to be created in that project when it's imported. If you want the user who imports the referral to decide, omit the project as per the example above. Any other fields from the /clients endpoint can be included.