Skip to navigation

Update an authorization token

Partially updates a token: only fields present in the body change. Prefer the activate, block, unblock and reprovision operations for state changes. Send expected_revision to refuse the update (409) if the token changed since you read it.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

token_idintegerRequired>=1

Request

This endpoint expects an object.
statusstring or nullOptional1-50 characters
cache_expiry_date_timedatetime or nullOptional
parent_id_tagstring or nullOptional
prepaid_balancedouble or string or nullOptional
real_time_authboolean or nullOptional
provider_idinteger or nullOptional
descriptionstring or nullOptional
card_numberstring or nullOptional1-64 characters
status_reasonstring or nullOptional<=255 characters
card_stateenum or nullOptional
Allowed values:
valid_untildatetime or nullOptional
allow_simultaneous_chargingboolean or nullOptional
expected_revisioninteger or nullOptional>=1

Refuse the update (409) unless the token is still at this revision.

Response

Successful Response
idinteger
Token id on the gateway.
id_tokenstring
RFID UID or idTag the charger sends.
statusstring

Authorization status, e.g. Accepted or Blocked.

id_token_typestring or nullOptional

OCPP 2.x IdTokenType, e.g. ISO14443.

cache_expiry_date_timedatetime or nullOptional
When chargers must stop trusting a cached authorization.
parent_id_tagstring or nullOptional

OCPP parentIdTag: the token group the token belongs to.

prepaid_balancestring or nullOptional
Remaining prepaid balance, as a decimal string.
real_time_authbooleanOptionalDefaults to false
True when every use must be authorized online.
provider_idinteger or nullOptional
Issuing provider id on the gateway.
descriptionstring or nullOptional

Free-text notes.

deleted_atdatetime or nullOptional

When the token was soft-deleted.

card_numberstring or nullOptional
Number printed on the card.
card_stateenumOptionalDefaults to Active

Card issuance state; Unused cards are refused by Authorize.

Allowed values:
valid_untildatetime or nullOptional

Card validity; past it Authorize answers Expired.

allow_simultaneous_chargingbooleanOptionalDefaults to true
Whether this card may authorize another charge while it has an active transaction.
status_reasonstring or nullOptional
Why the status last changed, e.g. a block reason.
status_changed_atdatetime or nullOptional
When the status last changed.
revisionintegerOptionalDefaults to 1

Increases on every change; pass as expected_revision to guard writes.

Errors

401
Unauthorized Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
504
Gateway Timeout Error