AI-ready version:
Retrieve Certificate by App ID and External Unique ID
Description
Fetch details of a specific certificate using the app_id of the associated application and the external_unique_id of the certificate.
Endpoint
GET https://impact.dots.eco/api/v1/certificate/{app_id}/{external_unique_id}
Refer to Headers and Authorization for detailed information about required headers and authorization.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
app_id |
Yes | integer |
The ID of the application associated with the certificate. |
external_unique_id |
Yes | string |
The unique external identifier of the certificate to be retrieved. |
Example Request
Minimal Request Example
curl --location --request GET 'https://impact.dots.eco/api/v1/certificate/{app_id}/{external_unique_id}' \
--header 'Content-Type: application/json' \
--header 'auth-token: YOUR_AUTH_TOKEN'
Responses
Successful Response
A successful request will return a JSON object with details about the requested certificate.
Response Body
{
"certificate_id": "134411-6-5",
"certificate_url": "https://impact.dots.eco/certificate/1ca15b15-dec1-494b-884f-a9fefa953a67",
"certificate_image_url": "https://impact.dots.eco/certificate/img/1ca15b15-dec1-494b-884f-a9fefa953a67.jpg",
"app_id": "6",
"app_name": "Dots.eco",
"remote_user_id": "testuser",
"name_on_certificate": "John Doe",
"certificate_design": null,
"certificate_info": null,
"impact_qty": "1",
"impact_type_id": "196",
"impact_type_name": "Save a Sea Turtle",
"impact_status": null,
"created_timestamp": "1663080297",
"allocation_id": "14",
"country": "Costa Rica",
"geolocation": [
{
"lat": 10.31709345,
"lng": -83.357477040000006
}
],
"certificate_header": "For saving 1 Sea-Turtle hatchlings with Dots.eco",
"greeting": "Thank you Tom!"
}
Response Fields
| Field | Type | Description |
|---|---|---|
certificate_id |
string |
The unique identifier of the certificate. |
certificate_url |
string |
The URL where the certificate can be viewed. |
certificate_image_url |
string |
URL linking to the certificate's image. |
app_id |
string |
The ID of the application associated with the certificate. |
app_name |
string |
The name of the application. |
remote_user_id |
string |
The ID of the user linked to the certificate, if available. |
name_on_certificate |
string |
The name displayed on the certificate. |
certificate_design |
string |
Design details of the certificate, if applicable. |
certificate_info |
string |
Additional descriptive information about the certificate, if available. |
impact_qty |
string |
The quantified impact represented by the certificate (e.g., number of actions). |
impact_type_id |
string |
The ID of the impact type. |
impact_type_name |
string |
The name of the impact type (e.g., "Save a Sea Turtle"). |
impact_status |
string |
The status of the impact (if applicable). |
created_timestamp |
string |
The timestamp indicating when the certificate was created. |
allocation_id |
string |
The identifier for the allocation used to issue the certificate. |
country |
string |
The country where the impact occurred. |
geolocation |
array |
A list of geolocation points representing where the impact took place. |
geolocation.lat |
float |
The latitude of a specific geolocation point. |
geolocation.lng |
float |
The longitude of a specific geolocation point. |
certificate_header |
string |
The text displayed at the top of the certificate. It summarizes the environmental action completed by the user. |
greeting |
string |
A personalized thank-you message displayed on the certificate or in the email. The user’s name is dynamically inserted. |
Errors
404 Not Found
Occurs when the provided app_id and/or external_unique_id do not exist or result in invalid data.
Possible Error Messages
| Message | Cause |
|---|---|
"Certificate with App id '$app_id' and External unique id '$external_unique_id' was not found." |
The provided external unique id does not exist with app ID. |
"No external_unique_id was provided." |
Missing or invalid external_unique_id. |
HTTP Status Code
| Code | Description |
|---|---|
| 200 | The request succeeded, and the specified certificate was returned. |
| 404 | No matching results for the request. |
Notes
- Mandatory Parameters: Ensure both
app_idandexternal_unique_idare correctly included in the request URL. - Optional localization is not covered for this endpoint.
- Refer to the Headers and Authorization guide for required headers.