Common Data Resources

This document specifies the API of common services, that allow for example to retrieve the valid languages, countries and currencies.

Resources

Retrieve Country List

Url .../v1/countries
Sample http://api.spreadshirt.net/api/v1/countries
Type List
Method GET
Special Status Codes  

Response Representation:

<countries ...>  
   ...
</countries>

See Country Representation

Retrieve Country Entity

Url .../v1/countries/{countryId}
Sample http://api.spreadshirt.net/api/v1/countries/1
Type Entity
Method GET
Special Status Codes  

Response Representation:

<country ...>   
   ...
</country>

See Country Representation

Retrieve Currency List

Url .../v1/currencies
Sample http://api.spreadshirt.net/api/v1/currencies
Type List
Method GET
Special Status Codes  

Response Representation:

<currencies ...>  
   ...
</currencies>

See Currency Representation

Retrieve Currency Entity

Url .../v1/currencies/{currencyId}
Sample http://api.spreadshirt.net/api/v1/currencies/1
Type Entity
Method GET
Special Status Codes  

Response Representation:

<currency ...>   
   ...
</currency>

See Currency Representation

Retrieve Language List

Url .../v1/languages
Sample http://api.spreadshirt.net/api/v1/languages
Type List
Method GET
Special Status Codes  

Response Representation:

<languages ...>  
   ...
</languages>

See Language Representation

Retrieve Language Entity

Url .../v1/languages/{languageId}
Sample http://api.spreadshirt.net/api/v1/languages/1
Type Entity
Method GET
Special Status Codes  

Response Representation:

<language ...>  
   ...
</language>

See Language Representation

Representations

Currency

Field
Description
currency
Represents a currency entity.
currency/plain
The name of the currency as it is used in written text.
currency/isoCode
The official ISO code for this currency, e.g. EUR.
currency/symbol
The currency symbol, e.g. €.
currency/decimalCount
The number of decimal places to be used when displaying prices in this currency, e.g. 2.
currency/pattern
The pattern for displaying prices for this currency. % is the price and $ the currency symbol, for example % $ for 2,00 €.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<currency xmlns:xlink="http://www.w3.org/1999/xlink"      
          xmlns="http://api.spreadshirt.net"      
          xlink:href="http://api.spreadshirt.net/api/v1/currencies/1" id="1">
   <plain>EUR</plain>
   <isoCode>EUR</isoCode>
   <symbol>€</symbol>
   <decimalCount>2</decimalCount>
   <pattern>% $</pattern>
</currency>

Country

Field Description
country
Represents a country entity.
country/name The country name.
country/isoCode
The official ISO code of that country, e.g. DE.
country/thousandsSeparator
The thousands separator to be used when working with this country.
country/decimalPoint
The decimal point to be used when working with this country.
country/length
The length unit to be used when working with this country.
country/length/unit
 
country/length/unitFactor
 
country/currency Reference to the default currency for that country.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<country xmlns:xlink="http://www.w3.org/1999/xlink"      
         xmlns="http://api.spreadshirt.net"      
         xlink:href="http://api.spreadshirt.net/api/v1/countries/1" id="1">
   <name>Germany</name>
   <isoCode>DE</isoCode>
   <thousandsSeparator>.</thousandsSeparator>
   <decimalPoint>,</decimalPoint>
   <length>
      <unit>cm</unit>
      <unitFactor>1.0</unitFactor>
   </length>
   <currency xlink:href="http://api.spreadshirt.net/api/v1/currencies/1" id="1"/>
</country>

Language

Field
Description
language
Represents a language entity.
language/isoCode
The official ISO code of that language, e.g. de.
language/name
The name of the language, e.g. Deutsch.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<language xmlns:xlink="http://www.w3.org/1999/xlink"      
          xmlns="http://api.spreadshirt.net"      
          xlink:href="http://api.spreadshirt.net/api/v1/languages/1" id="1">
   <isoCode>de</isoCode>
   <name>Deutsch</name>
</language>
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.