| GET | /dealers/shipment/{ShipmentId} | Retrieves shipment based on it's 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 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 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 ShipmentResponse extends OperationResult_1 {
/** @param {{Result?:PartResults,IsSuccessful?:boolean,ErrorMessage?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
export class GetShipment extends AuthenticatedRequest {
/** @param {{ShipmentId?:number,SessionToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {number}
* @description Shipment ID to retrieve the status for. */
ShipmentId;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /dealers/shipment/{ShipmentId} HTTP/1.1
Host: services.acct.2service.nl
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Result:
{
ShipmentId: 0,
HasBeenDispatched: False,
DispatchDate: 0001-01-01,
Articles:
[
{
OrderNumber: String,
ArticleNumber: String,
Quantity: 0,
CustomReference: String
}
],
Packages:
[
{
ShipmentMethod: String,
TrackingNumber: String,
TrackingUrl: String
}
]
},
IsSuccessful: False,
ErrorMessage: String
}