Forms

Resource Fields

Name Type Read-only Description
title string
is_visible_to_customers boolean Is the form visible to the end user

Default: false
customer_title string
customer_titles Field Locales
description string
descriptions Field Locales
is_enabled boolean Default: true
is_default boolean Default: false
is_deleted boolean
sort_order integer Ordering of the field relative to other fields
fields Fields
brand Brands
created_at timestamp ISO-8601 Format
updated_at timestamp ISO-8601 Format

Metadata




 
 




Actions

Retrieve all forms

GET /api/v1/cases/forms.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope configuration
Ordered by sort_order (ascending)

Collaborators and Agents can see the enabled forms.

Response

    {
        "status": 200,
        "data": [
            {
    "id": 1,

    "title": "Maintenance job form",
    "is_visible_to_customers": true,
    "customer_title": "Maintenance job form",
    "customer_titles": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "description": null,
    "descriptions": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "is_enabled": true,
    "is_default": false,
    "is_deleted": false,
    "sort_order": 1,
    "fields": [
        {
    "id": 1,

    "resource_type": "case_field"

}
    ],
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "created_at": "2015-07-31T13:28:05+05:00",
    "updated_at": "2015-07-31T13:28:05+05:00",

    "resource_type": "case_form"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/forms/1"

}


        ],
        "resource": "case_form",
        "total_count": 1
    }

Retrieve a form

GET /api/v1/cases/forms/:id.json

Information

Allowed for Collaborators, Agents, Admins & Owners
Scope configuration

Collaborators and Agents can see the enabled fields.

Response

    {
        "status": 200,
        "data": {
    "id": 1,

    "title": "Maintenance job form",
    "is_visible_to_customers": true,
    "customer_title": "Maintenance job form",
    "customer_titles": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "description": null,
    "descriptions": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "is_enabled": true,
    "is_default": false,
    "is_deleted": false,
    "sort_order": 1,
    "fields": [
        {
    "id": 1,

    "resource_type": "case_field"

}
    ],
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "created_at": "2015-07-31T13:28:05+05:00",
    "updated_at": "2015-07-31T13:28:05+05:00",

    "resource_type": "case_form"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/forms/1"

}

,
        "resource": "case_form"
    }

Add a form

POST /api/v1/cases/forms.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
case_field_ids string
is_visible_to_customers boolean Is the form visible to the end user Default: false
customer_titles string
Only applicable when "Customers can see this form" is enabled
descriptions string User-defined description
brand_id integer

Response

    {
        "status": 201,
        "data": {
    "id": 1,

    "title": "Maintenance job form",
    "is_visible_to_customers": true,
    "customer_title": "Maintenance job form",
    "customer_titles": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "description": null,
    "descriptions": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "is_enabled": true,
    "is_default": false,
    "is_deleted": false,
    "sort_order": 1,
    "fields": [
        {
    "id": 1,

    "resource_type": "case_field"

}
    ],
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "created_at": "2015-07-31T13:28:05+05:00",
    "updated_at": "2015-07-31T13:28:05+05:00",

    "resource_type": "case_form"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/forms/1"

}

,
        "resource": "case_form"
    }

Update a form

PUT /api/v1/cases/forms/:id.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
is_visible_to_customers boolean
customer_titles string Only applicable when "Customers can see this field" is enabled
descriptions string User-defined description
is_enabled boolean
case_field_ids string Warning: All conversation field ids must be passed on update except system field ids. ids that are not passed will be removed
brand_id integer If pass null or empty, then linking of brand with this form will get remove.

Response

    {
        "status": 200,
        "data": {
    "id": 1,

    "title": "Maintenance job form",
    "is_visible_to_customers": true,
    "customer_title": "Maintenance job form",
    "customer_titles": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "description": null,
    "descriptions": 

[






{
    "id": 1,

    "resource_type": "locale_field"

},






{
    "id": 2,

    "resource_type": "locale_field"

}    
],
    "is_enabled": true,
    "is_default": false,
    "is_deleted": false,
    "sort_order": 1,
    "fields": [
        {
    "id": 1,

    "resource_type": "case_field"

}
    ],
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "created_at": "2015-07-31T13:28:05+05:00",
    "updated_at": "2015-07-31T13:28:05+05:00",

    "resource_type": "case_form"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/forms/1"

}

,
        "resource": "case_form"
    }

Mark as default

PUT /api/v1/cases/forms/default.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
form_id integer

Response

{
    "status": 200
}

Update forms

PUT /api/v1/cases/forms.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Parameters

Name Type Mandatory Description
is_enabled boolean

Response

{
    "status": 200,
    "total_count": 2
}

Reorder forms

PUT /api/v1/cases/forms/reorder.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
form_ids string
Pass the forms in order you want to set

Response

{
    "status": 200,
    "total_count": 3
}

Delete a form

DELETE /api/v1/cases/forms/:id.json

Information

Allowed for Admins & Owners
Scope configuration

Response

{
    "status": 200
}

Delete forms

DELETE /api/v1/cases/forms.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Response

{
    "status": 200,
    "total_count": 2
}