Locales

Resource Fields

Name Type Read-only Description
locale string
flag_icon string
name string
native_name string
region string
native_region string
script string
variant string
direction string RTL, LTR
is_public boolean Indicates that the locale is available to customers
is_localized boolean Indicates whether or not the agent area is available in this locale
created_at timestamp ISO-8601 Format
updated_at timestamp ISO-8601 Format

Metadata




 
 




Actions

Retrieve locales

GET /api/v1/locales.json

Information

Allowed for Public

Arguments

Name Type Mandatory Description
is_public boolean
is_localized boolean

Response

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

    "locale": "en-us",
    "name": "English",
    "native_name": "English (United States)",  
    "region": "US",
    "native_region":"United States",  
    "script": "",
    "variant": "",
    "direction": "ltr",
    "is_public": true,
    "is_localized": true,
    "created_at": "2016-03-15T06:09:23Z",
    "updated_at": "2016-03-15T06:09:23Z",

    "resource_type": "locale"

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

}
        ],
        "resource": "locale",
        "total_count": 2
    }

Retrieve a locale

GET /api/v1/locales/:id.json

Information

Allowed for Public

Response

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

    "locale": "en-us",
    "name": "English",
    "native_name": "English (United States)",  
    "region": "US",
    "native_region":"United States",  
    "script": "",
    "variant": "",
    "direction": "ltr",
    "is_public": true,
    "is_localized": true,
    "created_at": "2016-03-15T06:09:23Z",
    "updated_at": "2016-03-15T06:09:23Z",

    "resource_type": "locale"

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

},
        "resource": "locale"
    }

Retrieve a user locale

GET /api/v1/locales/current.json

Information

Allowed for Customers, Collaborators, Agents, Admins & Owners

Response

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

    "locale": "en-us",
    "name": "English",
    "native_name": "English (United States)",  
    "region": "US",
    "native_region":"United States",  
    "script": "",
    "variant": "",
    "direction": "ltr",
    "is_public": true,
    "is_localized": true,
    "created_at": "2016-03-15T06:09:23Z",
    "updated_at": "2016-03-15T06:09:23Z",

    "resource_type": "locale"

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

},
        "resource": "locale"
    }

Update locale

PUT /api/v1/locales/id.json

Information

Allowed for Admins & Owners

Parameters

Name Type Mandatory Description
is_public boolean

Response

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

    "locale": "en-us",
    "name": "English",
    "native_name": "English (United States)",  
    "region": "US",
    "native_region":"United States",  
    "script": "",
    "variant": "",
    "direction": "ltr",
    "is_public": true,
    "is_localized": true,
    "created_at": "2016-03-15T06:09:23Z",
    "updated_at": "2016-03-15T06:09:23Z",

    "resource_type": "locale"

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

},
        "resource": "locale"
    }

Strings

RESOURCE FIELDS

Name Type Read-only Description
id string
value string

Retrieve strings

GET /api/v1/locales/:id/strings.json

Information

Allowed for Public

Arguments

Name Type Mandatory Description
filter string Can be used to filter locales for only required ones.
Allowed Values: MESSENGER

Response

{
    "status": 200,
    "data": [
        {
            "id": "core.universal.accesslog.create",
            "value": "Created by %s on %s",
            "resource_type": "locale_string"
        },
        {
            "id": "core.universal.accesslog.update",
            "value": "Last Updated by %s on %s",
            "resource_type": "locale_string"
        }
    ],
    "resource": "locale_string",
    "total_count": 2
}

Retrieve user strings

GET /api/v1/locales/current/strings.json

Information

Allowed for Public

Response

{
    "status": 200,
    "data": [
        {
            "id": "core.universal.accesslog.create",
            "value": "Created by %s on %s",
            "resource_type": "locale_string"
        }
    ],
    "resource": "locale_string",
    "total_count": 1
}