Updates a related course record for a given contact using the CMS API v2.4.
Method | URL |
---|---|
PUT |
/v2/contacts/{contact_id}/courses/{id} |
Where {contact_id} is the ID of a contact record, and {id} is the ID of the contact's related course record you wish to update.
NOTE: {id} is NOT the ID of the course record, but the ID of the related course record for this contact. A contact can have multiple related course instances for a given course record.
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 |
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/{contact_id}/courses/{id}
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 updated related course record.
If either the contact specified by {contact_id}, or the related 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).