Method: https://oms.tpl.com.br/api/get/ticket_fields_department

Objective: Returns the available fields for a specific Zoho Desk department, including custom fields, categories, statuses and priorities. Also returns a ready-to-use payload template for the put/create_ticket endpoint.
          
            
Method: GET
URL: https://oms.tpl.com.br/api/get/ticket_fields_department

Authentication
Base64 token generated by /api/get/auth endpoint ("auth" field)

Request JSON (via body or querystring)
{
"auth": "BASE64_TOKEN",
"departmentName": "TECNOLOGIA",
"departmentId": "123456789"
}

Note: Provide departmentName or departmentId (at least one is required).
Note: Accepts parameters via querystring (?auth=...&departmentName=...) or JSON body.

Required fields: auth, departmentName or departmentId

Response JSON (Success - HTTP 200)
{
"success": true,
"department": {
"name": "TECNOLOGIA",
"id": "123456789"
},
"layout": {
"id": "987654321",
"name": "Standard Layout"
},
"contactId": "111222333",
"template": {
"auth": "BASE64_TOKEN",
"subject": "",
"description": "",
"departmentName": "TECNOLOGIA",
"departmentId": "123456789",
"layoutId": "987654321",
"priority": "",
"status": "",
"contactId": "111222333",
"channel": "EMAIL",
"cf": {
"cf_numero_do_pedido": "",
"cf_numero_da_nota_fiscal": "",
"cf_custom_field": ""
},
"category": ""
},
"fields": [
{
"section": "Case Information",
"apiName": "cf_numero_do_pedido",
"displayLabel": "Order Number",
"type": "Text",
"isMandatory": false,
"isSystemMandatory": false,
"allowedValues": null,
"defaultValue": null,
"maxLength": 255,
"toolTip": null
},
{
"section": "Case Information",
"apiName": "category",
"displayLabel": "Category",
"type": "Picklist",
"isMandatory": false,
"isSystemMandatory": false,
"allowedValues": ["Category A", "Category B"],
"defaultValue": null,
"maxLength": null,
"toolTip": null
},
{
"section": "Case Information",
"apiName": "priority",
"displayLabel": "Priority",
"type": "Picklist",
"isMandatory": false,
"isSystemMandatory": false,
"allowedValues": ["Low", "Medium", "High"],
"defaultValue": null,
"maxLength": null,
"toolTip": null
}
]
}
Note: The "template" field can be copied directly and used in the put/create_ticket endpoint — just fill in the empty fields.

Response JSON (Error)
HTTP 400:
{ "success": false, "error": "departmentName or departmentId is required" }
{ "success": false, "error": "Department not found: NAME" }
HTTP 401:
{ "success": false, "error": "auth is required" }
{ "success": false, "error": "invalid auth" }
{ "success": false, "error": "Invalid credentials" }
{ "success": false, "error": "Invalid user" }
HTTP 403:
{ "success": false, "error": "Client blocked" }
HTTP 500:
{ "success": false, "error": "Default layout not found for department" }
{ "success": false, "error": "Internal error: ..." }