2Service Services API

<back to all web services

GetPartInfoById

The following routes are available for this service:
GET/dealers/part/{PartId}Retrieves part info based on part id.
GetPartInfoById Parameters:
NameParameterData TypeRequiredDescription
PartIdpathintYesPart id to retrieve info for.
AuthenticatedRequest Parameters:
NameParameterData TypeRequiredDescription
SessionTokenquerystringYesSession token received from successful authentication.
OperationResult<T> Parameters:
NameParameterData TypeRequiredDescription
ResultmodelTNoResult value
OperationResult Parameters:
NameParameterData TypeRequiredDescription
IsSuccessfulmodelboolNoSpecifies if the operation was successful.
ErrorMessagemodelstringNoStates error message in case of unsuccessful operation.
PartInfoResult Parameters:
NameParameterData TypeRequiredDescription
IdformintNoUnique ID for the part.
PartNumberformstringNoPart number.
DescriptionformstringNoDescription of the part.
ManufacturerformstringNoPart manufacturer.
CanBeOrderedformboolNoDetermines if the part can be ordered.
StatusTextformstringNoTextual representation of the status of the part.
AvailableStockQuantityformintNoAvailable stock to order.
AverageDeliveryInDaysformint?NoAverage days needed for delivery.
UnitPriceformdecimal?NoPrice of a single unit, excluding VAT.
EanNumberformstringNoEAN number.
ImagesformList<PartInfoResultImage>NoImages
SecondaryArticleNumbersformList<string>NoSecondary article numbers
ReplacementArticleNumbersformList<string>NoReplacement article numbers
PartInfoResultImage Parameters:
NameParameterData TypeRequiredDescription
ImageNumberformintNoImage number
ImageUrlformstringNoImage URL

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /dealers/part/{PartId} HTTP/1.1 
Host: services.acct.2service.nl 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Result":{"Id":0,"PartNumber":"String","Description":"String","Manufacturer":"String","CanBeOrdered":false,"StatusText":"String","AvailableStockQuantity":0,"AverageDeliveryInDays":0,"UnitPrice":0,"EanNumber":"String","Images":[{"ImageNumber":0,"ImageUrl":"String"}],"SecondaryArticleNumbers":["String"],"ReplacementArticleNumbers":["String"]},"IsSuccessful":false,"ErrorMessage":"String"}