| POST | /dealers/authenticate | Authenticate with user name and password. Returns session token. Note: the token expires after 5 minutes of inactivity. |
|---|
// @ts-nocheck
export class AuthenticateResult
{
/** @description Session token to use in successive calls to the services. */
// @ApiMember(Description="Session token to use in successive calls to the services.", ParameterType="model")
public SessionToken?: string;
public constructor(init?: Partial<AuthenticateResult>) { (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 AuthenticateResponse extends OperationResult_1<AuthenticateResult>
{
public constructor(init?: Partial<AuthenticateResponse>) { super(init); (Object as any).assign(this, init); }
}
export class Authenticate
{
/** @description User name for your account. */
// @ApiMember(Description="User name for your account.", IsRequired=true, ParameterType="query")
public UserName: string;
/** @description Password provided by your supplier. */
// @ApiMember(Description="Password provided by your supplier.", IsRequired=true, ParameterType="query")
public Password: string;
public constructor(init?: Partial<Authenticate>) { (Object as any).assign(this, init); }
}
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.
POST /dealers/authenticate HTTP/1.1
Host: services.acct.2service.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"UserName":"String","Password":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Result":{"SessionToken":"String"},"IsSuccessful":false,"ErrorMessage":"String"}