Open API Specs
You can find the API documentation underneath. You can also download the OpenAPI Specification file and import it in the tool of your choice (Postman, SwaggerUI etc...).
This documentation should be up-to-date since no changes can be made without them being validated by unit tests in our CI.
GA SmartBuilding Badge Server 1.0.0
This API is used to distribute badge numbers across all GA's buildings. It is meant to make them unique to prevent security issues
Endpoints
POST /v1/badge
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
applicationid |
header | string | No | Your application ID | |
udid |
header | string | No | Your device ID |
Request body
{
"userId": "string",
"metadata": {
"deviceModel": "string",
"os": "string",
"osVersion": "string",
"sdkVersion": "string"
}
}
Schema of the request body
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"deviceModel": {
"type": "string"
},
"os": {
"type": "string"
},
"osVersion": {
"type": "string"
},
"sdkVersion": {
"type": "string"
}
}
}
}
}
Response 200 OK
{
"badgeId": "string"
}
Schema of the response body
{
"type": "object",
"required": [
"badgeId"
],
"properties": {
"badgeId": {
"type": "string"
}
}
}
Response 201 Created
{
"badgeId": "string",
"publicKey": "string"
}
Schema of the response body
{
"type": "object",
"required": [
"badgeId",
"publicKey"
],
"properties": {
"badgeId": {
"type": "string"
},
"publicKey": {
"type": "string"
}
}
}
Response 401 Unauthorized
{
"error": "INVALID_APPLICATIONID"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_APPLICATIONID"
]
}
}
}
Response 422 Unprocessable Entity
{
"error": "UNDEFINED_APPLICATIONID"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"UNDEFINED_APPLICATIONID",
"UNDEFINED_UDID",
"UNDEFINED_USERID"
]
}
}
}
POST /v1/badge/sign
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
applicationid |
header | string | No | Your application ID | |
udid |
header | string | No | Your device ID |
Request body
{
"base64": "string"
}
Schema of the request body
{
"type": "object",
"properties": {
"base64": {
"type": "string"
}
}
}
Response 200 OK
{
"signature": "string"
}
Schema of the response body
{
"type": "object",
"required": [
"signature"
],
"properties": {
"signature": {
"type": "string"
}
}
}
Response 401 Unauthorized
{
"error": "INVALID_APPLICATIONID"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_APPLICATIONID"
]
}
}
}
Response 422 Unprocessable Entity
{
"error": "UNDEFINED_BASE64"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"UNDEFINED_BASE64"
]
}
}
}
GET /v1/badges
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
applicationid |
header | string | No | Your application ID | |
applicationsecret |
header | string | No | Your application Secret | |
cursor |
query | string | No | The pagination cursor. Is available in a response "pagination-cursor" header. | |
per_page |
query | string | No | The number of items per page |
Response 200 OK
{
"badges": [
{
"id": "string",
"userId": "string",
"metadata": {
"deviceModel": "string",
"os": "string",
"osVersion": "string",
"sdkVersion": "string"
}
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"badges": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"userId"
],
"properties": {
"id": {
"type": "string"
},
"userId": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"deviceModel": {
"type": "string"
},
"os": {
"type": "string"
},
"osVersion": {
"type": "string"
},
"sdkVersion": {
"type": "string"
}
}
}
}
}
}
}
}
Response 401 Unauthorized
{
"error": "INVALID_CREDENTIALS"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_CREDENTIALS"
]
}
}
}
GET /v1/users/{id}/badges
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
applicationid |
header | string | No | Your application ID | |
applicationsecret |
header | string | No | Your application Secret | |
cursor |
query | string | No | The pagination cursor. Is available in a response "pagination-cursor" header. | |
per_page |
query | string | No | The number of items per page |
Response 200 OK
{
"badges": [
{
"id": "string",
"userId": "string",
"metadata": {
"deviceModel": "string",
"os": "string",
"osVersion": "string",
"sdkVersion": "string"
}
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"badges": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"userId"
],
"properties": {
"id": {
"type": "string"
},
"userId": {
"type": "string"
},
"metadata": {
"type": "object",
"properties": {
"deviceModel": {
"type": "string"
},
"os": {
"type": "string"
},
"osVersion": {
"type": "string"
},
"sdkVersion": {
"type": "string"
}
}
}
}
}
}
}
}
Response 401 Unauthorized
{
"error": "INVALID_CREDENTIALS"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_CREDENTIALS"
]
}
}
}
POST /v1/invitation
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
applicationid |
header | string | No | Your application ID | |
udid |
header | string | No | Your device ID |
Request body
{
"expiresAt": "2021-01-30T08:30:00Z"
}
Schema of the request body
{
"type": "object",
"properties": {
"expiresAt": {
"type": "string",
"format": "date-time",
"description": "Creation date and time (ISO 8601)",
"example": "2021-01-30T08:30:00Z"
}
}
}
Response 201 Created
{
"id": "string",
"badgeId": "string",
"expiresAt": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"badgeId": {
"type": "string"
},
"expiresAt": {
"type": "string"
}
}
}
Response 401 Unauthorized
{
"error": "INVALID_APPLICATIONID"
}
Schema of the response body
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "string",
"enum": [
"INVALID_APPLICATIONID",
"INVALID_CREDENTIALS"
]
}
}
}