API Resource: Regions

The 'Regions' resource allows you to get and set the region settings available on some services supported by Getflix.

Note: Not all regions are available for all services, if you specify an invalid region for a particular service, an error will be returned.

<strong>GET v1/regions.json</strong>
Returns a complete array of region objects, each containing a service name and a 2-character ISO country code.

Return Data

[<br> {<br> "service": <serviceName>,<br> "region": <regionCode><br> }<code>]

<strong>Example Usage</strong>

<code>curl -u <api_key>:x -X GET https://www.getflix.com.au/api/v1/regions.json
<code>[<code> {<br> "service": "netflix",<br> "region": "CA"<br> },<code> {<br> "service": "wdtv",<br> "region": "GB"<br> },<code> {<br> "service": "theplatform",<br> "region": "US"<br> },<code> {<br> "service": "brightcove",<br> "region": "US"<br> },<code> {<br> "service": "sony",<br> "region": "US"<br> }<code>]

<code> <p style="text-align: justify;"><code><strong>POST v1/regions.json</strong>

Updates the region for a specified service. Only one service can be updated at a time, and the following JSON object must be present in the POST body.

{<br> "service": <serviceName>,<br> "region": <regionCode><br>}

serviceName: is a valid service name (see region list below)
regionCode: is the ISO 2-letter country code for the region to switch to (in upper-case).

Example Usage

curl -u <api_key>:x -X POST -d '{"service":"netflix","region":"US"}' https://www.getflix.com.au/api/v1/regions.json

<strong>GET v1/regions/list.json</strong>

Fetches a list of services and the valid regions each service can be switched to.

Example Usage

curl -u <api_key>:x -X GET https://www.getflix.com.au/api/v1/regions/list.json

Still need help? Contact Us Contact Us