List

This endpoint will retrieve the list of all the collections associated to a specific bot.

Request

The following request will fetch the existing collections in the bot specified in the request token.

curl --location --request GET 'https://<SERVICE ENDPOINT>/data/collections' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'

Response

If successful, the response will contain the list of all the collections associated with bot specified in the request token.

[
    {
        "CollectionId": "The ID of the collection",
        "Name": "Name of the collection",
        "Fields": [{
            "Group": "Group of the Field",
            "Name": "Name of the Field",
            "Value": "Value of the Field",
            "Mandatory": boolean,
            "DisplayInView": boolean,
            "Indexed": boolean,            
            "Type": number,
            "OrderField": "The position of the field",            
        }],
    }
]

The Type property is a number that goes from 0 to 8 that specifies the Field Type.

Text            = 0,
LongText        = 1,
MultiChoice     = 2,
Date            = 3,
DateTime        = 4,
IntegerNumber   = 5,
DecimalNumber   = 6,
Boolean         = 7,
Upload          = 8

Response Codes

This endpoint will reply with the following standard HTTP codes.

Code

Meaning

200

Ok. The request has been successfully fulfilled.

400

Bad Request. The supplied token is invalid or does not have enough permissions.

401

Unauthorized. The account associated to the token is not authorized

404

Not Found. The account or the chatbot specified could not be found.

Last updated

Was this helpful?