First call
A complete call with a key in your language, reading the response, the remaining quota and the errors.
Goal: list Senegal's public holidays for a year with GET /v1/jours-feries,
sending your key, then read the response, the remaining quota and the errors.
Each holiday carries its status (confirmee or previsionnelle) and its
sources.
Prepare the environment
Set two server-side variables: API_URL, the base URL (https://apps.orvlabs.com), and
API_KEY, your key created in the 221 Pay dashboard (see
Authentication and keys).
API_URL=<base URL above>
API_KEY=sk_221_pay_test_…The examples use the standard library, except Python (pip install requests)
and Dart (dart pub add http).
Send the request
curl -i "$API_URL/v1/jours-feries?year=2026" \
-H "Authorization: Bearer $API_KEY"Read the response
{
"data": [
{
"id": "2026-nouvel-an",
"name": { "fr": "Jour de l'an", "en": "New Year's Day" },
"date": "2026-01-01",
"date_status": "confirmee",
"type": "civile",
"sources": [{ "title": "Loi n° 74-52 du 4 novembre 1974…", "official": true }]
}
],
"pagination": { "page": 1, "per_page": 20, "total": 14, "total_pages": 1 }
}Religious holidays depend on the sighting of the moon: their date_status is
previsionnelle until the date is confirmed. Keep date_status and the
sources with the date.
Handle errors and quota
RateLimit-Remaininggives the number of calls left today.- Test the
codefield, not the HTTP status. INVALID_REQUEST: thefieldsmember says what to fix.INVALID_API_KEY: unknown or malformed key;API_KEY_EXPIREDandAPI_KEY_REVOKED: expired or revoked key.QUOTA_EXCEEDED(429): waitRetry-Afterseconds; do not retry in a loop, the quota is daily.