Programs

Link asset to program

Link an existing asset to a program.

post/v1/programs/{program_id}/assets

Request

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

Path parameters

program_idstring uuid 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

The asset to link to the program. It must exist in your organization.

Example request

{
  "asset_id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02"
}

Response

Asset linked

created_atstring date-time

When the asset was created

deleted_atstring date-time

Set when the asset is archived

idstring uuid

The id of the asset. Use it in asset_id fields and paths.

inventory_modestring

How balances are tracked

issuance_policystring

How value is issued

max_transaction_amountstring

Optional per-transaction ceiling. Null means no limit

namestring

The name people see for the asset, such as Points.

program_idsstring[]

Programs this asset is linked to

scaleinteger

Decimal precision

status'ACTIVE' | 'ARCHIVED'

Whether the asset is in use (ACTIVE) or retired (ARCHIVED).

symbolstring

Short code for this asset

updated_atstring date-time

When the asset was last modified

Example response

{
  "created_at": "2027-01-15T10:30:00Z",
  "deleted_at": "2027-01-15T10:30:00Z",
  "id": "a3bb189e-8bf9-4c8b-9be0-6b5d2f4e7a02",
  "inventory_mode": "SIMPLE",
  "issuance_policy": "UNLIMITED",
  "max_transaction_amount": "10000.00",
  "name": "Points",
  "program_ids": [
    "8f14e45f-ceea-4e70-9df8-2a7d1b3c9f01"
  ],
  "scale": 2,
  "status": "ACTIVE",
  "symbol": "PTS",
  "updated_at": "2027-01-15T10:30:00Z"
}

Changes

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