| GET | /api/v1/utils/countries |
|---|
export class Status
{
public message: string;
public statusCode: number;
public constructor(init?: Partial<Status>) { (Object as any).assign(this, init); }
}
export class BaseResponse
{
public status: Status;
public constructor(init?: Partial<BaseResponse>) { (Object as any).assign(this, init); }
}
export class Country
{
public id: number;
// @Required()
// @StringLength(2)
public code: string;
// @Required()
// @StringLength(3)
public phoneCode: string;
// @Required()
// @StringLength(200)
public name: string;
// @Required()
// @StringLength(5)
public currencySymbol: string;
// @Required()
// @StringLength(200)
public currencyName: string;
// @Required()
public order: number;
public constructor(init?: Partial<Country>) { (Object as any).assign(this, init); }
}
export class GetCountriesResponse extends BaseResponse
{
public countries: Country[];
public constructor(init?: Partial<GetCountriesResponse>) { super(init); (Object as any).assign(this, init); }
}
export class GetCountries implements IGet
{
public constructor(init?: Partial<GetCountries>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/v1/utils/countries HTTP/1.1 Host: pecuario-backend.develsystems.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
countries:
[
{
id: 0,
code: String,
phoneCode: String,
name: String,
currencySymbol: String,
currencyName: String,
order: 0
}
]
}