PUT api/Items

Create a new Item

Request Information

URI Parameters

None.

Body Parameters

AssetPut
NameDescriptionTypeAdditional information
Description

The Item description

string

Required

Max length: 150

System

The System code

string

Required

Max length: 20

Entity

The Entity code (Cost Center or Client)

string

Required

Max length: 20

IsEntityClient

If true, the Entity Code is the Client Code; if false the Entity Code is the Cost Center Code. Default: false

boolean

None.

Type

The Item Type code

string

Required

Max length: 5

Number

If supplied, this will set the ManWinWin structured code

integer

Equal or above: 0

Date

date

Required

Unit

Default: Hours

Unit

None.

User1

If supplied and Number is empty, this will be the Item code

string

Max length: 30

User2

If supplied and User1 and Number are empty, this will be the Item code

string

Max length: 30

CalculatedADR

If true, the ADR is automatically calculated when a new Running Record is made

boolean

None.

Picture

The picture file name and location.
Supported file types: jpg, jpeg, gif, bmp, png, tif, wmf

string

Matching regular expression pattern: (?i).+\.(jpg|jpeg|gif|bmp|png|tif|wmf)$

Max length: 255

Specifications

Collection of Specification

No duplicate values on: Number

Location

The Location code

string

Max length: 20

Request Formats

Sample:
{
  "Description": "Truck",
  "System": "Vehicles",
  "Entity": "Transportation",
  "IsEntityClient": false,
  "Type": "VH",
  "Date": "2015-08-23T00:00:00",
  "Unit": "Kilometers",
  "User1": "XV-01-DA",
  "CalculatedADR": true,
  "Specifications": [
    {
      "Number": 1,
      "Value": "The model"
    },
    {
      "Number": 3,
      "Value": "The serial number"
    }
  ]
}
Sample:
<AssetPut xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Parque">
  <CalculatedADR>true</CalculatedADR>
  <Date>2015-08-23T00:00:00</Date>
  <Description>Truck</Description>
  <Entity>Transportation</Entity>
  <IsEntityClient>false</IsEntityClient>
  <Location i:nil="true" />
  <Number i:nil="true" />
  <Picture i:nil="true" />
  <Specifications>
    <Specification>
      <Number>1</Number>
      <Value>The model</Value>
    </Specification>
    <Specification>
      <Number>3</Number>
      <Value>The serial number</Value>
    </Specification>
  </Specifications>
  <System>Vehicles</System>
  <Type>VH</Type>
  <Unit>Kilometers</Unit>
  <User1>XV-01-DA</User1>
  <User2 i:nil="true" />
</AssetPut>
Sample:

Sample not available.

Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Description"

Truck
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="System"

Vehicles
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Entity"

Transportation
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="IsEntityClient"

False
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Type"

VH
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Date"

2015-08-23T00:00:00.0000000
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Unit"

Kilometers
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="User1"

XV-01-DA
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="CalculatedADR"

True
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Specifications[0].Number"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Specifications[0].Value"

The model
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Specifications[1].Number"

3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Specifications[1].Value"

The serial number
--MultipartDataMediaFormatterBoundary1q2w3e--

Response Information

Resource Description

Returns the created Item Code

string

Response Formats

Sample:
"sample string 1"
Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name=""

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e--