| Requires any of the permissions: | DISPATCH:HAUL:MANAGE, DISPATCH:JOB:MANAGE, DISPATCH:ONDEMAND:MANAGE |
| POST,OPTIONS | /v1/dispatch/holds |
|---|
export class DispatchHoldView
{
public HoldId: number;
public Code: string;
public ScopeKind: string;
public ScopeKey: string;
public ScopeLabel: string;
public Reason: string;
public Note: string;
public StartUtc: string;
public EndUtc: string;
public Source: string;
public IncidentRef: string;
public LiftedUtc?: string;
public LiftedBy: string;
public CreatedUtc?: string;
public CreatedBy: string;
public Status: string;
public constructor(init?: Partial<DispatchHoldView>) { (Object as any).assign(this, init); }
}
export class DispatchOfflineWindowView
{
public OfflineWindowId: number;
public FromHour: string;
public ToHour: string;
public constructor(init?: Partial<DispatchOfflineWindowView>) { (Object as any).assign(this, init); }
}
export class DispatchHoldScopeView
{
public Kind: string;
public Key: string;
public Label: string;
public constructor(init?: Partial<DispatchHoldScopeView>) { (Object as any).assign(this, init); }
}
export class DispatchHoldSuggestionView
{
public ForDate: string;
public Kind: string;
public Severity: number;
public Headline: string;
public DayLabel: string;
public ScopeKind: string;
public ScopeLabel: string;
public Reason: string;
public StartUtc: string;
public EndUtc: string;
public WindowLocal: string;
public Text: string;
public constructor(init?: Partial<DispatchHoldSuggestionView>) { (Object as any).assign(this, init); }
}
export class DispatchHoldsResponse
{
public Holds: DispatchHoldView[] = [];
public Windows: DispatchOfflineWindowView[] = [];
public Scopes: DispatchHoldScopeView[] = [];
public Suggestion: DispatchHoldSuggestionView;
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<DispatchHoldsResponse>) { (Object as any).assign(this, init); }
}
export class DispatchHoldCreateRequest
{
public ScopeKind: string;
public ScopeKey: string;
public ScopeLabel: string;
public Reason: string;
public Note: string;
public StartUtc: string;
public EndUtc: string;
public SuggestionDate: string;
public SuggestionKind: string;
public constructor(init?: Partial<DispatchHoldCreateRequest>) { (Object as any).assign(this, init); }
}
TypeScript DispatchHoldCreateRequest 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/dispatch/holds HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ScopeKind: String,
ScopeKey: String,
ScopeLabel: String,
Reason: String,
Note: String,
StartUtc: String,
EndUtc: String,
SuggestionDate: String,
SuggestionKind: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Holds:
[
{
HoldId: 0,
Code: String,
ScopeKind: String,
ScopeKey: String,
ScopeLabel: String,
Reason: String,
Note: String,
StartUtc: 0001-01-01,
EndUtc: 0001-01-01,
Source: String,
IncidentRef: String,
LiftedUtc: 0001-01-01,
LiftedBy: String,
CreatedUtc: 0001-01-01,
CreatedBy: String,
Status: String
}
],
Windows:
[
{
OfflineWindowId: 0,
FromHour: String,
ToHour: String
}
],
Scopes:
[
{
Kind: String,
Key: String,
Label: String
}
],
Suggestion:
{
ForDate: String,
Kind: String,
Severity: 0,
Headline: String,
DayLabel: String,
ScopeKind: String,
ScopeLabel: String,
Reason: String,
StartUtc: 0001-01-01,
EndUtc: 0001-01-01,
WindowLocal: String,
Text: String
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}