Pecuario.Backend

<back to all web services

GetCountries

The following routes are available for this service:
GET/api/v1/utils/countries
import java.math.*
import java.util.*
import net.servicestack.client.*


open class GetCountries : IGet
{
}

open class GetCountriesResponse : BaseResponse()
{
    var countries:ArrayList<Country> = ArrayList<Country>()
}

open class BaseResponse
{
    var status:Status? = null
}

open class Status
{
    var message:String? = null
    var statusCode:Int? = null
}

open class Country
{
    var id:Int? = null
    @Required()
    @StringLength(2)
    var code:String? = null

    @Required()
    @StringLength(3)
    var phoneCode:String? = null

    @Required()
    @StringLength(200)
    var name:String? = null

    @Required()
    @StringLength(5)
    var currencySymbol:String? = null

    @Required()
    @StringLength(200)
    var currencyName:String? = null

    @Required()
    var order:Int? = null
}

Kotlin GetCountries DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"countries":[{"id":0,"code":"String","phoneCode":"String","name":"String","currencySymbol":"String","currencyName":"String","order":0}]}