Skip to content
AI-ready version:

Retrieve Certificate by Certificate ID

Description

This API allows you to retrieve detailed information about a specific certificate using its unique certificate_id.


Endpoint

GET https://impact.dots.eco/api/v1/certificate/{certificate_id}

Refer to Headers and Authorization for details on required headers and token setup.


Parameters

Name Required Type Description
certificate_id Yes integer The unique ID of the certificate to retrieve. Obtained through the certificate list or other API responses.

Example Requests

Minimal Request Example

curl --location --request GET 'https://impact.dots.eco/api/v1/certificate/134411-6-5' \
--header 'Content-Type: application/json' \
--header 'auth-token: YOUR_AUTH_TOKEN'

Responses

Example Success Response

{
    "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

Possible Error Messages

Message Cause
"Certificate with ID '$certificate_id' was not found." The certificate_id provided does not exist in the system.
"No certificate ID was provided." The certificate_id parameter was missing in the request.

HTTP Status Codes

Code Description
200 The request succeeded, and the specified certificate was returned.
404 The certificate was not found, or the certificate_id was missing.

Notes

  • Mandatory Certificate ID: Ensure that the certificate_id parameter is provided and refers to an existing certificate in the system.
  • Geolocation Data: The geolocation field can contain multiple coordinates, representing specific areas or regions relevant to the certificate’s impact.
  • Supported Languages: Refer to the Supported Languages documentation for details on supported values for the langcode parameter.