| All Verbs | /api/suburbs |
|---|
export class SuburbModel
{
public SuburbId: string;
public Name: string;
public StateId: string;
public StateName: string;
public PostCode: string;
public CountryId: string;
public CountryName: string;
public constructor(init?: Partial<SuburbModel>) { (Object as any).assign(this, init); }
}
// @ApiResponse(Description="List of suburbs matching the criteria")
export class GetSuburbsResponse
{
public Suburbs: SuburbModel[];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<GetSuburbsResponse>) { (Object as any).assign(this, init); }
}
/** @description Get all suburbs for the specified country, state and/or postcode */
// @Api(Description="Get all suburbs for the specified country, state and/or postcode")
export class GetSuburbs
{
/** @description Get suburbs matching the specified search text criteria. */
// @ApiMember(Description="Get suburbs matching the specified search text criteria.", Name="SearchText")
public SearchText: string;
/** @description State to get suburbs for */
// @ApiMember(Description="State to get suburbs for", Name="StateName")
public StateName: string;
/** @description Postcode to get suburbs for */
// @ApiMember(Description="Postcode to get suburbs for", Name="Postcode")
public PostCode: string;
/** @description Country to get suburbs for */
// @ApiMember(Description="Country to get suburbs for", Name="CountryId")
public CountryId: string;
/** @description Country to get suburbs for */
// @ApiMember(Description="Country to get suburbs for", Name="CountryName")
public CountryName: string;
public constructor(init?: Partial<GetSuburbs>) { (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.
POST /api/suburbs HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SearchText: String,
StateName: String,
PostCode: String,
CountryName: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Suburbs:
[
{
Name: String,
StateName: String,
PostCode: String,
CountryName: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}