2Service Services API

<back to all web services

GetOrderTracking

The following routes are available for this service:
GET/dealers/order/trackingRetrieves tracking numbers based on order number.
"use strict";
export class AuthenticatedRequest {
    /** @param {{SessionToken?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Session token received from successful authentication. */
    SessionToken;
}
/** @typedef {number} */
export var OrderStatus;
(function (OrderStatus) {
    OrderStatus[OrderStatus["Open"] = 1] = "Open"
    OrderStatus[OrderStatus["Completed"] = 2] = "Completed"
    OrderStatus[OrderStatus["Cancelled"] = 3] = "Cancelled"
})(OrderStatus || (OrderStatus = {}));
export class ShipmentArticleResult {
    /** @param {{OrderNumber?:string,ArticleNumber?:string,Quantity?:number,CustomReference?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description Order number. */
    OrderNumber;
    /**
     * @type {?string}
     * @description Article number. */
    ArticleNumber;
    /**
     * @type {number}
     * @description Quantity. */
    Quantity;
    /**
     * @type {?string}
     * @description Custom reference. */
    CustomReference;
}
export class ShipmentPackageResult {
    /** @param {{ShipmentMethod?:string,TrackingNumber?:string,TrackingUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description Shipment method. */
    ShipmentMethod;
    /**
     * @type {?string}
     * @description Tracking number. */
    TrackingNumber;
    /**
     * @type {?string}
     * @description Tracking URL. */
    TrackingUrl;
}
export class ShipmentResult {
    /** @param {{ShipmentId?:number,HasBeenDispatched?:boolean,DispatchDate?:string,Articles?:ShipmentArticleResult[],Packages?:ShipmentPackageResult[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description ID of the shipment. */
    ShipmentId;
    /**
     * @type {boolean}
     * @description Determines of the shipment has been dispatched. */
    HasBeenDispatched;
    /**
     * @type {?string}
     * @description Date/time of dispatch. */
    DispatchDate;
    /**
     * @type {?ShipmentArticleResult[]}
     * @description List of articles in shipment. */
    Articles;
    /**
     * @type {?ShipmentPackageResult[]}
     * @description List of packages for shipment. */
    Packages;
}
export class OrderTrackingResult {
    /** @param {{OrderNumber?:string,OrderDate?:string,Status?:OrderStatus,Shipments?:ShipmentResult[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description Order number. */
    OrderNumber;
    /**
     * @type {string}
     * @description Order date. */
    OrderDate;
    /**
     * @type {OrderStatus}
     * @description Order status. */
    Status;
    /**
     * @type {?ShipmentResult[]}
     * @description List of shipments (if any). */
    Shipments;
}
export class OperationResult {
    /** @param {{IsSuccessful?:boolean,ErrorMessage?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {boolean}
     * @description Specifies if the operation was successful. */
    IsSuccessful;
    /**
     * @type {?string}
     * @description States error message in case of unsuccessful operation. */
    ErrorMessage;
}
export class PartInfoResultImage {
    /** @param {{ImageNumber?:number,ImageUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Image number */
    ImageNumber;
    /**
     * @type {?string}
     * @description Image URL */
    ImageUrl;
}
export class PartStockQuantity {
    /** @param {{LocationId?:number,LocationCode?:string,StockQuantity?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Location ID */
    LocationId;
    /**
     * @type {?string}
     * @description Location code */
    LocationCode;
    /**
     * @type {number}
     * @description Stock quantity in location */
    StockQuantity;
}
export class PartInfoResult {
    /** @param {{Id?:number,PartNumber?:string,Description?:string,Manufacturer?:string,CanBeOrdered?:boolean,StatusText?:string,AvailableStockQuantity?:number,AverageDeliveryInDays?:number,UnitPrice?:number,EanNumber?:string,Images?:PartInfoResultImage[],SecondaryArticleNumbers?:string[],ReplacementArticleNumbers?:string[],StockQuantities?:PartStockQuantity[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Unique ID for the part. */
    Id;
    /**
     * @type {?string}
     * @description Part number. */
    PartNumber;
    /**
     * @type {?string}
     * @description Description of the part. */
    Description;
    /**
     * @type {?string}
     * @description Part manufacturer. */
    Manufacturer;
    /**
     * @type {boolean}
     * @description Determines if the part can be ordered. */
    CanBeOrdered;
    /**
     * @type {?string}
     * @description Textual representation of the status of the part. */
    StatusText;
    /**
     * @type {number}
     * @description Available stock to order. */
    AvailableStockQuantity;
    /**
     * @type {?number}
     * @description Average days needed for delivery. */
    AverageDeliveryInDays;
    /**
     * @type {?number}
     * @description Price of a single unit, excluding VAT. */
    UnitPrice;
    /**
     * @type {?string}
     * @description EAN number. */
    EanNumber;
    /**
     * @type {?PartInfoResultImage[]}
     * @description Images */
    Images;
    /**
     * @type {?string[]}
     * @description Secondary article numbers */
    SecondaryArticleNumbers;
    /**
     * @type {?string[]}
     * @description Replacement article numbers */
    ReplacementArticleNumbers;
    /**
     * @type {?PartStockQuantity[]}
     * @description Stock quantities */
    StockQuantities;
}
export class PartResults {
    /** @param {{TotalNumberOfParts?:number,HasMoreRecords?:boolean,Parts?:PartInfoResult[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Total number of parts available. */
    TotalNumberOfParts;
    /**
     * @type {boolean}
     * @description Indication if there are more parts to retrieve. */
    HasMoreRecords;
    /**
     * @type {?PartInfoResult[]}
     * @description Part records. */
    Parts;
}
/** @typedef T {any} */
export class OperationResult_1 extends OperationResult {
    /** @param {{Result?:PartResults,IsSuccessful?:boolean,ErrorMessage?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {?PartResults}
     * @description Result value */
    Result;
}
export class OrderTrackingResponse extends OperationResult_1 {
    /** @param {{Result?:PartResults,IsSuccessful?:boolean,ErrorMessage?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetOrderTracking extends AuthenticatedRequest {
    /** @param {{OrderNumber?:string,SessionToken?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {string}
     * @description Order number to retrieve tracking for. */
    OrderNumber;
}

JavaScript GetOrderTracking 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.

GET /dealers/order/tracking HTTP/1.1 
Host: services.acct.2service.nl 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Result":{"OrderNumber":"String","OrderDate":"0001-01-01T00:00:00.0000000","Status":"Open","Shipments":[{"ShipmentId":0,"HasBeenDispatched":false,"DispatchDate":"0001-01-01T00:00:00.0000000","Articles":[{"OrderNumber":"String","ArticleNumber":"String","Quantity":0,"CustomReference":"String"}],"Packages":[{"ShipmentMethod":"String","TrackingNumber":"String","TrackingUrl":"String"}]}]},"IsSuccessful":false,"ErrorMessage":"String"}