Cochrane+ App API

<back to all web services

GetJourney

Requires Authentication
The following routes are available for this service:
GET/journey

export class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
{
    /** @description The API Key required for authentication */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    public apiKey: string;

    /** @description Latitude of the user making this request */
    // @ApiMember(DataType="double", Description="Latitude of the user making this request")
    public latitude: number;

    /** @description Longitude of the user making this request */
    // @ApiMember(DataType="double", Description="Longitude of the user making this request")
    public longitude: number;

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

export class ApiServiceResponse implements IServiceResponse
{
    public description: string;
    public heading: string;
    public wasSuccessful: boolean;
    public modelState: Object;

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

export class JourneyPointData
{
    public latitude: number;
    public longitude: number;
    public address: string;

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

export class MeetingData
{
    public meetingId: number;
    public startTime: string;
    public arrivalTime: string;
    public leftTime: string;
    public duration: string;
    public showTimeFields: boolean;
    public arrivalStatus: string;
    public email: string;
    public hasEmail: boolean;
    public contactName: string;
    public latitude: number;
    public longitude: number;
    public location: string;
    public address: string;
    public subject: string;
    public description: string;
    public endTime: string;
    public company: string;
    public contactNumber: string;
    public hasContactNumber: boolean;
    public hasLocation: boolean;
    public setBy: string;
    public virtualOrInPerson: string;

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

export class JourneyNoteData
{
    public note: string;
    public date: string;

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

export class JourneyData
{
    public journeyId: number;
    public title: string;
    public startTime: string;
    public endTime: string;
    public distance: number;
    public distanceFormatted: string;
    public routePolyline: string;
    public startPoint: JourneyPointData;
    public endPoint: JourneyPointData;
    public meetingData: MeetingData;
    public journeyNotes: JourneyNoteData[];

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

export class GetJourneyResponse extends ApiServiceResponse
{
    public journeys: JourneyData[];
    public total: number;
    public lastPage: boolean;

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

export class GetJourney extends ApiServiceRequest
{
    public count: number;
    public offset: number;

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

TypeScript GetJourney 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.

GET /journey HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	journeys: 
	[
		{
			
		}
	],
	total: 0,
	lastPage: False,
	description: String,
	heading: String,
	wasSuccessful: False,
	modelState: {}
}