Skip to content

Create purchase token (Admin)

Request

Create a new purchase token for the product catalog. Admin-only operation. Replaces POST /purchase/admin/token

Security
authJWT
Bodyapplication/jsonrequired
tokenIdstringrequired

Token id

descriptionstringrequired

Purchase Token description

purchaseTypeIdnumberrequired

Purchase Type id

translationsobject

Per-locale translations keyed by locale (e.g. "de", "ar-sa"). Translatable fields: description.

Example:
{ "de": { "description": "..." }, "fr": null }
curl -i -X POST \
  https://docs.pers.ninja/_mock/swagger/purchases/tokens \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tokenId": "string",
    "description": "string",
    "purchaseTypeId": 0,
    "translations": {
      "de": {
        "description": "..."
      },
      "fr": null
    }
  }'

Responses

Purchase token created successfully

Bodyapplication/json
idstringrequired

Purchase Token id

descriptionstringrequired

Purchase Token description

translationsobject

Per-locale translations of description, keyed by locale. Only returned with include=translations.

tokenobject(TokenDTO)required

Token

contractTokenIdstringrequired

optional contract token id

purchaseTypeobject(PurchaseTypeDTO)required

Purchase Type

isActivebooleanrequired

Purchase Token isActive

Response
{ "id": "string", "description": "string", "translations": { "property1": { … }, "property2": { … } }, "token": { "id": "string", "contractAddress": "string", "metadata": [ … ], "abi": [ … ], "chainId": 0, "abiUrl": "string", "name": "string", "symbol": "string", "decimals": 0, "isActive": true, "isGallery": true, "type": "ERC20", "stampToken": false, "consumable": true }, "contractTokenId": "string", "purchaseType": { "conversionRate": 0, "currency": "eur", "id": 0 }, "isActive": true }