Get the choices for a new ticket
Answers what the New Ticket form offers you: the departments, the priorities, the websites a ticket can be about and, once you give websites, their environments. An agency chooses a company first: until company_id is given, websites is null, and websites given without it are refused.
Query parameters
The company the ticket would be for, when the form asks. At least 1.
The websites whose environments to list: up to 50 ids, comma-separated.
One website, in place of website_ids. At least 1.
Returns
200 The choices.
Fields of the 200 answer
Whether the form asks which company the ticket is for, as it does for an agency.
Those companies. Null when the form does not ask.
Fields of each item
At least 1.
The company you gave. At least 1.
emergencyhighmediumlowFields of each item
At least 1.
What the form tells you when you choose Emergency. Null when nothing is set.
The same environments under their website.
Fields of each item
Fields of each item
At least 1.
At least 1.
Every environment of those websites. Null until you give a website.
Fields of each item
At least 1.
At least 1.
Fields of each item
emergencyhighmediumlowThe first of the websites you gave. At least 1.
The websites you gave.
The websites a ticket can be about. Null when the form asks for a company and company_id was not given.
Fields of each item
At least 1.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
422 | invalid | Fix the field named in field; errors says why. |
429 | rate_limited | Wait for the seconds in Retry-After. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl https://manage.corefinity.com/api/support/ticket-options \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/support/ticket-options');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/support/ticket-options', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/support/ticket-options",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"chooses_company": false,
"companies": null,
"company_id": null,
"default_priority": "medium",
"departments": [
{
"id": 21,
"name": "Support"
},
{
"id": 22,
"name": "Billing"
}
],
"emergency_notice": null,
"environment_groups": [
{
"environments": [
{
"id": 1311,
"name": "Production"
},
{
"id": 1312,
"name": "Staging"
}
],
"website_id": 1310,
"website_name": "Harbour & Finch trade"
}
],
"environments": [
{
"id": 1311,
"name": "Production",
"website_id": 1310
},
{
"id": 1312,
"name": "Staging",
"website_id": 1310
}
],
"priorities": [
{
"label": "Emergency",
"value": "emergency"
},
{
"label": "High",
"value": "high"
},
{
"label": "Medium",
"value": "medium"
},
{
"label": "Low",
"value": "low"
}
],
"website_id": 1310,
"website_ids": [
1310
],
"websites": [
{
"id": 1310,
"name": "Harbour & Finch trade"
},
{
"id": 1320,
"name": "Harbour & Finch outlet"
}
]
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"code": "invalid",
"errors": {
"company_id": [
"You raise tickets for your own company, so there is no company to choose."
]
},
"field": "company_id",
"message": "You raise tickets for your own company, so there is no company to choose.",
"reason": "invalid"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}