Get Certificate

GET /certificates/{certificate}

Certificates are the proof of planting, and are used to show the impact of the tree planting.

Path parameters

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string(uuid) Required
    • brand string(slug) | null

      Format should match the following pattern: [a-z\-]+.

    • personalisedMessage string | null
    • unitType string Required

      Values are tree, biodiversity, or hedgerow.

    • numberOfUnits integer Required

      Minimum value is 1.

    • unit object

      Additional properties are allowed.

      Hide unit attributes Show unit attributes object
      • id string Required
      • unitType string Required

        Values are tree, biodiversity, or hedgerow.

      • location object Required

        Additional properties are allowed.

        Hide location attributes Show location attributes object
      • photos object | null Required

        Additional properties are allowed.

        Hide photos attribute Show photos attribute object | null
        • large object

          Additional properties are allowed.

          Hide large attributes Show large attributes object
      • species string | null
      • plantedOn string(date-time)
    • Additional properties are allowed.

      Hide organisation attributes Show organisation attributes object
    • event object | null

      Additional properties are allowed.

      Hide event attributes Show event attributes object | null
  • 404 application/problem+json

    Certificate not found.

    Hide response attributes Show response attributes object
GET /certificates/{certificate}
curl \
 -X GET https://api.protect.earth/certificates/53f7bd7b-2ee2-4be4-a15b-e09c76a150f9
Response examples (200)
{
  "id": "string",
  "brand": "string",
  "recipientName": "string",
  "personalisedMessage": "string",
  "unitType": "tree",
  "numberOfUnits": 12,
  "unit": {
    "id": "o2j",
    "unitType": "tree",
    "location": {
      "latitude": 51.87351,
      "longitude": -1.90973,
      "name": "Hawling, England",
      "what3words": "headlight.hunches.heads"
    },
    "photos": {
      "large": {
        "height": 3000,
        "width": 3000,
        "url": "https://aws-bucket-name.s3.eu-west-2.amazonaws.com/trees/eyJpdiI6IkJ6S1hJcE40UGRUbFk4UXd6WVdkYWc9PSIsInZhbHVlIjoiUlk2Q05TalQ3WnpnTnNDbWhzbURIQT09IiwibWFjIjoiYmY1NmNhMDMzMDU2NTk3OTEwMzNiMzUxZjA1Mzc3MGMyYjFhM2ZhYWJhNjQyNjhiZjQxNDhiYWMyYjlhYWUzZSIsInRhZyI6IiJ9.jpg"
      }
    },
    "species": "Silver Birch",
    "plantedOn": "2021-12-26T15:20:42.000000Z"
  },
  "organisation": {
    "name": "Acme Corp",
    "logo": "string"
  },
  "event": {
    "name": "Tree planting event",
    "logo": "string"
  }
}
Response examples (404)
{
  "type": "https://protect.earth/probs/something-went-wrong",
  "title": "You do not have enough credit.",
  "status": 400,
  "detail": "Your current balance is 30, but that costs 50.",
  "instance": "/account/12345/msgs/abc"
}