Creates a related course record for a given contact using the CMS API v2.4.
Method | URL |
---|---|
POST |
/v2/contacts/{id}/courses |
Response format | JSON |
Paginated? | No |
Rate Limited? | Yes (more information) |
This API endpoint supports the following request parameters:
Parameter | Description | Notes |
---|---|---|
api_id | The api_id is given to you with your access credentials. |
Required |
data | The URL encoded JSON data string of search parameters. | Required |
sig | The HMAC signature for this request. | Required |
course_id | The ID of the course. | Required |
qualification_id | The ID of the qualification. | Optional |
booked_at | Date the course was booked. | Optional ISO-6801-formatted date |
attended_at | Date the course was attended. | Optional ISO-6801-formatted date |
completed_at | Date the course was completed. | Optional ISO-6801-formatted date |
expires_at | Date the course expires. | Optional ISO-6801-formatted date |
For date format, see https://en.wikipedia.org/wiki/ISO_8601
https://cmsapi.cofeportal.org/v2/contacts/{id}/courses
The following search parameters can be used as part of the JSON data string:
Name | Type | Notes |
---|---|---|
diocese_id | Integer | Required |
A 200 OK
response, the body being a JSON object containing the created related course record.
If the course specified by {id} is not found, a 404 Not Found
response will occur.
The following fields will be returned with the response:
Name | Type | Notes |
---|---|---|
id | Integer | ID of the related course record. |
contact_id | Integer | ID of the contact record. |
course_id | Integer | ID of the course record. |
qualification_id | Integer | ID of the (optional) qualification record. |
booked_at | Date | Date the course was booked. |
attended_at | Date | Date the course was attended. |
completed_at | Date | Date the course was completed. |
expires_at | Date | Date the course expires. |
course_name | String | Name of the course. |
qualification_name | String | Name of the (optional) qualification. |
Any errors in validating the provided parameters will result in a 400 Bad Request
response,
and a JSON response containing an errors
array of validation error messages, keyed by
the name(s) of the parameters which caused the error(s).