Official Operators
This endpoint is responsible for managing the creation, invitation, and viewing of official operators within the system. It handles operations such as sending email invitations, importing operators from a CSV file, accepting invitations, and viewing operators for a given company.

1. Create Operator Invitation Manually
Endpoint : POST /create-operator-invitation
Description: Manually create an operator invitation and send an email to the operator.
Request Body:
{
"email": "string",
"company_id": "uuid",
"vat_number": "string"
}
Response
Status | Description |
---|---|
200 OK | Operator invitation created successfully. |
400 Bad Request | The operator is not from the same country as the company or an error occurred in the invitation process. |
500 Internal Server Error | Failed to create the invitation due to an unexpected error. |
Response Object:
{
"message": "Invitation created successfully",
"ok": true
}
2. Import Operators from CSV
POST /import-operators
Description: Handle CSV file upload to create multiple operator invitations.
Request Body:
{
"file": "File",
"company_id": "uuid"
}
Response
Status | Description |
---|---|
200 OK | All operators were imported successfully. |
400 Bad Request | Some operators were not imported successfully or there were missing fields in the CSV. |
500 Internal Server Error | Failed to import operators due to an unexpected error. |
Response:
{
"message": "Operators imported successfully",
"ok": true
}
3. Accept Invitation
POST /accept-invitation
Description: Accept an invitation sent to an operator and add them to the workspace.
Request Body:
{
"invitationId": "uuid"
}
Response
Status | Description |
---|---|
200 OK | Invitation accepted successfully and the user was added to the workspace. |
400 Bad Request | The invitation has expired or the user is already a member of the workspace. |
406 Not Acceptable | No invitation found or no user found for the provided email. |
500 Internal Server Error | Failed to accept the invitation due to an unexpected error. |
Response Object:
{
"message": "Invitation accepted successfully",
"ok": true
}
4. View Operators
GET /view-operators/:companyId
Description: View all operators associated with a given company.
Parameter:
companyId
: The ID of the company whose operators are to be viewed.
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the list of operators. |
500 Internal Server Error | Failed to retrieve the list of operators due to an unexpected error. |
Response Object:
{
"operators": {
"email": "string",
"country_code": "string",
"created_at": "string",
"partner_id": "string"
}
}