GET api/Stocks/{id}

Get specific stock

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

globally unique identifier

Required

Body Parameters

None.

Remarks

None.

Example

// Get specified stock
http://localhost/api/Stocks/123

Response Information

Resource Description

Stock

StockResponse
NameDescriptionTypeAdditional information
Id

The unique identifier for the stock

globally unique identifier

Required

StockNumber

integer

None.

Name

string

Required

Max length: 50

BranchId

integer

Required

Default

boolean

Required

WMSStock

True if stock belongs to central warehouse branch.

boolean

Required

IsClosed

boolean

Required

IsExternal

boolean

Required

Address1

string

Max length: 100

Address2

string

Max length: 100

Address3

string

Max length: 100

PostalCode

string

Max length: 10

Town

string

Max length: 50

StockType

1 = Trading Stock
2 = Tyre Hotel

StockType

Required

Response Formats

application/json, text/json

Sample:
{
  "Id": "01fe2802-2a0c-4571-b064-5844fc72222b",
  "StockNumber": 1,
  "Name": "sample string 2",
  "BranchId": 3,
  "Default": true,
  "WMSStock": true,
  "IsClosed": true,
  "IsExternal": true,
  "Address1": "sample string 7",
  "Address2": "sample string 8",
  "Address3": "sample string 9",
  "PostalCode": "sample string 10",
  "Town": "sample string 11",
  "StockType": 1
}

application/xml, text/xml

Sample:
<StockResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Stock">
  <Address1>sample string 7</Address1>
  <Address2>sample string 8</Address2>
  <Address3>sample string 9</Address3>
  <BranchId>3</BranchId>
  <Default>true</Default>
  <Id>01fe2802-2a0c-4571-b064-5844fc72222b</Id>
  <IsClosed>true</IsClosed>
  <IsExternal>true</IsExternal>
  <Name>sample string 2</Name>
  <PostalCode>sample string 10</PostalCode>
  <StockNumber>1</StockNumber>
  <StockType>TradingStock</StockType>
  <Town>sample string 11</Town>
  <WMSStock>true</WMSStock>
</StockResponse>