Trendsic Platform Service

<back to all web services

ShiftPatternSaveRequest

Requires Authentication
The following routes are available for this service:
POST/v1/workforce/patterns
"use strict";
export class ShiftPattern {
    /** @param {{ShiftPatternID?:number,BranchId?:string,Code?:string,Name?:string,Struct?:string,HoursPerDay?:number,OnDays?:number,OffDays?:number,PatternType?:string,IsNight?:boolean,HasBoundary?:boolean,IsHitch?:boolean,HasTravel?:boolean,IsSeasonal?:boolean,SeasonalWindow?:string,IsDayRate?:boolean,OtRuleId?:string,PerDiemRuleId?:string,Packs?:string,Status?:string,IsSeed?:boolean,AssignedCount?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ShiftPatternID;
    /** @type {?string} */
    BranchId;
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Struct;
    /** @type {number} */
    HoursPerDay;
    /** @type {number} */
    OnDays;
    /** @type {number} */
    OffDays;
    /** @type {string} */
    PatternType;
    /** @type {boolean} */
    IsNight;
    /** @type {boolean} */
    HasBoundary;
    /** @type {boolean} */
    IsHitch;
    /** @type {boolean} */
    HasTravel;
    /** @type {boolean} */
    IsSeasonal;
    /** @type {string} */
    SeasonalWindow;
    /** @type {boolean} */
    IsDayRate;
    /** @type {string} */
    OtRuleId;
    /** @type {string} */
    PerDiemRuleId;
    /** @type {string} */
    Packs;
    /** @type {string} */
    Status;
    /** @type {boolean} */
    IsSeed;
    /** @type {number} */
    AssignedCount;
}
export class ShiftPatternsResponse {
    /** @param {{Patterns?:ShiftPattern[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ShiftPattern[]} */
    Patterns = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class ShiftPatternSaveRequest {
    /** @param {{Pattern?:ShiftPattern}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ShiftPattern} */
    Pattern;
}

JavaScript ShiftPatternSaveRequest DTOs

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

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
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/jsonl
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"}}}