RFID authorization
#
DescriptionThis endpoint is used to ask to your system if the given RFID card is valid.
Depending on the type
value the request might be a simple request for authorization (type = "authorize"
) or a notification that a charge has been started using this RFID as well (type = "start"
).
#
But why is that?There are two main reason that led us to do so:
- When we receive an RFID authorization request from a chargebox, we don't know yet if the chargebox wants to start or stop a charge, so we just check if the RFID is in our database. This is the case when we'll send a
type = "authorize"
request. - When a chargebox tells us that it has started a charge using the given RFID, we might want to make further considerations (like checking if there is enough budget on the RFID or something else). This is the case when we'll send a
type = "start"
request. After this request has been accepted we will send you a start charge notification too.
caution
Thor can work in three ways:
- Thor check first if the RFID card is in its database, then it'll send an authorization request to your application.
- Thor check only if the RFID card is in its database.
- Thor check only the authorization from your application.
In the API configurazione panel you can choose the working mode:
- You have to configure the RFID API and choose in control panel the double check (Thor & your application)
- If you don't insert the datas of API in RFID fields
- You have to configure the RFID API and choose in control panel the single check (only your application)
If the RFID card is in Thor's database but it was created by another service provider, Thor will reject the request.
#
Request formatMethod: POST
Body format: JSON
Key | Type | Description |
---|---|---|
msg | String | Specifies that this message is rfid authorization request. For this request it will be always equal to "rfid". |
id | String | The RFID identifier. |
chargebox | String | The chargebox identifier. |
type | Authorization type | The purpose of the authorization request. |
Request schema:
#
Expected responseA 200 - OK
HTTP status code will be intended as an authorized RFID, any other status code will invalidate the authorization.
#
Enums#
Authorization typeType: String
These are the possible types of the charge type:
authorize
sent when the chargebox notifies a new RFID card. We don't know yet if the chargebox is going to start a new charge or stop a currently active one.start
sent when the chargebox has started a local charge.