POST api/StockItems
To post a new Stock Item. Item is expected as JSON in the body
Request Information
URI Parameters
None.
Body Parameters
A single stock item as JSON
StockItemVM| Name | Description | Type | Additional information |
|---|---|---|---|
| T_ID |
Transteams unique record ID (Key) |
integer |
None. |
| C_ID |
The Customers unique record ID |
integer |
Required |
| OwnerID |
OwnerID may be ommitted in transfered JSON Record; otherwise it is ignored. OwnerID is derived from login identity. |
integer |
None. |
| Ship |
The ships name |
string |
Required Max length: 50 |
| Supplier |
The suppliers name |
string |
Required Max length: 50 |
| OrderNo |
The suppliers (or customers) number (ID) unique per order |
string |
Required Max length: 50 |
| Quantity |
Quantity of items |
integer |
Required Range: inclusive between 1 and 2147483647 |
| Item |
The items name or description in english |
string |
Required Max length: 50 |
| Item_German |
The items name or description in german |
string |
Max length: 50 |
| Value |
Value of item(s) in Euro |
decimal number |
None. |
| Weight | decimal number |
None. |
|
| Length | decimal number |
None. |
|
| Width | decimal number |
None. |
|
| Height | decimal number |
None. |
|
| AvisDate |
Date/Time of record creation at Transteam. Ignored if posted, but added to the record sent in the response body. |
date |
None. |
| StockDate |
Date/time of arrival at Transteam stock. Read only; ignored if posted. |
date |
None. |
| Status | string |
Max length: 1 |
|
| hasPDF | boolean |
None. |
|
| DG | boolean |
None. |
Request Formats
application/json, text/json
{
"T_ID": 1,
"C_ID": 1,
"OwnerID": 1,
"Ship": "sample string 2",
"Supplier": "sample string 3",
"OrderNo": "sample string 4",
"Quantity": 5,
"Item": "sample string 6",
"Item_German": "sample string 7",
"Value": 1.0,
"Weight": 1.1,
"Length": 1.1,
"Width": 1.1,
"Height": 1.1,
"AvisDate": "2025-12-20T07:31:24.4765512+01:00",
"StockDate": "2025-12-20T07:31:24.4765512+01:00",
"Status": "sample string 8",
"hasPDF": true,
"DG": true
}
application/xml, text/xml
<StockItemVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TTWebAPI.ViewModels"> <AvisDate>2025-12-20T07:31:24.4765512+01:00</AvisDate> <C_ID>1</C_ID> <DG>true</DG> <Height>1.1</Height> <Item>sample string 6</Item> <Item_German>sample string 7</Item_German> <Length>1.1</Length> <OrderNo>sample string 4</OrderNo> <OwnerID>1</OwnerID> <Quantity>5</Quantity> <Ship>sample string 2</Ship> <Status>sample string 8</Status> <StockDate>2025-12-20T07:31:24.4765512+01:00</StockDate> <Supplier>sample string 3</Supplier> <T_ID>1</T_ID> <Value>1</Value> <Weight>1.1</Weight> <Width>1.1</Width> <hasPDF>true</hasPDF> </StockItemVM>
application/x-www-form-urlencoded
Response Information
Resource Description
Returns status code and (in the Body) added Stock Item with new Transteam ID as JSON
HttpResponseMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| Version | Version |
None. |
|
| Content | HttpContent |
None. |
|
| StatusCode | HttpStatusCode |
None. |
|
| ReasonPhrase | string |
None. |
|
| Headers | Collection of Object |
None. |
|
| RequestMessage | HttpRequestMessage |
None. |
|
| IsSuccessStatusCode | boolean |
None. |