Reward Sources

Create a reward source

Add a fulfillment account's gift cards to a program's rewards catalog, priced in one of the program's assets.

post/v1/programs/{program_id}/reward-sources

Request

  • Base URL: https://api.scrip.dev
  • URL: https://api.scrip.dev/v1/programs/{program_id}/reward-sources
  • Auth: HTTP bearer

Path parameters

program_idstring required

The program's id.

Headers

Idempotency-Keystring

A key you choose to make this request safe to retry: 1 to 255 printable ASCII characters. Send the same key with the same request to get the first response again, marked Idempotent-Replayed: true. Routes that return a secret once, and claim links, do not replay a response. Event ingest uses the key as the event's identity.

Request body

asset_idstring uuid required

Asset participants pay with (must be linked to the program)

category_filterstring[]

Under ALL, include only these categories (GIFT_CARD, PREPAID_CARD, CHARITY)

country_filterstring[]

Under ALL, include only products available in these countries

default_ratestring required

Asset units per currency minor unit of face value (decimal string)

fulfillment_account_idstring uuid required

Fulfillment account whose products populate the program catalog

policystring

Product selection: MANUAL (default) or ALL

Example request

{
  "asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
  "category_filter": [
    "GIFT_CARD"
  ],
  "country_filter": [
    "US"
  ],
  "default_rate": "1.5",
  "fulfillment_account_id": "71f2a9d4-3b6e-4c8a-9f1d-5e2b8c7a0091",
  "policy": "ALL"
}

Response

Created reward source

asset_idstring uuid

Asset participants spend on these rewards

category_filterstring[]

ALL-policy category filter (null = no filter)

country_filterstring[]

ALL-policy country filter (null = no filter)

created_atstring date-time

When the reward source was created (RFC 3339)

default_ratestring

Asset units per currency minor unit of face value (decimal string)

fulfillment_account_idstring uuid

Fulfillment account supplying these products

idstring uuid

The id of the reward source. Use it in reward_source_id fields and paths.

policystring

Product selection: MANUAL (nothing until products are enabled) or ALL

program_idstring uuid

Program this source belongs to

status'ACTIVE' | 'ARCHIVED'

The reward source's lifecycle state: ACTIVE or ARCHIVED.

updated_atstring date-time

When the reward source was last modified (RFC 3339)

Example response

{
  "asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
  "category_filter": [
    "GIFT_CARD"
  ],
  "country_filter": [
    "US"
  ],
  "created_at": "2027-01-15T10:30:00Z",
  "default_rate": "1.5",
  "fulfillment_account_id": "71f2a9d4-3b6e-4c8a-9f1d-5e2b8c7a0091",
  "id": "9a0c2e4b-6d81-4f35-a7c9-1b3d5f7e9a14",
  "policy": "ALL",
  "program_id": "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01",
  "status": "ACTIVE",
  "updated_at": "2027-01-15T10:30:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.