GET | /cars |
---|
export class GetOperationUnTenanted<TResponse> implements IHasGetOptions, IGet
{
public embed?: string;
public constructor(init?: Partial<GetOperationUnTenanted<TResponse>>) { (Object as any).assign(this, init); }
}
export class SearchOperationUnTenanted<TResponse> extends GetOperationUnTenanted<TResponse> implements IHasSearchOptions
{
public distinct?: string;
public limit?: number;
public offset?: number;
public sort?: string;
public filter?: string;
public search?: string;
public constructor(init?: Partial<SearchOperationUnTenanted<TResponse>>) { super(init); (Object as any).assign(this, init); }
}
export class SearchOperationTenanted<TResponse> extends SearchOperationUnTenanted<TResponse> implements ITenantedRequest
{
public organisationId?: string;
public constructor(init?: Partial<SearchOperationTenanted<TResponse>>) { super(init); (Object as any).assign(this, init); }
}
export enum SortDirection
{
Ascending = 'Ascending',
Descending = 'Descending',
}
export class Sorting
{
public by?: string;
public direction: SortDirection;
public constructor(init?: Partial<Sorting>) { (Object as any).assign(this, init); }
}
export class Filtering
{
public fields?: string[];
public search?: string;
public constructor(init?: Partial<Filtering>) { (Object as any).assign(this, init); }
}
export class SearchMetadata
{
public total: number;
public limit: number;
public offset: number;
public sort?: Sorting;
public filter?: Filtering;
public constructor(init?: Partial<SearchMetadata>) { (Object as any).assign(this, init); }
}
export class SearchOperationResponse
{
public metadata?: SearchMetadata;
public constructor(init?: Partial<SearchOperationResponse>) { (Object as any).assign(this, init); }
}
export class CarManufacturer
{
public year: number;
public make?: string;
public model?: string;
public constructor(init?: Partial<CarManufacturer>) { (Object as any).assign(this, init); }
}
export class CarLicensePlate
{
public jurisdiction?: string;
public number?: string;
public constructor(init?: Partial<CarLicensePlate>) { (Object as any).assign(this, init); }
}
export class CarOwner
{
public id?: string;
public constructor(init?: Partial<CarOwner>) { (Object as any).assign(this, init); }
}
export class CarManager
{
public id?: string;
public constructor(init?: Partial<CarManager>) { (Object as any).assign(this, init); }
}
export class Car implements IIdentifiableResource
{
public manufacturer?: CarManufacturer;
public plate?: CarLicensePlate;
public owner?: CarOwner;
public managers?: CarManager[];
public status?: string;
public altered?: boolean;
public id?: string;
public constructor(init?: Partial<Car>) { (Object as any).assign(this, init); }
}
export class SearchAllCarsResponse extends SearchOperationResponse
{
public responseStatus?: ResponseStatus;
public cars?: Car[];
public constructor(init?: Partial<SearchAllCarsResponse>) { super(init); (Object as any).assign(this, init); }
}
export class SearchAllCarsRequest extends SearchOperationTenanted<SearchAllCarsResponse>
{
public constructor(init?: Partial<SearchAllCarsRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript SearchAllCarsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /cars HTTP/1.1 Host: staging-api.billiecart.com.au Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"cars":[{"manufacturer":{"year":0,"make":"String","model":"String"},"plate":{"jurisdiction":"String","number":"String"},"owner":{"id":"String"},"managers":[{"id":"String"}],"status":"String","altered":false,"id":"String"}],"metadata":{"total":0,"limit":0,"offset":0,"sort":{"by":"String","direction":"Ascending"},"filter":{"fields":["String"],"search":"String"}}}