| POST | /v1/workforce/patterns |
|---|
export class ShiftPattern
{
public ShiftPatternID: number;
public BranchId?: string;
public Code: string;
public Name: string;
public Struct: string;
public HoursPerDay: number;
public OnDays: number;
public OffDays: number;
public PatternType: string;
public IsNight: boolean;
public HasBoundary: boolean;
public IsHitch: boolean;
public HasTravel: boolean;
public IsSeasonal: boolean;
public SeasonalWindow: string;
public IsDayRate: boolean;
public OtRuleId: string;
public PerDiemRuleId: string;
public Packs: string;
public Status: string;
public IsSeed: boolean;
public AssignedCount: number;
public constructor(init?: Partial<ShiftPattern>) { (Object as any).assign(this, init); }
}
export class ShiftPatternsResponse
{
public Patterns: ShiftPattern[] = [];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<ShiftPatternsResponse>) { (Object as any).assign(this, init); }
}
export class ShiftPatternSaveRequest
{
public Pattern: ShiftPattern;
public constructor(init?: Partial<ShiftPatternSaveRequest>) { (Object as any).assign(this, init); }
}
TypeScript ShiftPatternSaveRequest DTOs
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 /v1/workforce/patterns HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Pattern:
{
ShiftPatternID: 0,
BranchId: 00000000000000000000000000000000,
Code: String,
Name: String,
Struct: String,
HoursPerDay: 0,
OnDays: 0,
OffDays: 0,
PatternType: String,
IsNight: False,
HasBoundary: False,
IsHitch: False,
HasTravel: False,
IsSeasonal: False,
SeasonalWindow: String,
IsDayRate: False,
OtRuleId: String,
PerDiemRuleId: String,
Packs: String,
Status: String,
IsSeed: False,
AssignedCount: 0
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Patterns:
[
{
ShiftPatternID: 0,
BranchId: 00000000000000000000000000000000,
Code: String,
Name: String,
Struct: String,
HoursPerDay: 0,
OnDays: 0,
OffDays: 0,
PatternType: String,
IsNight: False,
HasBoundary: False,
IsHitch: False,
HasTravel: False,
IsSeasonal: False,
SeasonalWindow: String,
IsDayRate: False,
OtRuleId: String,
PerDiemRuleId: String,
Packs: String,
Status: String,
IsSeed: False,
AssignedCount: 0
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}