MetaData of the opportunities
Gives MetaData of the Opportunities which can be needed while creating an opportunity. Different sections under metadata are :
- Priorities.
- Dispositions.
- Stages.
- Sources.
- Types
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
GET /v1/opportunities/metadata/{section}
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | No |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| section | enum (1, 2, 3, 4, 5) | Yes |
Response
Success (200 OK)
{
"priorities": [
{
"...": "..."
}
],
"stages": [
{
"...": "..."
}
],
"lead_sources": [
{
"...": "..."
}
],
"dispositions": [
{
"...": "..."
}
],
"types": [
"Memberships"
]
}
Response fields
| Field | Type | Description |
|---|---|---|
| priorities | object[] | |
| priorities[].id | string | |
| priorities[].name | string | |
| priorities[].priority | integer | |
| stages | object[] | |
| stages[].id | string | |
| stages[].name | string | |
| stages[].priority | integer | |
| stages[].code | string | |
| stages[].description | object | |
| stages[].active | boolean | |
| lead_sources | object[] | |
| lead_sources[].id | string | |
| lead_sources[].name | string | |
| lead_sources[].code | string | |
| lead_sources[].description | object | |
| lead_sources[].active | boolean | |
| lead_sources[].optional_field_1 | object | |
| lead_sources[].optional_field_2 | object | |
| lead_sources[].optional_field_3 | object | |
| lead_sources[].optional_field_4 | object | |
| dispositions | object[] | |
| dispositions[].id | string | |
| dispositions[].name | string | |
| dispositions[].description | string | |
| dispositions[].followup_days | integer | |
| types | string[] |
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/opportunities/metadata/{section}' \
--header 'Authorization: {{authorization}}'
const response = await fetch('https://api.zenoti.com/v1/opportunities/metadata/{section}', {
method: 'GET',
headers: {
'Authorization': '{{authorization}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/opportunities/metadata/{section}',
headers={
'Authorization': '{{authorization}}',
},
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "{{authorization}}");
var response = await client.GetAsync(
"https://api.zenoti.com/v1/opportunities/metadata/{section}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/opportunities/metadata/{section}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = '{{authorization}}'
response = http.request(request)
data = JSON.parse(response.body)
Error codes
| Status | Description |
|---|---|
| 400 | 400 |
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |