SpectR API uses a two-step authentication process:
Tokens expire after a configured period. Check the expiresAt field in the response and refresh the token before it expires.
POST https://spectr.sdsoft.cz/auth/v1/api-key/token
POST https://spectr.sdsoft.cz/auth/v1/api-key/token
X-Api-Key: your-api-key-here
X-Tenant-Id: your-tenant-id-here
None
Success (200 OK):
{
"apiKeyIdentityId": "string",
"token": "string",
"expiresAt": "2023-12-31T23:59:59Z"
}
Error (400 Bad Request): If headers are missing.
Error (401 Unauthorized): If authentication fails.
The returned token has an expiration time specified in the expiresAt field. You must refresh the token before it expires by calling this endpoint again. Store the expiresAt value and refresh proactively to avoid authentication failures.
POST https://spectr.sdsoft.cz/station/v1/inspections/single-sku
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...).
POST https://spectr.sdsoft.cz/station/v1/inspections/single-sku
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Content-Type: application/json
{
"stationId": "uuid",
"timeStamp": "2023-12-31T23:59:59Z",
"slotsCount": 1,
"slots": [
{
"x_axis": 1,
"y_axis": 1,
"productId": 123,
"sku": "SKU123",
"quantity": 1
}
]
}
Success (202 Accepted): Inspection accepted.
Error: Various error responses based on validation.