Create Request
Create a multi-participant data collection request
POST /di/collection-request/
Properties
| Property | Description |
|---|---|
templateId | Form Id under which the request is created. Must be a valid ObjectId of an existing form |
childAccountId | (Optional) Child account under which the request is created. Must be a valid ObjectId |
minimumParticipants | (Optional) Minimum number of participants required. Defaults to 1 |
maximumParticipants | (Optional) Maximum number of participants allowed. Defaults to 1 |
participantList | (Optional) List of invited participants. Can be empty; cannot contain more entries than maximumParticipants |
webhookUrl | (Optional) URL to receive status change notifications |
webhookSecret | (Optional) Secret used to verify webhook signatures |
webhookIdentifier | (Optional) Custom identifier included in webhook payloads |
Note: The API does not reject a request without
templateId. It creates a request with no form attached (titleisnullandtemplateId/templateare omitted), so always sendtemplateId.
Body
CreateCollectionRequestDto {
templateId: string;
childAccountId?: string;
minimumParticipants?: number;
maximumParticipants?: number;
participantList?: ParticipantDetails[];
webhookUrl?: string;
webhookSecret?: string;
webhookIdentifier?: string;
}ParticipantDetails
Provide an email, a phoneNumber, or both for each participant. All fields are optional.
ParticipantDetails {
email?: string; // must be a valid email address
phoneNumber?: string; // country code + number, e.g. "916123456789"
name?: string;
isAdmin?: boolean;
}Example request
curl --request POST 'https://api.qidpro.xyz/di/collection-request/' \
--header 'Authorization: Bearer your-secret-key' \
--header 'tokenId: your-token-id' \
--header 'Content-Type: application/json' \
--data '{
"templateId": "6a1c2e3f4a5b6c7d8e9f0a1b",
"childAccountId": "6a0b1c2d3e4f5a6b7c8d9e10",
"minimumParticipants": 1,
"maximumParticipants": 5,
"participantList": [
{
"email": "[email protected]",
"phoneNumber": "916123456789",
"name": "Guest One",
"isAdmin": true
},
{
"email": "[email protected]",
"name": "Guest Two",
"isAdmin": false
}
],
"webhookUrl": "https://your-server.com/webhooks/qid",
"webhookSecret": "your-webhook-secret",
"webhookIdentifier": "hotel_checkin_123"
}'Example response
201 Created
{
"deleteTime": null,
"childAccountId": "6a0b1c2d3e4f5a6b7c8d9e10",
"account_id": "6a0b1c2d3e4f5a6b7c8d9e0f",
"title": "Guest Check-In",
"templateId": "6a1c2e3f4a5b6c7d8e9f0a1b",
"participantList": [
{
"email": "[email protected]",
"phoneNumber": "916123456789",
"name": "Guest One",
"isAdmin": true
},
{
"email": "[email protected]",
"name": "Guest Two",
"isAdmin": false
}
],
"minimumParticipants": 1,
"maximumParticipants": 5,
"shareStatus": "open",
"webhookUrl": "https://your-server.com/webhooks/qid",
"webhookSecret": "your-webhook-secret",
"webhookIdentifier": "hotel_checkin_123",
"_id": "6b1f2a3c4d5e6f7a8b9c0d1e",
"createTime": "2026-11-10T11:45:00.242Z",
"lastUpdateTime": "2026-11-10T11:45:00.242Z",
"__v": 0,
"template": "6a1c2e3f4a5b6c7d8e9f0a1b"
}The title is copied from the form's purpose. In this response template is the form Id as a string; Read Request returns the full form object instead. Participant entries are stored exactly as sent.
Errors
Errors return the following shape:
{
"statusCode": 400,
"errorCode": "Bad Request",
"error": "Bad Request",
"message": "templateId must be a mongodb id",
"timestamp": "2026-11-10T11:45:00.475Z",
"path": "/di/collection-request/",
"requestId": "a572cfc7-9fc7-4ad5-b474-76ce99b2748b"
}| Status | errorCode | message |
|---|---|---|
400 | Bad Request | templateId must be a mongodb id / childAccountId must be a mongodb id |
400 | Bad Request | Validation messages joined by , , e.g. minimumParticipants must be a number conforming to the specified constraints, participantList must be an array or participantList.0.email must be an email, participantList.0.isAdmin must be a boolean value |
400 | Bad Request | Unexpected end of JSON input (malformed JSON body; this response has no requestId) |
400 | COLLECTION_REQUEST_INVALID_PARTICIPANT_BOUNDS | minimumParticipants cannot exceed maximumParticipants |
400 | COLLECTION_REQUEST_PARTICIPANT_LIST_TOO_LARGE | participantList exceeds maximumParticipants |
404 | TEMPLATE_NOT_FOUND | Template not found |
401 | — | Error: Token Missing or HttpException: No record found with the provided Token ID |
401 responses have no errorCode or error fields:
{
"statusCode": 401,
"message": "Error: Token Missing",
"timestamp": "2026-11-10T11:44:35.914Z",
"path": "/di/collection-request/",
"requestId": "f77acb97-370c-4f06-9746-b2adbe4e28b0"
}Guest check-in URL
After creating a collection request, share the guest check-in link with participants. Replace :requestId with the _id returned from the create response.
| Environment | Guest check-in URL |
|---|---|
| Production | https://collect.oneqid.com/request/:requestId |
| Staging | https://devcollect.oneqid.com/request/:requestId |
Example (production):
https://collect.oneqid.com/request/6b1f2a3c4d5e6f7a8b9c0d1eUpdated 17 days ago