| GET | /dealers/part/{PartId} | Retrieves part info based on part id. |
|---|
"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;
}
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 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 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 PartInfoResponse extends OperationResult_1 {
/** @param {{Result?:PartResults,IsSuccessful?:boolean,ErrorMessage?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
export class GetPartInfoById extends AuthenticatedRequest {
/** @param {{PartId?:number,SessionToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {number}
* @description Part id to retrieve info for. */
PartId;
}
JavaScript GetPartInfoById DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /dealers/part/{PartId} HTTP/1.1
Host: services.acct.2service.nl
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"IsSuccessful":false,"ErrorMessage":"String"}