Skip to main content

List Categories

Method#

/business/available-categories?query={{SEARCH_STRING (optional)}}#

GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/business/available-categories

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method allows you to list the available categories that can be assigned to a business/company.

Important

This method is only available for WhatsApp Business accounts.


Attributes#

Optional#

AttributesTypeDescription
querystringCategory search parameter. Example: "technology"

Request Params#

Example URL#

Method

GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/business/available-categories?query=technology

Response#

200#

AttributeTypeDescription
displayNamestringCategory name to be displayed
idstringCategory identifier. Must be sent in the request to assign categories to the business
label(Optional) stringCan also be provided in the request to assign categories to the business

Example

[
{
"displayName": "Other Companies",
"label": "OTHER_COMPANIES",
"id": "629412378414563"
},
{
"displayName": "Automotive Service",
"id": "1223524174334504"
}
]

405#

In this case, make sure you are correctly sending the method specification, i.e., check if you sent POST or PUT as specified at the beginning of this topic.

415#

If you receive a 415 error, make sure to add the "Content-Type" header to the request object you are sending, which in most cases is "application/json".


Code#