Delphi (DLL) / Support API / Create Ticket Form
Back to Collection Items
var
begin
CkHttp_putBasicAuth(http,True);CkHttp_putLogin(http,'login');CkHttp_putPassword(http,'password');CkHttpResponse_GetBodySb(resp,sbResponseBody);CkJsonObject_LoadSb(jResp,sbResponseBody);CkJsonObject_putEmitCompact(jResp,False);CkJsonObject_putI(jResp,i);aliqua6 := CkJsonObject__stringOf(jResp,'ticket_form.agent_conditions[i].aliqua6');Lorem_d := CkJsonObject__stringOf(jResp,'ticket_form.agent_conditions[i].Lorem_d');mollit_cf := CkJsonObject_IntOf(jResp,'ticket_form.agent_conditions[i].mollit_cf');ullamco_f7 := CkJsonObject__stringOf(jResp,'ticket_form.agent_conditions[i].ullamco_f7');consequate_ := CkJsonObject__stringOf(jResp,'ticket_form.agent_conditions[i].consequate_');consectetur_00 := CkJsonObject_IntOf(jResp,'ticket_form.agent_conditions[i].consectetur_00');laborum50 := CkJsonObject__stringOf(jResp,'ticket_form.agent_conditions[i].laborum50');i := i + 1;i := 0;count_i := CkJsonObject_SizeOfArray(jResp,'ticket_form.end_user_conditions');CkJsonObject_putI(jResp,i);irure__c := CkJsonObject_BoolOf(jResp,'ticket_form.end_user_conditions[i].irure__c');Excepteur_38 := CkJsonObject__stringOf(jResp,'ticket_form.end_user_conditions[i].Excepteur_38');sunt_8 := CkJsonObject__stringOf(jResp,'ticket_form.end_user_conditions[i].sunt_8');nulla_48 := CkJsonObject__stringOf(jResp,'ticket_form.end_user_conditions[i].nulla_48');ullamco_f6 := CkJsonObject__stringOf(jResp,'ticket_form.end_user_conditions[i].ullamco_f6');i := i + 1;i := 0;count_i := CkJsonObject_SizeOfArray(jResp,'ticket_form.restricted_brand_ids');CkJsonObject_putI(jResp,i);strVal := CkJsonObject__stringOf(jResp,'ticket_form.restricted_brand_ids[i]');i := i + 1;i := 0;count_i := CkJsonObject_SizeOfArray(jResp,'ticket_form.ticket_field_ids');CkJsonObject_putI(jResp,i);strVal := CkJsonObject__stringOf(jResp,'ticket_form.ticket_field_ids[i]');i := i + 1;
Curl Command
curl -u login:password -X POST
-H "Accept: application/json"
https://example.zendesk.com/api/v2/ticket_forms
Postman Collection Item JSON
{
"name": "Create Ticket Form",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/ticket_forms",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"ticket_forms"
]
},
"description": "#### Allowed For\n\n* Admins\n"
},
"response": [
{
"name": "Created response",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/ticket_forms",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"ticket_forms"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"ticket_form\": {\n \"name\": \"<string>\",\n \"active\": \"<boolean>\",\n \"agent_conditions\": [\n {\n \"aliqua6\": \"proident deserunt\",\n \"Lorem_d\": \"cillum dolor Excepteur ut\",\n \"mollit_cf\": -33059877,\n \"ullamco_f7\": \"dolore occaeca\"\n },\n {\n \"consequate_\": 29214347.18513973,\n \"consectetur_00\": 83697330,\n \"laborum50\": \"cillum Ut\"\n }\n ],\n \"created_at\": \"<dateTime>\",\n \"default\": \"<boolean>\",\n \"display_name\": \"<string>\",\n \"end_user_conditions\": [\n {\n \"irure__c\": false,\n \"Excepteur_38\": -15203265.607602075,\n \"sunt_8\": \"culpa laboris Ut\"\n },\n {\n \"nulla_48\": \"quis esse\",\n \"ullamco_f6\": -25516091.19614251\n }\n ],\n \"end_user_visible\": \"<boolean>\",\n \"id\": \"<integer>\",\n \"in_all_brands\": \"<boolean>\",\n \"position\": \"<integer>\",\n \"raw_display_name\": \"<string>\",\n \"raw_name\": \"<string>\",\n \"restricted_brand_ids\": [\n \"<integer>\",\n \"<integer>\"\n ],\n \"ticket_field_ids\": [\n \"<integer>\",\n \"<integer>\"\n ],\n \"updated_at\": \"<dateTime>\",\n \"url\": \"<string>\"\n }\n}"
}
]
}