Server Setup Information
• License Type: Community Edition (CE)
• Number of Users: 5
• Server Hardware: VPS
• Version of Rocket.Chat Server: 7.3.3
• Operating System: CentOS 7.9.2009 x86_64 (Python 3.12.3)
• Deployment Method: Docker
• Number of Running Instances: 1
• DB Replicaset Oplog: No
• MongoDB Version: 6
Client Information
• Client Type: API Request via n8n
• Rocket.Chat Version: 7.3.3
• API Method Used: GET and POST to /api/v1/omnichannel/contacts.get
• Tool Used for Requests: n8n
Problem Description
I am attempting to retrieve an omnichannel contact using the /api/v1/omnichannel/contacts.get endpoint. According to the official API documentation, this request should accept either contactId or visitor as a parameter, but not both. However, when sending a request with only visitor, the API returns an error stating that contactId is missing.
Observed Behavior
• When making a request using visitor instead of contactId, the API returns:
{
"success": false,
"error": "must have required property 'contactId' [invalid-params]",
"errorType": "invalid-params"
}
• This contradicts the API documentation, which states that either contactId or visitor should be valid for retrieving a contact.
• When using contactId alone, the request works correctly and retrieves the expected contact data.
Steps to Reproduce
- Make a POST request to /api/v1/omnichannel/contacts.get with the following JSON body:
{
"visitor": {
"visitorId": "[visitorId]",
"source": {
"type": "[type]"
}
}
}
- Observe that the API rejects the request with an error stating that contactId is required.
Expected Behavior
• When sending a request with visitor, the API should return the corresponding contact information, as described in the documentation.
• The API should not require contactId when visitor is provided.
Actual Behavior
• The API incorrectly rejects the request, stating that contactId is missing, even when visitor is included as per the documentation.
• The API does not process the visitor object correctly.
• Using contactId alone works as expected, meaning the issue is specifically related to handling visitor.
Questions & Debugging Attempts
• Is the /api/v1/omnichannel/contacts.get endpoint currently supporting retrieval by visitor as documented on https://developer.rocket.chat/apidocs/get-omnichannel-contact ?
• Is there any additional configuration required to enable visitor-based lookups?
• Are there logs available that show how the API is processing these requests?
• Could this be a documentation issue where visitor is actually not supported, despite being mentioned in the API reference?
• Since contactId works correctly, does this mean that visitor is currently unsupported or broken?
I would appreciate any guidance on resolving this issue, as it appears to be a mismatch between the documented API behavior and the actual implementation.
Thank you in advance for your support!