Your CRM already knows a lot of about your students, so instead of requiring all the student and destination information to be manually re-entered, the Cohort Go Inusrance API can be used to copy this information across and deliver a student or counsellor directly an experience with a policy ready for payment with Cohort Go payments.
Insurance quotes can be retrieved from the API via the Retrieve Insurance Quotes method.
An example of this may look like:
curl \
-u '<[email protected]>:<api-user-token>' \
https://demo.s.portal.cohortgo.com/api/v1/services/insurance/quote.json?country=AU&course_start_date=2022-03-01&course_finish_date=2024-11-15&adults=1&children=0
This will respond with a payload like (abbreviated for clarity):
[
{
"policy_type": "OSHC",
"provider": "CBHS",
"policy_start": "2022-02-01",
"policy_finish": "2025-03-15",
"currency": "AUD",
"amount": 1541.06,
"provider_specific_fields": [],
"purchase_url": "https://oshcaustralia.com.au/..."
},
{
"policy_type": "OSHC",
"provider": "AHM",
"policy_start": "2022-02-01",
"policy_finish": "2025-03-15",
"currency": "AUD",
"amount": 1594.35,
"provider_specific_fields": [
...
],
"purchase_url": "https://oshcaustralia.com.au/..."
},
...
]
For Australian OSHC policies, a student must purchase visa length cover. This means that their insurance needs to cover the entire duration of the visa, which is longer than the dates of their course. We provide two ways to retrieves quotes for courses:
Basic details about the student booking the insurance need to be provided to create a student record. This is done via the Create Student Endpoint.
An example of this may look like:
curl \
-u '<[email protected]>:<api-user-token>' \
-d '{
"student":{
"title": "Mr",
"given_name": "John",
"family_name": "Smith",
"gender": "male",
"email": "[email protected]",
"home_country": "CN",
"destination_country": "AU",
"dob": "1990-05-20",
"mobile": "61 412 123 123",
"passport_number": "A1231234",
"passport": {"url": "https://passport.example.com"}
}' \
-H "Content-Type: application/json" \
-XPOST \
https://demo.s.portal.cohortgo.com/api/v1/students.json
This will respond with a payload like:
{
"id": 12345,
"portal_url": "https://demo.s.portal.cohortgo.com/students/12345"
}
A policy application represents an insurance policy with Cohort Go. Initially, this will be an unpaid policy that will transition once payment is completed.
The Create Insurance Policy is used to create this application.
An example of this may look like:
curl \
-u '<[email protected]>:<api-user-token>' \
-d '{
"policy_application": {
"provider": "CBHS",
"institution_name": "University of Sydney",
"course_start_date": "2022-03-01",
"course_finish_date": "2024-11-15",
"provider_specific_fields": {
"primary_visaholder_location_in_au": true
}
}
}' \
-H "Content-Type: application/json" \
-XPOST \
https://demo.s.portal.cohortgo.com/api/v1/students/{student_id}/services/insurance/policy_applications.json
This will respond with a payload like:
{
"id": "OSHC1234512345",
"payment_reference": "oshcaustralia:OSHC1234512345",
"provider": "CBHS",
"policy_start": "2022-02-01",
"policy_finish": "2025-03-15",
"currency": "AUD",
"quoted_price": 1541.06,
"status": "unpaid"
}
The important value here is the payment_reference
which is the identifier that will be used when creating the payment request.
For more specific details on payment requests or the ability to add other tuition costs into the same payment, please refer to the Payment Requests API Document.
A payment request can be used send the policy to a student or counsellor for payment.
The Create Payment Request endpoint is used to create this.
An example of this may look like:
curl \
-u '<[email protected]>:<api-user-token>' \
-d '{
"payment_request": {
"description": "OSHC for enrolment at University of Melbourne",
"invoice_payment_references": [
"oshcaustralia:OSHC1234512345"
]
}
}' \
-H "Content-Type: application/json" \
-XPOST \
https://demo.s.portal.cohortgo.com/api/v1/students/{student_id}/services/payments/payment_requests.json
This will respond with a payload like:
{
"description": "OSHC for enrolment at University of Melbourne",
"link": "https://cohortpay.com/r/abc123",
"reference": "WX22JKWML",
"invoices": [
{
"institution_name": "OSHC Australia",
"currency": "AUD",
"amount": 1541.06,
"payment_reference": "oshcaustralia:OSHC1234512345"
}
]
}
The link
field included here can be provided to the student or counsellor to finalise the booking of the payment. The
reference
can be retained for later to track status updates on this request.