Download OpenAPI specification:
This is the API to interact with Safe Food Pro.
To ensure stability and fair usage, this API enforces rate limiting based on a token bucket algorithm.
Limits are governed by two factors: a steady-state request rate (requests per second) and a maximum burst capacity. If you sustain a traffic volume higher than the allowed rate, or if you send a sudden spike of traffic that exceeds the burst capacity, the API will reject the excess requests and respond with an HTTP 429 Too Many Requests status code.
We strongly encourage all clients and automated integrations to implement exponential backoff with jitter when handling 429 responses. Attempting to immediately retry failed requests without a delay queue will result in sustained rejections and degraded performance.
Informs webhook listener (i.e. subscription target URL) that a new Staff record has been created.
| X-Hook-Signature required | string The HMAC-SHA1 signature of the raw request body, generated using the system-provided X-Hook-Secret as the cryptographic key, and formatted as a hexadecimal digest. |
| payload required | string A new Staff record or a completed Form instance |
required | object (WebSubscriptionHook) |
{- "payload": "A new Staff record or a completed Form instance",
- "hook": {
- "id": "string",
- "target": "string",
- "event": "string"
}
}Informs listener (i.e. subscription target url) that a Form Instance has been completed.
| X-Hook-Signature required | string The HMAC-SHA1 signature of the raw request body, generated using the system-provided X-Hook-Secret as the cryptographic key, and formatted as a hexadecimal digest. |
| payload required | string A new Staff record or a completed Form instance |
required | object (WebSubscriptionHook) |
{- "payload": "A new Staff record or a completed Form instance",
- "hook": {
- "id": "string",
- "target": "string",
- "event": "string"
}
}Returns an array of completed and incomplete form instances for the authenticated organisation.
| from | integer <int64> Example: from=1770083945000 Filter forms submitted from this date (in epoch milliseconds). |
| to | integer <int64> Example: to=1770152764000 Filter forms submitted up to this date (in epoch milliseconds). |
| category | string Example: category=Others Filter by form category. |
| name | string Example: name=Example Form Filter by exact form name. |
| x-organisation-id required | string Specifies the target Organisation ID for the request context. |
[- {
- "formInstanceId": 76484,
- "formId": 12527,
- "answerDate": 1770152764556,
- "isComplete": true,
- "latitude": -36.9110991,
- "longitude": 174.6600517,
- "maxScore": null,
- "actualScore": null,
- "passPercentage": null,
- "formName": "Example Form",
- "combinedActionRequired": "",
- "bulletinSummary": null,
- "whenCreated": 1770152771331,
- "whenLastModified": 1770152780097,
- "initialFormId": 12515,
- "formCategory": "Others",
- "pinnedInstance": null,
- "createdByStaffId": 10046,
- "lastModifiedByStaffId": 10046,
- "formTypeName": "General Task",
- "formTypeColour": "#FF6242",
- "formTypeIcon": "type_task@3x.png",
- "workflowContainerId": null,
- "workflowContainerLabel": null,
- "parentTypeId": null,
- "parentId": null,
- "sourceTypeId": null,
- "sourceId": null,
- "metadata": { },
- "createdByStaffName": "Jane Doe",
- "lastModifiedByStaffName": "Jane Doe"
}
]Create a new user in your organisation.
| x-organisation-id required | string Specifies the target Organisation ID for the request context. |
User to be added to your Organisation
| firstName required | string |
| lastName required | string |
| email required | string |
{- "firstName": "First name",
- "lastName": "Surname",
- "email": "admin@example.com"
}{- "firstName": "First name",
- "lastName": "Surname",
- "email": "admin@example.com",
- "roleName": "Tablet",
- "externalId": "ExtId",
- "organisationId": 1234,
- "organisationName": "Org Name",
- "organisationGroupName": "Org Group Name",
- "whenCreated": 0
}Registers a new webhook subscription. The user and organisation IDs are dynamically derived from your authentication token.
Webhook REST subscription.
| event required | string |
| targetUrl required | string |
| userEmail required | string |
{- "event": "staff.create",
- "userEmail": "user@example.com"
}{- "restSubscriptionId": 0,
- "event": "staff.create",
- "userId": 0,
- "organisationId": 0,
- "userEmail": "user@example.com",
- "xHookSecret": "815d6471-2fff-4027-bc9f-45e9ac1ddd2b",
- "whenAdded": 0,
- "whenActivated": 0,
- "whenDeleted": 0
}Updates an existing webhook subscription. The user and organisation IDs are dynamically derived from your authentication token.
| id required | integer <int32> ID of the webhook subscription. |
Webhook REST subscription.
| event required | string |
| targetUrl required | string |
| userEmail required | string |
{- "event": "staff.create",
- "userEmail": "user@example.com"
}{- "restSubscriptionId": 0,
- "event": "staff.create",
- "userId": 0,
- "organisationId": 0,
- "userEmail": "user@example.com",
- "xHookSecret": "815d6471-2fff-4027-bc9f-45e9ac1ddd2b",
- "whenAdded": 0,
- "whenActivated": 0,
- "whenDeleted": 0
}