RenewalStatusController::__invoke().App\Http\Controllers\Api\V1\Professional\RenewalStatusControllerapi.v1.professional.renewal-statusAuthorization: Bearer {token}role:professional. A user without the professional role receives 403.GET/api/v1/professional/renewal-status200 OKdata is the one that tests/Api/Professional/RenewalChecklistTest.php asserts in its case "keeps the four existing keys and values with renewal last" (labels shown in English).{
"success": true,
"status": "success",
"message": "OK",
"data": {
"certifications_last_year": 3,
"certifications_required": 5,
"missing_certifications_for_renewal": 2,
"certifications_last_year_for_renew": 3,
"renewal": {
"type": "professional",
"expired": true,
"period_open": true,
"renewable": true,
"free_renewal": false,
"medical_condition": false,
"requirements": [
{
"key": "MedicalForm",
"met": true,
"mandatory": true,
"label": "Medical form"
},
{
"key": "MedicalCertificate",
"met": true,
"mandatory": true,
"label": "Medical Certificate"
},
{
"key": "ProfessionalInsurance",
"met": true,
"mandatory": true,
"label": "Valid Professional Insurance"
},
{
"key": "JobCountry",
"met": true,
"mandatory": true,
"label": "Job country"
},
{
"key": "CertificatedCourses",
"met": false,
"mandatory": false,
"label": "5 Certifications for free renew"
}
]
}
}
}| Field | Type | Nullable | Description |
|---|---|---|---|
data.certifications_last_year | integer | No | Every certification issued by the professional (as instructor) from 1 January of the current year to today, whatever the course |
data.certifications_required | integer | No | The number of certifications the free renewal requires (the minCertificationRequired application option). 0 when the option is not set |
data.missing_certifications_for_renewal | integer | No | certifications_required minus certifications_last_year, never below 0 |
data.certifications_last_year_for_renew | integer | Yes | The count the website renewal check uses: only certifications of courses that count for renewal, issued in the calendar year of the professional's expire_date when that date is less than a year away, otherwise in the current calendar year. null when the account has no expire_date |
data.renewal | object | No | The renewal checklist the website renewal alert shows. Always the last key of data |
data.renewal.type | string | No | professional or divemaster. Decides which requirements are evaluated and which labels are used |
data.renewal.expired | boolean | No | true when the account is expired |
data.renewal.period_open | boolean | Yes | true when the renewal period has started. null when the account has no expire_date |
data.renewal.renewable | boolean | Yes | true when every mandatory requirement is met (every requirement except CertificatedCourses). null when the account has no distributor or no expire_date |
data.renewal.free_renewal | boolean | Yes | true when every requirement, CertificatedCourses included, is met. null when the account has no distributor or no expire_date |
data.renewal.medical_condition | boolean | No | true when a medical condition was detected. A warning only: it never blocks the renewal and MedicalCondition is never listed in requirements |
data.renewal.requirements | array | Yes | One item per requirement, in the order the website shows them. null when the account has no distributor or no expire_date: the requirements cannot be evaluated without them, and the response is still 200 |
data.renewal.requirements[].key | string | No | The requirement key, for example MedicalForm, MedicalCertificate, ProfessionalInsurance, JobCountry, CertificatedCourses, or professional-course-<id> for a required professional course |
data.renewal.requirements[].met | boolean | No | Whether the professional meets the requirement |
data.renewal.requirements[].mandatory | boolean | No | false only for CertificatedCourses (it is needed for the free renewal, not for the renewal); true for every other item |
data.renewal.requirements[].label | string | No | Display text. For the keys with a translation it is in the request locale. For professional-course-<id> it is the course name as stored (not translated), or the key itself when the course no longer exists. It carries no solution text |
401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated"
}message is Token expired or Invalid token when a bearer token was sent but is expired or unknown.403 Forbiddenprofessional role (role:professional middleware). The status was captured live with a diver account; the body was not captured, because the local capture environment answers with the framework's debug page rather than the production body.429 Too Many Requestsx-ratelimit-limit: 120. The body is the standard envelope with message: "Too many requests" and a Retry-After header. This section is copied from GET /api/v1/professional/students (same limiter) and was not captured again for this endpoint.is_required false in the professionalCourses setting) is not a requirement and is not listed.missing_certifications_for_renewal is built on certifications_last_year, while the website decides whether the requirement is met with certifications_last_year_for_renew. The two counts can differ (the first includes courses that do not count for renewal), so the missing figure and the website's verdict can disagree.certifications_last_year_for_renew when the goal is to mirror the website renewal check.renewal tells which requirement is missing: use requirements[].met and mandatory. A renewable of false means at least one mandatory item has met: false; a free_renewal of false with renewable: true means only CertificatedCourses is missing.docs/api/professional/renewals/GET_renewal_status.mdcurl --location 'https://test.diveraid.com/api/v1/professional/renewal-status' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": {
"certifications_last_year": 0,
"certifications_required": 0,
"missing_certifications_for_renewal": 0,
"certifications_last_year_for_renew": 0,
"renewal": {
"type": "professional",
"expired": true,
"period_open": true,
"renewable": true,
"free_renewal": true,
"medical_condition": true,
"requirements": [
{
"key": "string",
"met": true,
"mandatory": true,
"label": "string"
}
]
}
}
}