| GET | /dealers/parts | Retrieves part info based on multiple part numbers. |
|---|
// @ts-nocheck
export class AuthenticatedRequest
{
/** @description Session token received from successful authentication. */
// @ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query")
public SessionToken: string;
public constructor(init?: Partial<AuthenticatedRequest>) { (Object as any).assign(this, init); }
}
export class OperationResult
{
/** @description Specifies if the operation was successful. */
// @ApiMember(Description="Specifies if the operation was successful.", ParameterType="model")
public IsSuccessful: boolean;
/** @description States error message in case of unsuccessful operation. */
// @ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model")
public ErrorMessage?: string;
public constructor(init?: Partial<OperationResult>) { (Object as any).assign(this, init); }
}
export class PartInfoResultImage
{
/** @description Image number */
// @ApiMember(Description="Image number")
public ImageNumber: number;
/** @description Image URL */
// @ApiMember(Description="Image URL")
public ImageUrl?: string;
public constructor(init?: Partial<PartInfoResultImage>) { (Object as any).assign(this, init); }
}
export class PartStockQuantity
{
/** @description Location ID */
// @ApiMember(Description="Location ID")
public LocationId: number;
/** @description Location code */
// @ApiMember(Description="Location code")
public LocationCode?: string;
/** @description Stock quantity in location */
// @ApiMember(Description="Stock quantity in location")
public StockQuantity: number;
public constructor(init?: Partial<PartStockQuantity>) { (Object as any).assign(this, init); }
}
export class PartInfoResult
{
/** @description Unique ID for the part. */
// @ApiMember(Description="Unique ID for the part.")
public Id: number;
/** @description Part number. */
// @ApiMember(Description="Part number.")
public PartNumber?: string;
/** @description Description of the part. */
// @ApiMember(Description="Description of the part.")
public Description?: string;
/** @description Part manufacturer. */
// @ApiMember(Description="Part manufacturer.")
public Manufacturer?: string;
/** @description Determines if the part can be ordered. */
// @ApiMember(Description="Determines if the part can be ordered.")
public CanBeOrdered: boolean;
/** @description Textual representation of the status of the part. */
// @ApiMember(Description="Textual representation of the status of the part.")
public StatusText?: string;
/** @description Available stock to order. */
// @ApiMember(Description="Available stock to order.")
public AvailableStockQuantity: number;
/** @description Average days needed for delivery. */
// @ApiMember(Description="Average days needed for delivery.")
public AverageDeliveryInDays?: number;
/** @description Price of a single unit, excluding VAT. */
// @ApiMember(Description="Price of a single unit, excluding VAT.")
public UnitPrice?: number;
/** @description EAN number. */
// @ApiMember(Description="EAN number.")
public EanNumber?: string;
/** @description Images */
// @ApiMember(Description="Images")
public Images?: PartInfoResultImage[];
/** @description Secondary article numbers */
// @ApiMember(Description="Secondary article numbers")
public SecondaryArticleNumbers?: string[];
/** @description Replacement article numbers */
// @ApiMember(Description="Replacement article numbers")
public ReplacementArticleNumbers?: string[];
/** @description Stock quantities */
// @ApiMember(Description="Stock quantities")
public StockQuantities?: PartStockQuantity[];
public constructor(init?: Partial<PartInfoResult>) { (Object as any).assign(this, init); }
}
export class PartResults
{
/** @description Total number of parts available. */
// @ApiMember(Description="Total number of parts available.")
public TotalNumberOfParts: number;
/** @description Indication if there are more parts to retrieve. */
// @ApiMember(Description="Indication if there are more parts to retrieve.")
public HasMoreRecords: boolean;
/** @description Part records. */
// @ApiMember(Description="Part records.")
public Parts?: PartInfoResult[];
public constructor(init?: Partial<PartResults>) { (Object as any).assign(this, init); }
}
export class OperationResult_1<T> extends OperationResult
{
/** @description Result value */
// @ApiMember(Description="Result value", ParameterType="model")
public Result?: PartResults;
public constructor(init?: Partial<OperationResult_1<T>>) { super(init); (Object as any).assign(this, init); }
}
export class MultiplePartInfosResponse extends Array<OperationResult_1<PartInfoResult>
{
public UnknownParts?: string[];
public constructor(init?: Partial<MultiplePartInfosResponse>) { super(); (Object as any).assign(this, init); }
}
export class GetMultiplePartInfos extends AuthenticatedRequest
{
/** @description Multiple part numbers to retrieve info for. */
// @ApiMember(Description="Multiple part numbers to retrieve info for.", IsRequired=true)
public PartNumbers: string[] = [];
public constructor(init?: Partial<GetMultiplePartInfos>) { super(init); (Object as any).assign(this, init); }
}
TypeScript GetMultiplePartInfos DTOs
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/parts HTTP/1.1 Host: services.acct.2service.nl Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
UnknownParts:
[
String
],
Result:
[
{
}
],
IsSuccessful: False,
ErrorMessage: String
}