| GET | /dealers/part | Retrieves part info based on part number. |
|---|
namespace _2Service.Webservices.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type PartInfoResultImage() =
///<summary>
///Image number
///</summary>
[<ApiMember(Description="Image number")>]
member val ImageNumber:Int32 = new Int32() with get,set
///<summary>
///Image URL
///</summary>
[<ApiMember(Description="Image URL")>]
member val ImageUrl:String = null with get,set
[<AllowNullLiteral>]
type PartStockQuantity() =
///<summary>
///Location ID
///</summary>
[<ApiMember(Description="Location ID")>]
member val LocationId:Int32 = new Int32() with get,set
///<summary>
///Location code
///</summary>
[<ApiMember(Description="Location code")>]
member val LocationCode:String = null with get,set
///<summary>
///Stock quantity in location
///</summary>
[<ApiMember(Description="Stock quantity in location")>]
member val StockQuantity:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type PartInfoResult() =
///<summary>
///Unique ID for the part.
///</summary>
[<ApiMember(Description="Unique ID for the part.")>]
member val Id:Int32 = new Int32() with get,set
///<summary>
///Part number.
///</summary>
[<ApiMember(Description="Part number.")>]
member val PartNumber:String = null with get,set
///<summary>
///Description of the part.
///</summary>
[<ApiMember(Description="Description of the part.")>]
member val Description:String = null with get,set
///<summary>
///Part manufacturer.
///</summary>
[<ApiMember(Description="Part manufacturer.")>]
member val Manufacturer:String = null with get,set
///<summary>
///Determines if the part can be ordered.
///</summary>
[<ApiMember(Description="Determines if the part can be ordered.")>]
member val CanBeOrdered:Boolean = new Boolean() with get,set
///<summary>
///Textual representation of the status of the part.
///</summary>
[<ApiMember(Description="Textual representation of the status of the part.")>]
member val StatusText:String = null with get,set
///<summary>
///Available stock to order.
///</summary>
[<ApiMember(Description="Available stock to order.")>]
member val AvailableStockQuantity:Int32 = new Int32() with get,set
///<summary>
///Average days needed for delivery.
///</summary>
[<ApiMember(Description="Average days needed for delivery.")>]
member val AverageDeliveryInDays:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Price of a single unit, excluding VAT.
///</summary>
[<ApiMember(Description="Price of a single unit, excluding VAT.")>]
member val UnitPrice:Nullable<Decimal> = new Nullable<Decimal>() with get,set
///<summary>
///EAN number.
///</summary>
[<ApiMember(Description="EAN number.")>]
member val EanNumber:String = null with get,set
///<summary>
///Images
///</summary>
[<ApiMember(Description="Images")>]
member val Images:ResizeArray<PartInfoResultImage> = null with get,set
///<summary>
///Secondary article numbers
///</summary>
[<ApiMember(Description="Secondary article numbers")>]
member val SecondaryArticleNumbers:ResizeArray<String> = null with get,set
///<summary>
///Replacement article numbers
///</summary>
[<ApiMember(Description="Replacement article numbers")>]
member val ReplacementArticleNumbers:ResizeArray<String> = null with get,set
///<summary>
///Stock quantities
///</summary>
[<ApiMember(Description="Stock quantities")>]
member val StockQuantities:ResizeArray<PartStockQuantity> = null with get,set
[<AllowNullLiteral>]
type OperationResult() =
///<summary>
///Specifies if the operation was successful.
///</summary>
[<ApiMember(Description="Specifies if the operation was successful.", ParameterType="model")>]
member val IsSuccessful:Boolean = new Boolean() with get,set
///<summary>
///States error message in case of unsuccessful operation.
///</summary>
[<ApiMember(Description="States error message in case of unsuccessful operation.", ParameterType="model")>]
member val ErrorMessage:String = null with get,set
[<AllowNullLiteral>]
type PartResults() =
///<summary>
///Total number of parts available.
///</summary>
[<ApiMember(Description="Total number of parts available.")>]
member val TotalNumberOfParts:Int32 = new Int32() with get,set
///<summary>
///Indication if there are more parts to retrieve.
///</summary>
[<ApiMember(Description="Indication if there are more parts to retrieve.")>]
member val HasMoreRecords:Boolean = new Boolean() with get,set
///<summary>
///Part records.
///</summary>
[<ApiMember(Description="Part records.")>]
member val Parts:ResizeArray<PartInfoResult> = null with get,set
[<AllowNullLiteral>]
type OperationResult<T>() =
inherit OperationResult()
///<summary>
///Result value
///</summary>
[<ApiMember(Description="Result value", ParameterType="model")>]
member val Result:PartResults = null with get,set
[<AllowNullLiteral>]
type PartInfoResponse() =
inherit OperationResult<PartInfoResult>()
[<AllowNullLiteral>]
type AuthenticatedRequest() =
///<summary>
///Session token received from successful authentication.
///</summary>
[<ApiMember(Description="Session token received from successful authentication.", IsRequired=true, ParameterType="query")>]
member val SessionToken:String = null with get,set
[<AllowNullLiteral>]
type GetPartInfo() =
inherit AuthenticatedRequest()
///<summary>
///Part number to retrieve info for.
///</summary>
[<ApiMember(Description="Part number to retrieve info for.", IsRequired=true)>]
member val PartNumber:String = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=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"}