Trackunit API

<back to all web services

UpdateUnit

The following routes are available for this service:
PUT/unit
PUT/unit/{Id}
GET POST/UpdateUnit
GET POST/UpdateUnit/{Id}
"use strict";
export class UpdateUnitResponse {
    /** @param {{responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    responseStatus;
}
export class UpdateUnit {
    /** @param {{id?:string,name?:string,referenceNumber?:string,clientId?:string,categoryId?:string,vehicleType?:string,preKm?:number,preRun1?:number,preRun2?:number,note?:string,isActive?:boolean,input1Name?:string,input2Name?:string,input3Name?:string,input4Name?:string,lock?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    referenceNumber;
    /** @type {string} */
    clientId;
    /** @type {string} */
    categoryId;
    /** @type {string} */
    vehicleType;
    /** @type {?number} */
    preKm;
    /** @type {?number} */
    preRun1;
    /** @type {?number} */
    preRun2;
    /** @type {string} */
    note;
    /** @type {?boolean} */
    isActive;
    /** @type {string} */
    input1Name;
    /** @type {string} */
    input2Name;
    /** @type {string} */
    input3Name;
    /** @type {string} */
    input4Name;
    /** @type {?boolean} */
    lock;
}

JavaScript UpdateUnit 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 /UpdateUnit HTTP/1.1 
Host: api.trackunit.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String","name":"String","referenceNumber":"String","clientId":"String","categoryId":"String","vehicleType":"String","preKm":0,"preRun1":0,"preRun2":0,"note":"String","isActive":false,"input1Name":"String","input2Name":"String","input3Name":"String","input4Name":"String","lock":false}
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"}}}