-
Notifications
You must be signed in to change notification settings - Fork 42
AC-1596 add translations EPs to 3.7 #1621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -45,6 +45,7 @@ All configurations set by this API will have action in system after max 2 minute | |||
| | **Tags** | [`create_tag`](#create-tag) [`delete_tag`](#delete-tag) [`list_tags`](#list-tags) [`update_tag`](#update-tag) | | ||||
| | **Webhooks** | [`register_webhook`](#register-webhook) [`list_webhooks`](#list-webhooks) [`unregister_webhook`](#unregister-webhook) [`list_webhook_names`](#list-webhook-names) [`enable_license_webhook`](#enable-license-webhooks) [`disable_license_webhook`](#disable-license-webhooks) [`get_license_webhooks_state`](#get-license-webhooks-state) | | ||||
| | **Canned responses** | [`create_canned_response`](#create-canned-response) [`list_canned_responses`](#list-canned-responses) [`update_canned_response`](#update-canned-response) [`delete_canned_response`](#delete-canned-response) | | ||||
| | **Translations** | [`list_translations`](#list-translations) [`update_translations`](#update-translations) | | ||||
| | **Other** | [`list_channels`](#list-channels) [`check_product_limits_for_plan`](#check-product-limits-for-plan) [`reactivate_email`](#reactivate-email) [`update_company_details`](#update-company-details) | | ||||
|
|
||||
| ## Batch requests | ||||
|
|
@@ -163,6 +164,12 @@ curl -X POST \ | |||
| | [Update Bot](#update-bot) | `https://api.livechatinc.com/v3.7/configuration/action/batch_update_bots` | | ||||
| | [Delete Bot](#delete-bot) | `https://api.livechatinc.com/v3.7/configuration/action/batch_delete_bots` | | ||||
|
|
||||
| #### Batch support for Translations | ||||
|
|
||||
| | Method | Batch method URL | | ||||
| | ------------------------------------------- | --------------------------------------------------------------------------------- | | ||||
| | [Update Translations](#update-translations) | `https://api.livechatinc.com/v3.7/configuration/action/batch_update_translations` | | ||||
|
|
||||
| # Agents | ||||
|
|
||||
| An agent is a type of user who communicates with customers. You can look up the sample agent data structure in the [response of Get Agent](#get-agent). | ||||
|
|
@@ -4507,6 +4514,136 @@ curl -X POST \ | |||
|
|
||||
| </Section> | ||||
|
|
||||
| # Translations | ||||
|
|
||||
| <Section> | ||||
|
|
||||
| ### Update Translations | ||||
|
|
||||
| Updates existing translations. | ||||
|
|
||||
| #### Specifics | ||||
|
|
||||
| | | | | ||||
| | -------------------------------- | ------------------------------------------------------------------------------ | | ||||
| | Method URL | `https://api.livechatinc.com/v3.7/configuration/action/update_translations` | | ||||
| | Required scopes | `languages_write` | | ||||
| | [Batch support](#batch-requests) | Yes | | ||||
|
|
||||
| #### Request | ||||
|
|
||||
| | Parameter | Required | Data type | Notes | | ||||
| | ---------------------------- | -------- | ------------ | ------------------------------------------------ | | ||||
| | `group_id` | Yes | `number` | ID of the group | | ||||
| | `language` | Yes | `string` | Language identifier | | ||||
| | `phrases`<sup>**1**</sup> | Yes | `object` | List of phrases to update as key-value pairs | | ||||
|
|
||||
| **1)** Possible values for the `phrases` object keys: | ||||
|
|
||||
| | Possible value | Notes | | ||||
| | ----------------------------------- | --------------------------------| | ||||
| | `Welcome_title` | Welcome message | | ||||
| | `Agents_not_available_continuous` | Contact card message | | ||||
| | `User_in_queue` | Queued customer info | | ||||
| | `Client` | Default customer name | | ||||
| | `Embedded_textarea_placeholder` | Message placeholder | | ||||
| | `Offline_message_sent` | Ticket confirmation message | | ||||
|
|
||||
| The examples given above are illustrative only and do not represent the complete set of supported keys. | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I'd remove this — if we don't want users to access the rest, this is fine for the docs to just list what we give access to without overexplaining |
||||
|
|
||||
| #### Response | ||||
|
|
||||
| Empty response object `{}`. | ||||
|
|
||||
| <Code> | ||||
|
|
||||
| <CodeSample path={'REQUEST'}> | ||||
|
|
||||
| ```shell | ||||
| curl -X POST \ | ||||
| https://api.livechatinc.com/v3.7/configuration/action/update_translations \ | ||||
| -H 'Authorization: Bearer <your_access_token>' \ | ||||
| -H 'Content-Type: application/json' \ | ||||
| -d '{ | ||||
| "group_id": 0, | ||||
| "language": "en", | ||||
| "phrases": { | ||||
| "Welcome_title": "Welcome to chat!" | ||||
| } | ||||
| }' | ||||
| ``` | ||||
|
|
||||
| </CodeSample> | ||||
|
|
||||
| <CodeResponse> | ||||
|
|
||||
| ```json | ||||
| {} | ||||
| ``` | ||||
|
|
||||
| </CodeResponse> | ||||
|
|
||||
| </Code> | ||||
|
|
||||
| ### List Translations | ||||
|
|
||||
| Returns a list of translations. | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it return only those that were edited by the user?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question remains :D Does it return only those translations that were edited by the user? |
||||
|
|
||||
| #### Specifics | ||||
|
|
||||
| | | | | ||||
| | -------------------------------- | ----------------------------------------------------------------------------- | | ||||
| | Method URL | `https://api.livechatinc.com/v3.7/configuration/action/list_translations` | | ||||
| | Required scopes | `languages_read` | | ||||
| | [Batch support](#batch-requests) | No | | ||||
|
|
||||
| #### Request | ||||
|
|
||||
| | Parameter | Required | Data type | Notes | | ||||
| | ------------ | -------- | ------------ | ----------------------------- | | ||||
| | `group_id` | Yes | `number` | ID of the group | | ||||
| | `language` | Yes | `string` | Language identifier | | ||||
|
|
||||
| #### Response | ||||
|
|
||||
| | Parameter | Data type | Notes | | ||||
| | --------------- | ------------ | ------------------------------------- | | ||||
| | `phrases` | `object` | List of phrases as key-value pairs | | ||||
|
|
||||
| <Code> | ||||
|
|
||||
| <CodeSample path={'REQUEST'}> | ||||
|
|
||||
| ```shell | ||||
| curl -X POST \ | ||||
| https://api.livechatinc.com/v3.7/configuration/action/list_translations \ | ||||
| -H 'Authorization: Bearer <your_access_token>' \ | ||||
| -H 'Content-Type: application/json' \ | ||||
| -d '{ | ||||
| "group_id": 0, | ||||
| "language": "en" | ||||
| }' | ||||
| ``` | ||||
|
|
||||
| </CodeSample> | ||||
|
|
||||
| <CodeResponse> | ||||
|
|
||||
| ```json | ||||
| { | ||||
| "phrases": { | ||||
| "Welcome_title": "Welcome to chat", | ||||
| "Offline_form": "Thank you for contacting us" | ||||
| } | ||||
| } | ||||
| ``` | ||||
|
|
||||
| </CodeResponse> | ||||
|
|
||||
| </Code> | ||||
|
|
||||
| </Section> | ||||
|
|
||||
| # Other | ||||
|
|
||||
| ## Methods | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.