{
  "info": { "name": "SendReward API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": "Send gift card rewards with one API call. Set the `api_key` variable to your sr_test_ or sr_live_ key." },
  "auth": { "type": "bearer", "bearer": [{ "key": "token", "value": "{{api_key}}", "type": "string" }] },
  "variable": [ { "key": "base_url", "value": "https://sendreward.com/api/v1" }, { "key": "api_key", "value": "sr_test_REPLACE_ME" } ],
  "item": [
    { "name": "Ping", "request": { "method": "GET", "url": "{{base_url}}/ping" } },
    { "name": "Balance", "request": { "method": "GET", "url": "{{base_url}}/balance" } },
    { "name": "Send a reward", "request": { "method": "POST", "url": "{{base_url}}/rewards",
      "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Idempotency-Key", "value": "postman-{{$guid}}" } ],
      "body": { "mode": "raw", "raw": "{\n  \"recipient_email\": \"maria@example.com\",\n  \"recipient_name\": \"Maria\",\n  \"amount\": 10,\n  \"reference\": \"order-1001\",\n  \"metadata\": { \"source\": \"postman\" }\n}" } } },
    { "name": "Retrieve a reward", "request": { "method": "GET", "url": "{{base_url}}/rewards/rw_REPLACE_ME" } },
    { "name": "List rewards", "request": { "method": "GET", "url": { "raw": "{{base_url}}/rewards?limit=20", "host": ["{{base_url}}"], "path": ["rewards"], "query": [ { "key": "limit", "value": "20" }, { "key": "status", "value": "sent", "disabled": true }, { "key": "reference", "value": "", "disabled": true } ] } } }
  ]
}
