Message Translations REST API

Overview

Oracle CPQ uses text strings and corresponding translations, which are saved on the server in a module called the Resource Bundle. Transaction REST API consumers need an easier way to access the Resource Bundle, rather than duplicating the translation work on their side. This REST API allows consumers to construct messages dynamically by querying CPQ's Resource Bundle to retrieve the specified message translations.

This implementation can improve performance by minimizing the number of REST service calls required to support displayed text translations. Customer UIs need to display translations of displayed text for the locale of the user. This solution caches translations so calls to Oracle CPQ for each translatable page are not required, and runtime updates to the Resource Bundle are incorporated. The maximum query response size is 1,000 rows.

For example, for an approvals related message, a particular "key" is used to generate the message. Data is provided as part of the REST response for approvals related actions, like History attribute, and the message in this History attribute has variables that need to be replaced with the data in the response. If the message does not have any variables then the Resource Bundle response can be used as it is on the consumer side.

This messaging service has three parameters, "key", "language", and "value". The consumer can search for a list of messages and languages by providing "key", "language", and query parameters in the request.

Administration

ClosedGet Message Translations

Get Message Translations GET Method

Description

This API returns translations for Oracle CPQ resource bundle messages.

URI Endpoint

/rest/v17/resources/resourceBundleTranslations

Endpoint Parameters

Query parameters for "key" and "language" fields.

Notes:

  • Oracle CPQ recommends the use of key and language query filters to optimize search results and minimize response time. Refer to the Use Case Samples below for example query requests.
  • When using query strings, the "$like" operator is required to search for wild card characters.
  • URL requests must be 4,000 character or less.

HTTP Method

GET

Request Parameters

None

Success Response

The response contains translations for the specified query.

Use Case Samples

  1. Request for a message in two languages:

    ClosedURI Endpoint Sample

    Text file iconSample Response Body


  2. Request for collection with query on key:

    ClosedURI Endpoint Sample

    Text file iconSample Response Body


  3. Request for collection sorted by name:

    ClosedURI Endpoint Sample

    The maximum query is 1,000 rows. For response payloads in excess of 1,000 rows, pagination could be used. When using pagination, sort parameters should be specified. Otherwise, the result may be returned.

Notes

For more information on the Interface Catalogs, see the topic Interface Catalog.

Related Topics

Related Topics Link IconSee Also