White-Label Languages
Unit white-label UI components are highly customizable. You can customize the texts presented by the components to align with the language of your app and brand. You can create multiple language settings, and even multiple language settings for the same local (for example - use different wording based on user type).
info
More information about languages and customizations can be found here
Create Language
Creates language for white label components.
Verb | POST |
Url | https://api.s.unit.sh/white-label/language |
Data Type | whiteLabelLanguage |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
name | string | Language Name. |
local | string | Language Local. |
global | object | Global language setup. |
elementsCard | object | Card element language setup. |
elementsAccount | object | Account element language setup. |
elementsBookPayment | object | Book payment element language setup. |
elementsAchCredit | object | ACH Credit element language setup. |
elementsAchDebit | object | ACH Debit element language setup. |
elementsCheckDeposit | object | Check deposit element language setup. |
elementsActivity | object | Activity element language setup. |
Example Request:
curl -X POST 'https://api.s.unit.sh/white-label/language'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "whiteLabelLanguage",
"attributes": {
"name": "Default English Localization",
"local": "en",
"global": {
"months": {
"january": "January",
"february": "February",
"march": "March",
"april": "April",
"may": "May",
"june": "June",
"july": "July",
"august": "August",
"september": "September",
"october": "October",
"november": "November",
"december": "December"
}
},
"elementsAccount": {
"title": "Account {{maskedAccountNumber}}",
"availableBalance": "Available Balance",
"accountActions": {
"title": "Account Actions",
"accountDetails": "Account Details",
"accountStatements": "Account Statements",
"bankVerificationLetter": "Bank Verification Letter"
},
"accountDetails": {
"title": "Account {{maskedAccountNumber}}",
"subtitle": "{{accountName}}",
"accountOwner": "Account owner",
"accountNumber": "Account number",
"accountRoutingNumber": "Routing number",
"accountPurpose": "Account Purpose",
"bank": "Bank"
},
"accountStatements": {
"title": "Account Statements",
"subtitle": "Download account statement for account ending with #{{accountNumberLast4Digits}}",
"downloadStatementButton": "Save Statement"
},
"accountList": {
"title": "Switch Account",
"accountTitle": "{{accountPurposeWords}} {{maskedAccountNumber}}",
"accountSubtitle": "{{accountName}}"
}
}
}
}
}'
Response
Response is a JSON:API document.
201 Created
Field | Type | Description |
---|---|---|
data | object | The requested resource after the operation was completed. |
links | object | Related Link object with url to be used in component. |
Related
Field | Type | Description |
---|---|---|
type | String | Type of the resource in link. |
href | object | URL to be set in language property of component. |
Example Response:
{
"data": {
"type": "whiteLabelLanguage",
"id": "10008",
"attributes": {
"...": "..."
},
"links": {
"related": {
"type": "application/json",
"href": "https://ui.s.unit.sh/resources/982/languages/605676c1-b00b-4748-9fa4-258d1a28c3fb.json"
}
}
}
}
Update Language
Updates language for white label components.
note
You need to send the full language object in the request body, not only the fields that were changed.
Verb | PUT |
Url | https://api.s.unit.sh/white-label/language/{id} |
Data Type | whiteLabelLanguage |
Timeout (Seconds) | 5 |
Get Language
Get white label language by id.
Verb | GET |
Url | https://api.s.unit.sh/white-label/language/{id} |
Data Type | whiteLabelLanguage |
Timeout (Seconds) | 5 |
Example Request:
curl -X GET 'https://api.s.unit.sh/white-label/language/{id}' \
-H "Authorization: Bearer ${TOKEN}"