✒️
TheGoodAPI
  • Getting started with TheGoodAPI
  • Planting Trees
  • Rescue Plastic Bottles
  • Widgets and Badges
  • Planting Trees FAQ
Powered by GitBook
On this page

Was this helpful?

Widgets and Badges

Showcase your impact using easy to drop in widgets and badges

PreviousRescue Plastic BottlesNextPlanting Trees FAQ

Last updated 10 months ago

Was this helpful?

You've started to make impact and now its time to show it off.

If you are driving custom UI/UX and would like to have access to your total tree count, you can access that directly using the

Ecommerce

If you are powering a custom ecommerce website, we also provide an easy to use drop in badge to show off your impact.

  1. Add our CSS to your code:

<link href="https://app.thegoodapi.com/assets/badges/base.css" rel="stylesheet">

The css supports 2 query paramters:

  • text_color (hex)

  • background_color (hex)

  1. Add our script tag in

<script async src="https://app.thegoodapi.com/assets/badges/product.js?badge_type=per_product&amp;locale=en"></script>

This supports 2 query parameters:

  • badge_type: Which can be one of, per_product or per_order

  • locale (en, de, es it etc.)

  1. Drop in our div tag anywhere in your code :)

<div class="goodapi-product-badge"></div>

You should see a badge like such:

Get Trees endpoints
Sample Product Badge