Trendsic Platform Service

<back to all web services

InvoiceWorkChangesDecideRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/invoice/workchanges/{ProjectUID}/decide

export class InvoiceWorkChange
{
    public SourceType: string;
    public SourceID: number;
    public JobID?: number;
    public WorkDate?: string;
    public WorkDay: string;
    public DisplayDay: string;
    public Label: string;
    public JobName: string;
    public DisplayDate?: string;
    public Unit: string;
    public Billed: number;
    public NowQuantity: number;
    public OverBilled: number;
    public UnitFactor: number;
    public Price: number;
    public Amount: number;
    public LineType: string;
    public IsTaxable: boolean;
    public InvoiceID: number;
    public InvoiceUID: string;
    public InvoiceNumber: string;
    public InvoiceTotal: number;
    public InvoiceIsLocked: boolean;
    public InvoiceIsPaid: boolean;
    public State: string;
    public Remembered: string;
    public DecidedByName: string;
    public DecidedAt?: string;

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

export class InvoiceWorkChangesResponse
{
    public ResponseStatus: ResponseStatus;
    public Success: boolean;
    public Changes: InvoiceWorkChange[] = [];

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

export class InvoiceWorkChangeKey
{
    public SourceType: string;
    public SourceID: number;
    public JobID?: number;
    public WorkDay: string;

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

export class InvoiceWorkChangesDecideRequest
{
    public ProjectUID: string;
    public InvoiceID: number;
    public Decision: string;
    public Remember: boolean;
    public Sources: InvoiceWorkChangeKey[] = [];

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

TypeScript InvoiceWorkChangesDecideRequest 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/invoice/workchanges/{ProjectUID}/decide HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"ProjectUID":"00000000000000000000000000000000","InvoiceID":0,"Decision":"String","Remember":false,"Sources":[{"SourceType":"String","SourceID":0,"JobID":0,"WorkDay":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Success":false,"Changes":[{"SourceType":"String","SourceID":0,"JobID":0,"WorkDate":"0001-01-01T00:00:00.0000000","WorkDay":"String","DisplayDay":"String","Label":"String","JobName":"String","DisplayDate":"0001-01-01T00:00:00.0000000","Unit":"String","Billed":0,"NowQuantity":0,"OverBilled":0,"UnitFactor":0,"Price":0,"Amount":0,"LineType":"String","IsTaxable":false,"InvoiceID":0,"InvoiceUID":"00000000000000000000000000000000","InvoiceNumber":"String","InvoiceTotal":0,"InvoiceIsLocked":false,"InvoiceIsPaid":false,"State":"String","Remembered":"String","DecidedByName":"String","DecidedAt":"0001-01-01T00:00:00.0000000"}]}