2Service Services API

<back to all web services

GetPartInfo

The following routes are available for this service:
GET/dealers/partRetrieves part info based on part number.
// @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 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 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 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 PartInfoResponse extends OperationResult_1<PartInfoResult>
{

    public constructor(init?: Partial<PartInfoResponse>) { super(init); (Object as any).assign(this, init); }
}

export class GetPartInfo extends AuthenticatedRequest
{
    /** @description Part number to retrieve info for. */
    // @ApiMember(Description="Part number to retrieve info for.", IsRequired=true)
    public PartNumber: string;

    public constructor(init?: Partial<GetPartInfo>) { super(init); (Object as any).assign(this, init); }
}

TypeScript GetPartInfo DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /dealers/part HTTP/1.1 
Host: services.acct.2service.nl 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"IsSuccessful":false,"ErrorMessage":"String"}