{"id":1003,"date":"2019-06-10T18:07:00","date_gmt":"2019-06-10T18:07:00","guid":{"rendered":"http:\/\/live.ecd-demo.com\/apihelp\/?page_id=1003"},"modified":"2025-07-21T17:22:22","modified_gmt":"2025-07-21T17:22:22","slug":"common-document-features","status":"publish","type":"page","link":"https:\/\/apihelp.ecd-demo.com\/index.php\/documentation\/responses\/common-document-features\/","title":{"rendered":"Common Document Features"},"content":{"rendered":"\n\n<h3 class=\"wp-block-heading\">Multiple Languages: The Names Object<\/h3>\n\n\n\n\nTypically, if a piece of text in the API response is intended for display in a client UI, the API schema supports providing that text in multiple languages. This applies not only to synopses, but also to country names, the name of attributes like \u201cLive\u201d and \u201cSubtitled\u201d, etc. The actual set of languages in which the text is supplied depends on the customer\u2019s contract with Simply.TV.\n\n\n\nThe API does not have separate requests or responses for each language. Each program, contributor etc. document contains all the relevant fields in all the available languages.\n\n\n\nFor each such field, the values are supplied in one JSON object, often called \u2026Names. The object contains one property for each language,  whose name is the (two-character) ISO 639-1 code for the language, and whose value is the relevant piece of text in the relevant language. For example:\n\n\n\n\n<pre class=\"wp-block-preformatted\">\"countryNames\": {\n   \"de\": \"Deutschland\",\n   \"en\": \"Germany\",\n   \"fr\": \"Allemagne\"\n}<\/pre>\n\n\n\n\n\n<h3 class=\"wp-block-heading\">Content Instance Attributes Object<\/h3>\n\n\n\n\nSeveral arrays that store attributes of a program, event etc. are \u201csoft-coded\u201d to allow Simply.TV to expand the set of attributes that the array can list without having to update the formal JSON schema. These include the following: accessServiceAttributes, audioAttributes, videoAttributes and otherAttributes. The <em>tags <\/em>array is essentially a special case of an attributes array, while the <em>rights <\/em>object has its own attributes array.\n\n\n\nAt an oversimplified level, each object within an attributes array represents an attribute of the program as a name-value pair, e.g.:\n\n\n\n\n<pre class=\"wp-block-preformatted\">\"Original Language\": \"German\"<\/pre>\n\n\n\n\nHowever, the API schema actually provides (a) a system-generated language-independent ID and (b) a language map object for both the name and the value. The IDs provide values that will not change over time or between API instances, while the language maps provides values that should make sense to a human being. For example, the following array contains a single object indicating that the original language of the program is German:\n\n\n\n\n<pre class=\"wp-block-preformatted\">\"audioAttributes\": [\n    {\n       \"attribute\": {\n          \"attributeId\": \"2720000099999\",\n          \"attributeNames\": {\n             \"en\": \"Original Language\"\n          }\n       },\n       \"value\": {\n          \"valueId\": \"de\",\n          \"valueNames\": {\n             \"en\": \"German\"\n          }\n       }\n    }\n ]<\/pre>\n\n","protected":false},"excerpt":{"rendered":"<p>Multiple Languages: The Names Object Typically, if a piece of text in the API response is intended for display in a client UI, the API schema supports providing that text in multiple languages. This applies not only to synopses, but also to country names, the name of attributes like \u201cLive\u201d and \u201cSubtitled\u201d, etc. The actual [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":939,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1003","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/1003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/comments?post=1003"}],"version-history":[{"count":1,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/1003\/revisions"}],"predecessor-version":[{"id":1495,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/1003\/revisions\/1495"}],"up":[{"embeddable":true,"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/pages\/939"}],"wp:attachment":[{"href":"https:\/\/apihelp.ecd-demo.com\/index.php\/wp-json\/wp\/v2\/media?parent=1003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}