Trendsic Platform Service

<back to all web services

ResourceRateAppendRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/rates/{Uid}
"use strict";
export class ResourceRateComponentDto {
    /** @param {{Label?:string,Amount?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Label;
    /** @type {number} */
    Amount;
}
export class ResourceRateHistoryRow {
    /** @param {{From?:string,Cost?:number,Bill?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    From;
    /** @type {number} */
    Cost;
    /** @type {number} */
    Bill;
}
export class ResourceRateResource {
    /** @param {{Id?:string,Name?:string,Meta?:string,Unit?:string,CostRate?:number,BillRate?:number,EffectiveFrom?:string,HasCard?:boolean,Composition?:ResourceRateComponentDto[],PrevailingFloor?:number,History?:ResourceRateHistoryRow[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Name;
    /** @type {string} */
    Meta;
    /** @type {string} */
    Unit;
    /** @type {number} */
    CostRate;
    /** @type {number} */
    BillRate;
    /** @type {string} */
    EffectiveFrom;
    /** @type {boolean} */
    HasCard;
    /** @type {ResourceRateComponentDto[]} */
    Composition = [];
    /** @type {?number} */
    PrevailingFloor;
    /** @type {ResourceRateHistoryRow[]} */
    History = [];
}
export class ResourceRateAppendResponse {
    /** @param {{ResponseStatus?:ResponseStatus,Resource?:ResourceRateResource}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {ResourceRateResource} */
    Resource;
}
export class ResourceRateAppendRequest {
    /** @param {{Uid?:string,CostRate?:number,BillRate?:number,EffectiveFrom?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Uid;
    /** @type {number} */
    CostRate;
    /** @type {number} */
    BillRate;
    /** @type {string} */
    EffectiveFrom;
}

JavaScript ResourceRateAppendRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/rates/{Uid} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Uid":"00000000000000000000000000000000","CostRate":0,"BillRate":0,"EffectiveFrom":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Resource":{"Id":"00000000000000000000000000000000","Name":"String","Meta":"String","Unit":"String","CostRate":0,"BillRate":0,"EffectiveFrom":"String","HasCard":false,"Composition":[{"Label":"String","Amount":0}],"PrevailingFloor":0,"History":[{"From":"String","Cost":0,"Bill":0}]}}