/config/{app}/flows/{flow}/translations

This endpoint includes the following methods:


GET

Returns a dictionary of all translations. See a video demo in Postman here.

Authentication

This endpoint supports Basic authentication. 

How to Create an Authentication String

Base URL

The base URL for this endpoint is your Janrain Configuration API domain followed by /config/ followed by your application ID. For example, if you are in the US region and your application ID is htb8fuhxnf8e38jrzub3c7pfrr, then your base URL would be:


https://v1.api.us.janrain.com/config/htb8fuhxnf8e38jrzub3c7pfrr

Allowed regions are:

  • us 
  • eu 
  • au 
  • sa 
  • cn
  • sg

Request Headers

Parameter Type Required Description
Accept string Indicates the format for the returned data. Allowed values are:
  • application/json
  • text/csv

Sample Request (curl)

This command returns information about all the translations associated with the documentation flow:


curl -H 'Authorization: Basic aW1fYV...NfbXk=' \
  -H 'Content-Type: application/json' \
  https://v1.api.us.janrain.com/config/htb8fuhxnf8e38jrzub3c7pfrr/flows/documentation/translations 

      Running this command in Postman

Responses

200 OK

Response Example (application/json)


[
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/991a5781-cbe1-4770-bbf1-395168a11d59",
    "key": "991a5781-cbe1-4770-bbf1-395168a11d59",
    "path": "fields.someField.label",
    "values": {
      "en-US": "Register",
      "fr-FR": "Faire inscrire",
      "it-IT": "Registrati"
    }
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/1ab1f15d-2555-49af-bd88-cf984ad40a13",
    "key": "1ab1f15d-2555-49af-bd88-cf984ad40a13",
    "path": "fields.anotherField.label",
    "values": {
      "en-US": "Hello!",
      "fr-FR": "Bonjour!",
      "it-IT": "Bongiorno!"
    }
  },
  {
    "_self": "/config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations/a8670648-f9f7-4c0b-92cd-e477fe67b617",
    "key": "a8670648-f9f7-4c0b-92cd-e477fe67b617",
    "path": "fields.oneMoreField.label",
    "values": {
      "en-US": "Goodbye!",
      "fr-FR": "Au revoir!",
      "it-IT": "Arrivederci!"
    }
  }
]

Response Example (text/csv)

path,key,en-US,it-IT,fr-FR
fields.someField.label,991a5781-cbe1-4770-bbf1-395168a11d59,Register,Registrati,Faire inscrire
fields.anotherField.label,1ab1f15d-2555-49af-bd88-cf984ad40a13,Hello!,Bongiorno!,Bonjour!
fields.oneMoreField.label,a8670648-f9f7-4c0b-92cd-e477fe67b617,Goodbye,Arrivederci!,Au revoir!

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)


{
  "errors": "Flow not found."
}
                                                            


PATCH

Description

Updates existing translations. This endpoint does not delete data. See the video demo in Postman here.

Authentication

This endpoint supports Basic authentication. 

How to Create an Authentication String

Base URL

The base URL for this endpoint is your Janrain Configuration API domain followed by /config/ followed by your application ID. For example, if you are in the US region and your application ID is htb8fuhxnf8e38jrzub3c7pfrr, then your base URL would be:


https://v1.api.us.janrain.com/config/htb8fuhxnf8e38jrzub3c7pfrr

Allowed regions are:

  • us 
  • eu 
  • au 
  • sa 
  • cn
  • sg

Request Example (application/json)


[
  {
    "key": "a8670648-f9f7-4c0b-92cd-e477fe67b617",
    "values": {
      "en-US": "See ya!"
    }
  }
]

Request Example (text/csv)

key,en-US
a8670648-f9f7-4c0b-92cd-e477fe67b617,See ya!

Sample Request (curl)

This command updates the values assigned to the documentation flow translation key afeba216c561f421e6e19e6cfed3acd8:


curl -X PATCH \
  https://v1.api.us.janrain.com/config/htb8fuhxnf8e38jrzub3c7pfrr/flows/documentation/translations \
  -H 'Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6eXk4MmhxdXhnbWt6bWMzcGRoZ3VmdDNwNHluc3R6cjU=' \
  -H 'Content-Type: application/json' \
  -d '[
	{
		"key": "afeba216c561f421e6e19e6cfed3acd8",
        "values": {
        	"it-IT": "Nome utente o password errati. Per favore riprova.",
    		"en-US": "Incorrect username or password. Please try again.",
        	"fr-FR": "Identifiant ou mot de passe incorrect. Veuillez réessayer."
        }
	}
]'
      Running this command in Postman

Responses

204 No Content

Successfully updated the translations.

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)


{
  "errors": "Flow not found."
}
                                                            


POST

Description

Adds new translation strings to the translations dictionary. You must supply a list of values for each locale defined in the flow. For a list of locales, call /config/{app}/flows/{flow}/locales.

Authentication

This endpoint supports Basic authentication. 

How to Create an Authentication String

Base URL

The base URL for this endpoint is your Janrain Configuration API domain followed by /config/ followed by your application ID. For example, if you are in the US region and your application ID is htb8fuhxnf8e38jrzub3c7pfrr, then your base URL would be:


https://v1.api.us.janrain.com/config/htb8fuhxnf8e38jrzub3c7pfrr

Allowed regions are:

  • us 
  • eu 
  • au 
  • sa 
  • cn
  • sg

Request Example (application/json)


[
  {
    "values": {
      "en-US": "Hello!",
      "fr-FR": "Bonjour!",
      "it-IT": "Bongiorno!"
    }
  },
  {
    "values": {
      "en-US": "Goodbye!",
      "fr-FR": "Au revoir!",
      "it-IT": "Arrivederci!"
    }
  }
]

Request Example (text/csv)

en-US,it-IT
Hello!,Bongiorno!
Goodbye,Arrivederci!

Responses

201 Created

Returns a partial rendering of the affected locales.

Response Headers

Content-Location string

The location of the full translation dictionaries.

Example: Content-Location: /config/v86cchggr5cdvbfh7ydk8s63zz/flows/myCoolFlow/translations

Response Example (application/json)


{
  "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/translations",
  "translations": [
    {
      "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/translations/5ac7ea6d-48b8-46d5-abed-ac3b6b12268f",
      "path": "",
      "values": {
        "it-IT": "Arrivederci!",
        "en-US": "Goodbye!",
        "fr-FR": "Au revoir!"
      },
      "key": "5ac7ea6d-48b8-46d5-abed-ac3b6b12268f"
    },
    {
      "_self": "/config/4qeam8586cpkuru3ju8kj2xwdf/flows/myCoolFlow/translations/6bdb687e-3d9f-4018-be6b-613011ad8b70",
      "path": "",
      "values": {
        "it-IT": "Bongiorno!",
        "en-US": "Hello!",
        "fr-FR": "Bonjour!"
      },
      "key": "6bdb687e-3d9f-4018-be6b-613011ad8b70"
    }
  ]
}

404 Not Found

Flow could not be found. Please check the value and try again.

Response Example (application/json)


{
  "errors": "Flow not found."
}