cURL Examples

The Adlocaite API is designed to be simple and straightforward to use with cURL. Below you'll find examples of how to retrieve offers and submit responses for programmatic DOOH advertising.

Making requests

All API requests require authentication using a Bearer token provided by our onboarding team. Include your API key in the Authorization header:

curl -X GET "https://api.adlocaite.com/endpoint" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Offer retrieval

Retrieve real-time advertising offers for a specific screen:

curl -X GET "https://api.adlocaite.com/functions/v1/api/offers/request/[screenId]?min_bid_cents=1000" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response example:

{
  "offer_id": "32c7c9b5-8b2a-4cac-b298-146320100325",
  "bid_price_cents": 253,
  "asset_url": "https://cdn.example.com/assets/ad_image_1920x1080.jpg",
  "expires_at": "2025-08-19 14:49:52.874089+00",
  "billing_code": "ORG001-PUB-2024"
}

Offer responses

Accept or decline an offer:

Accept an offer

curl -X POST "https://api.adlocaite.com/functions/v1/api/offers/response/[offerId]" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "accept"
  }'

Decline an offer

curl -X POST "https://api.adlocaite.com/functions/v1/api/offers/response/[offerId]" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "decline",
    "decline_reason": "Schedule conflict"
  }'

Response example (Accept):

{
  "success": true,
  "action": "accepted",
  "deal_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "billing_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "price_cents": 200,
  "message": "Offer accepted, deal created, and commission billed",
  "billing_code": "ORG001-PUB-2024"
}

Was this page helpful?