PUT api/Materials/Inventory

Add a new inventory

Request Information

URI Parameters

None.

Body Parameters

Inventory
NameDescriptionTypeAdditional information
Code

a code for the inventory

string

Required

Max length: 15

Description

the inventory description

string

Max length: 200

Store

string

Required

Date

the inventory date

date

Required

Account

string

None.

Consolidated

if true, the inventory will be consolidated. (default: false)

boolean

None.

Materials

Collection of InventoryItem

No duplicate values on: Code

Request Formats

Sample:
{
  "Code": "sample string 1",
  "Description": "sample string 2",
  "Store": "sample string 3",
  "Date": "2024-11-14T16:28:23.1587197+00:00",
  "Account": "sample string 4",
  "Consolidated": true,
  "Materials": [
    {
      "Code": "sample string 1",
      "Lot": "sample string 2",
      "Quantity": 1.1,
      "UnitaryCost": 3.1
    },
    {
      "Code": "sample string 1",
      "Lot": "sample string 2",
      "Quantity": 1.1,
      "UnitaryCost": 3.1
    }
  ]
}
Sample:
<Inventory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Materiais">
  <Account>sample string 4</Account>
  <Code>sample string 1</Code>
  <Consolidated>true</Consolidated>
  <Date>2024-11-14T16:28:23.1587197+00:00</Date>
  <Description>sample string 2</Description>
  <Materials>
    <InventoryItem>
      <Code>sample string 1</Code>
      <Lot>sample string 2</Lot>
      <Quantity>1.1</Quantity>
      <UnitaryCost>3.1</UnitaryCost>
    </InventoryItem>
    <InventoryItem>
      <Code>sample string 1</Code>
      <Lot>sample string 2</Lot>
      <Quantity>1.1</Quantity>
      <UnitaryCost>3.1</UnitaryCost>
    </InventoryItem>
  </Materials>
  <Store>sample string 3</Store>
</Inventory>
Sample:

Sample not available.

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

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Description"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Store"

sample string 3
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Date"

2024-11-14T16:28:23.1587197+00:00
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Account"

sample string 4
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Consolidated"

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

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[0].Lot"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[0].Quantity"

1.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[0].UnitaryCost"

3.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[1].Code"

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[1].Lot"

sample string 2
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[1].Quantity"

1.1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Materials[1].UnitaryCost"

3.1
--MultipartDataMediaFormatterBoundary1q2w3e--

Response Information

Resource Description

Returns the inventory Id

integer

Response Formats

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

1
--MultipartDataMediaFormatterBoundary1q2w3e--