| GET | /countries | Get Countries API |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetCountries
{
}
public static class GetCountriesResponse extends ArrayList<Country>
{
}
public static class Country
{
/**
* Country id
*/
@ApiMember(Description="Country id", IsRequired=true)
public String countryId = null;
/**
* Country description
*/
@ApiMember(Description="Country description", IsRequired=true)
public String countryDs = null;
/**
* Trasnlation of country description based on user language settings
*/
@ApiMember(Description="Trasnlation of country description based on user language settings")
public String translation = null;
/**
* Telephone prefix
*/
@ApiMember(Description="Telephone prefix", IsRequired=true)
public String telephonePrefix = null;
public String getCountryId() { return countryId; }
public Country setCountryId(String value) { this.countryId = value; return this; }
public String getCountryDs() { return countryDs; }
public Country setCountryDs(String value) { this.countryDs = value; return this; }
public String getTranslation() { return translation; }
public Country setTranslation(String value) { this.translation = value; return this; }
public String getTelephonePrefix() { return telephonePrefix; }
public Country setTelephonePrefix(String value) { this.telephonePrefix = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /countries HTTP/1.1 Host: dev-api-booster.richemont.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ArrayOfCountry xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel" />