Appearance
User API
Set User Account PIN
Set a 4-digit PIN for a given
device_id.
plaintext
POST /api/v2/createPINRequest Parameters
| Body Parameters | Type | Required | Description |
|---|---|---|---|
device_id | string | YES | UUIDv4 String for device_id |
pin | number(4) | YES | 4-digit PIN associated with device_id |
session_id | string | YES | User Session ID Token |
Success Response
json
{
"response": true,
"exception": null
}IMPORTANT
The API Wrapper enforces a 4-digit PIN, however CBORD's base API seemingly allows any 4-char string.
Failure Response
Invalid PIN Provided
json
{
"response": null,
"exception": "Invalid PIN Provided. Please ensure PIN is 4 digits."
}Unexpected Error
json
{
"response": null,
"exception": "Unexpected Error"
}NOTE
There is the possibility that CBORD's endpoint returns an error. The above error seems to be the most relevant, but all 4-digit PINs should work since that's their App Requirement, which this API is enforcing, despite their API not.
Retrieve User Profile
Retrieves User Data associated with a User Profile.
plaintext
POST /api/v2/userRequest Parameters
| Body Parameters | Type | Required | Description |
|---|---|---|---|
session_id | string | YES | User Session ID Token |
Success Response
A Really Long JSON Object
json
{
"response": {
"id": "{USER_ID_REDACTED}",
"userName": "{USER_EMAIL_REDACTED}",
"objectRevision": 128,
"institutionId": "{USER_INSTITUTION_ID_REDACTED}",
"firstName": "FIRST",
"middleName": "MIDDLE",
"lastName": "LAST",
"status": 3,
"staleProfile": false,
"active": true,
"timeZone": "America/New_York",
"locale": "en-US",
"cashlessMediaStatus": 1,
"guestUser": false,
"hasCashlessCard": true,
"lastUpdatedCashless": null,
"lastUpdatedProfile": "2024-07-04T01:00:00.000+0000",
"emailBounceMessage": null,
"emailBounceStatus": null,
"childUserInfoList": [],
"userNotificationInfoList": [
{
"id": "{UUIDV4_IDENTIFIER}",
"type": 2,
"value": "{USER_PHONE_NUMBER}",
"provider": null,
"status": 3,
"bounceStatus": 1,
"objectRevision": 1
},
{
"id": "{UUIDV4_IDENTIFIER}",
"type": 1,
"value": "{USER_EDU_EMAIL_ADDRESS}",
"provider": null,
"status": 1,
"bounceStatus": 1,
"objectRevision": 1
},
{
"id": "{UUIDV4_IDENTIFIER}",
"type": 8,
"value": "{A_TOKEN_THAT_LOOKS_LIKE_FIREBASE_CLOUD_MESSAGE_TOKEN}",
"provider": "ios",
"status": 3,
"bounceStatus": 1,
"objectRevision": 1
},
{
"id": "{UUIDV4_IDENTIFIER}",
"type": 8,
"value": "{A_TOKEN_THAT_LOOKS_LIKE_FIREBASE_CLOUD_MESSAGE_TOKEN}",
"provider": "ios",
"status": 3,
"bounceStatus": 1,
"objectRevision": 1
}
],
"userMediaInfoList": null,
"email": "{USER_EDU_EMAIL_ADDRESS}",
"phone": "{USER_PHONE_NUMBER}"
},
"exception": null
}NOTE
Not entirely sure how response.userNotificationInfoList is generated. You may have all, some, or none of them.
Get User Favorited Locations
Retrieves User Data associated with a User Profile.
plaintext
POST /api/v2/getUserFavoritedLocationsRequest Parameters
| Body Parameters | Type | Required | Description |
|---|---|---|---|
session_id | string | YES | Session Token |
latitude | number | YES | Current latitude position |
longitude | number | YES | Current longitude position |
auto_renew_session | boolean | NO | Set true if you want to automatically renew session_id token |
device_id | string | Only if auto_renew_session is set to true | Device ID for renewing session_id token |
pin | number(4) | Only if auto_renew_session is set to true | PIN set for Device when logging into app. See /createPIN for additional details |
Success Response
json
{
"response": [
{
"locationId": "{LOCATION-ID-NUMBER}",
"name": "{LOCATION-NAME}",
"type": "Normal",
"latitude": 42.000000000,
"longitude": -71.000000000,
"distance": 0.0,
"color": "#0099cc",
"score": 20.0
},
// MORE LOCATIONS AS NEEDED
],
"exception": null,
"autoRenewConfig": {
"sessionIdChanged": true,
"token": "{RENEWED_SESSION_ID}"
}
}Set User Favorited Locations
Sets list of User Favorited Locations
plaintext
POST /api/v2/setUserFavoritedLocationsRequest Parameters
| Body Parameters | Type | Required | Description |
|---|---|---|---|
session_id | string | YES | Session Token |
location_ids | string | YES | CSV of Location IDs. |
auto_renew_session | boolean | NO | Set true if you want to automatically renew session_id token |
device_id | string | Only if auto_renew_session is set to true | Device ID for renewing session_id token |
pin | number(4) | Only if auto_renew_session is set to true | PIN set for Device when logging into app. See /createPIN for additional details |
Success Response
json
{
"response": true,
"exception": null,
"autoRenewConfig": {
"sessionIdChanged": true,
"token": "{RENEWED_SESSION_ID}"
}
}Validate User Session Token
Checks whether
SESSION_IDtoken is associated with a User Profile.
plaintext
POST /api/v2/validateRequest Parameters
| Request Parameters | Type | Required | Description |
|---|---|---|---|
session_id | string | YES | UUIDv4 token for authorizing user access |
Success Response
json
{ "session_valid": true }Failure Response
json
{ "session_valid": false }Get User Cashless Key ID (Patron ID)
Gets a user's cashless key id, aka their Patron ID.
plaintext
POST /api/v2/getUserCashlessKeyIdRequest Parameters
| Body Parameters | Type | Required | Description |
|---|---|---|---|
session_id | string | YES | User Session ID Token |
auto_renew_session | boolean | NO | Set true if you want to automatically renew session_id token |
device_id | string | Only if auto_renew_session is set to true | Device ID for renewing session_id token |
pin | number(4) | Only if auto_renew_session is set to true | PIN set for Device when logging into app. See /createPIN for additional details |
Success Response
json
{
"response": {
"id": null,
"userId": "${USER_ID_UUID_V4_STRING}$",
"name": "CashlessKey",
"value": "${CASHLESS_KEY_ID_AKA_PATRON_ID}$"
},
"exception": null
}