Billiecart API

<back to all web services

RegisterCarRequest

Requires Authentication
Requires the role:manager
The following routes are available for this service:
PUT,PATCH/cars/{Id}/register

export class PutPatchOperationUnTenanted<TResponse> implements IPatch, IPut
{

    public constructor(init?: Partial<PutPatchOperationUnTenanted<TResponse>>) { (Object as any).assign(this, init); }
}

export class PutPatchOperationTenanted<TResponse> extends PutPatchOperationUnTenanted<TResponse> implements ITenantedRequest
{
    public organisationId?: string;

    public constructor(init?: Partial<PutPatchOperationTenanted<TResponse>>) { super(init); (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 RegisterCarResponse
{
    public responseStatus?: ResponseStatus;
    public car?: Car;

    public constructor(init?: Partial<RegisterCarResponse>) { (Object as any).assign(this, init); }
}

export class RegisterCarRequest extends PutPatchOperationTenanted<RegisterCarResponse>
{
    public id?: string;
    public jurisdiction?: string;
    public number?: string;

    public constructor(init?: Partial<RegisterCarRequest>) { super(init); (Object as any).assign(this, init); }
}

TypeScript RegisterCarRequest DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /cars/{Id}/register HTTP/1.1 
Host: staging-api.billiecart.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: String,
	jurisdiction: String,
	number: String,
	organisationId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	car: 
	{
		manufacturer: 
		{
			year: 0,
			make: String,
			model: String
		},
		plate: 
		{
			jurisdiction: String,
			number: String
		},
		owner: 
		{
			id: String
		},
		managers: 
		[
			{
				id: String
			}
		],
		status: String,
		altered: False,
		id: String
	}
}