POST api/Materials/Entries

Add a new store entry

Request Information

URI Parameters

None.

Body Parameters

the store entry

StoreEntryPost
NameDescriptionTypeAdditional information
Store

string

Required

Code

A code for the entry document

string

Required

Max length: 20

Type

Entry Document type

string

Required

Date

date

Required

Supplier

string

Required

Description

string

Required

Max length: 250

Currency

The currency code.
If empty, the Store currency is used

string

None.

Consolidated

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

boolean

None.

Materials

Collection of MaterialEntry

No duplicate values on: Code

Request Formats

Sample:
{
  "Store": "sample string 1",
  "Code": "sample string 2",
  "Type": "sample string 3",
  "Date": "2024-11-14T16:40:47.7767209+00:00",
  "Supplier": "sample string 4",
  "Description": "sample string 5",
  "Currency": "sample string 6",
  "Consolidated": true,
  "Materials": [
    {
      "Code": "sample string 1",
      "Lot": "sample string 2",
      "CostAllocation": {
        "Type": "CostCenter",
        "Code": "sample string 1"
      },
      "UnitaryCost": 3.1,
      "Quantity": 1.1
    },
    {
      "Code": "sample string 1",
      "Lot": "sample string 2",
      "CostAllocation": {
        "Type": "CostCenter",
        "Code": "sample string 1"
      },
      "UnitaryCost": 3.1,
      "Quantity": 1.1
    }
  ]
}
Sample:
<StoreEntryPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Materiais">
  <Code>sample string 2</Code>
  <Consolidated>true</Consolidated>
  <Currency>sample string 6</Currency>
  <Date>2024-11-14T16:40:47.7767209+00:00</Date>
  <Description>sample string 5</Description>
  <Materials>
    <StoreEntryPost.MaterialEntry>
      <Code>sample string 1</Code>
      <CostAllocation xmlns:d4p1="http://schemas.datacontract.org/2004/07/WebAPI.Models">
        <d4p1:Code>sample string 1</d4p1:Code>
        <d4p1:Type>CostCenter</d4p1:Type>
      </CostAllocation>
      <Lot>sample string 2</Lot>
      <Quantity>1.1</Quantity>
      <UnitaryCost>3.1</UnitaryCost>
    </StoreEntryPost.MaterialEntry>
    <StoreEntryPost.MaterialEntry>
      <Code>sample string 1</Code>
      <CostAllocation xmlns:d4p1="http://schemas.datacontract.org/2004/07/WebAPI.Models">
        <d4p1:Code>sample string 1</d4p1:Code>
        <d4p1:Type>CostCenter</d4p1:Type>
      </CostAllocation>
      <Lot>sample string 2</Lot>
      <Quantity>1.1</Quantity>
      <UnitaryCost>3.1</UnitaryCost>
    </StoreEntryPost.MaterialEntry>
  </Materials>
  <Store>sample string 1</Store>
  <Supplier>sample string 4</Supplier>
  <Type>sample string 3</Type>
</StoreEntryPost>
Sample:

Sample not available.

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

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

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

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

2024-11-14T16:40:47.7767209+00:00
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Supplier"

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

sample string 5
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Currency"

sample string 6
--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].CostAllocation.Type"

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

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

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

1.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].CostAllocation.Type"

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

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

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

1.1
--MultipartDataMediaFormatterBoundary1q2w3e--

Response Information

Resource Description

StoreEntryResponse
NameDescriptionTypeAdditional information
EntryDocumentID

integer

None.

EntryID

Collection of integer

None.

Response Formats

Sample:
{
  "EntryDocumentID": 1,
  "EntryID": [
    1,
    2
  ]
}
Sample:
<StoreEntryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Materiais">
  <EntryDocumentID>1</EntryDocumentID>
  <EntryID xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </EntryID>
</StoreEntryResponse>
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="EntryDocumentID"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="EntryID[0]"

1
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="EntryID[1]"

2
--MultipartDataMediaFormatterBoundary1q2w3e--