Quickstart
This guide will take you through everything that you need to know to get started with PromoBadger.
We'll cover how to get started using our API and how to make your first API request. We'll also look at where to go next to find all the information you need to complete your integration.
Before you can make requests to the PromoBadger API, you will need to grab your Project ID from the Settings → General section of your project dashboard.
Choose your client
Before making your first API request, you need to pick which method you will use. In addition to good ol' cURL HTTP requests, PromoBadger also offers a JavaScript SDK.
In the following example, you can see how to install each client.
# cURL is most likely already installed on your machine
curl --version
Making your first API request
After picking your preferred client, you are ready to make your first call to the PromoBadger API. Below, you can see how to send a request to retrieve the badges for a given product.
curl --request POST \
--url https://api.promobadger.dev/v1/{PROJECT_ID}/badges/query/byProductId \
--data '{
"context": {},
"query": {
"products": [{ "id": 1234 }]
}
}'