Skip to main content

Uniphore Help Center Portal

Fetch Fact-Organization Mapping API

This API retrieves the Organization and its associated details for which the System Facts were customized. It returns the Organization mappings modified for the specified System Fact.

Endpoint

Method: GET

URL: https://<base-api-url>/uzng-conversation-facts-backend/cf/v2/fact-org-mapping/<fact-id>?orgIds=<list-of-org-ids-to-filter>

curl --location --request GET 'https://<base-api-url>/uzng-conversation-facts-backend/cf/v2/fact-org-mapping/<fact-id>?orgIds=<list-of-org-ids-to-filter>' \
--header 'Authorization: Bearer <token>'
Header Parameter
Authorization - Bearer <Token>

Note

To obtain an authorization token, click here.

Path Parameter

Parameter Name

Data type

Description

Required/ Optional

FactId

String

The ID of the System Fact.

Required

Query Parameter

Parameter Name

Data type

Description

Required/ Optional

orgIds

String

List of Organization IDs for which the System Facts were customized.

Optional

Sample Response
{
  "success": true,
  "result": [
    {
      "id": "64a1b2c3d4e5f6g7h8i9j0k1",
      "factId": "fact_123",
      "tenantId": "tenant_xyz",
      "orgIds": ["org1"],
      "factName": "Customer Satisfaction",
      "query": "Rate customer satisfaction",
      "responseType": "CATEGORICAL",
      "choices": ["Excellent", "Good", "Fair", "Poor"],
      "allowOther": false,
      "status": "APPROVED",
      "version": 1,
      "createdDate": 1702834567890,
      "updatedDate": 1702834567890
    },
    {
      "id": "64a1b2c3d4e5f6g7h8i9j0k2",
      "factId": "fact_123",
      "tenantId": "tenant_xyz",
      "orgIds": ["org2"],
      "factName": "Customer Satisfaction",
      "query": "Rate customer satisfaction",
      "responseType": "CATEGORICAL",
      "choices": ["Very Satisfied", "Satisfied", "Neutral", "Dissatisfied"],
      "allowOther": true,
      "status": "APPROVED",
      "version": 1,
      "createdDate": 1702834567890,
      "updatedDate": 1702834567890
    }
  ]
}
Response and Error Codes

Code

Condition

Description

200

OK

Fact org mappings fetched successfully.

400

Bad request

The values provided in the request parameters are invalid.

401

Unauthorized

A valid bearer token is required for authorization, or the token doesn’t have the required permission.

404

Not Found

Provided fact ID not found.

500

Internal Server Error

An unexpected issue occurred on the server side. Retry after some time.