Trendsic Platform Service

<back to all web services

VisitWeekRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/visits/week

export class CrewWeekCell
{
    public Date: string;
    public VisitCount: number;
    public LoadPct: number;

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

export class CrewWeekRow
{
    public CrewID: number;
    public CrewName: string;
    public CrewColor: string;
    public Cells: CrewWeekCell[] = [];

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

export class VisitWeekResponse
{
    public From: string;
    public To: string;
    public Days: string[] = [];
    public Rows: CrewWeekRow[] = [];
    public ResponseStatus: ResponseStatus;

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

export class VisitWeekRequest
{
    public From: string;
    public Days: number;

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

TypeScript VisitWeekRequest 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 /v1/visits/week HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	From: String,
	To: String,
	Days: 
	[
		String
	],
	Rows: 
	[
		{
			CrewID: 0,
			CrewName: String,
			CrewColor: String,
			Cells: 
			[
				{
					Date: String,
					VisitCount: 0,
					LoadPct: 0
				}
			]
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}