Skip to content
Patron Codes

Set Patron Code Metadata

POST/api/patron-codes/{patronCodeId}/metadata

This endpoint allows you to set metadata on a Patron Code. Metadata is merged with any existing keys — only the keys provided in the request are affected. To remove a key, set its value to an empty string.

Path parameters

  • patronCodeIdrequired string
    The Patron Code id.

Request body

  • metadatarequired object
    A map of key-value pairs to attach to the Patron Code. Keys must be alphanumeric with underscores or dashes (max 64 characters). Values must be strings (max 256 characters). Maximum of 10 keys.

Responses

Request
curl -X POST https://service.centrapay.com/api/patron-codes/V17FByEP9gm1shSG6a1Zzx/metadata \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '{
"metadata": {
"deviceId": "device-001"
}
}'