Valuekeep Developers - Web API Reference

Parts and Inventory | Inventory Posting

Service to manage entities of type 'InventoryPosting'.

Overview


URL api/{tenantKey}/{orgKey}/inventoryCore/inventoryPostings
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

GET Operations

GET InventoryPostings (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See InventoryPostingResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /inventoryCore/inventoryPostings/odata

GET InventoryPosting by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See InventoryPostingResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /inventoryCore/inventoryPostings/{id}

GET InventoryPosting by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
postingKey (Guid) The Id of the inventory posting.

Response:

When successful, the response body contains the entity record. See InventoryPostingResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /inventoryCore/inventoryPostings/{companyKey}/{postingKey}

POST Operations

POST InventoryPostings

Creates a new entity record.

The following elements are required:

inventoryPostingResource (ApiInventoryPostingResource) The request body should contain the entity record that should be created.
See ApiInventoryPostingResource.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiInventoryPostingResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /inventoryCore/inventoryPostings

PUT Operations

PUT Set BasePartId InventoryPosting

Updates the value of attribute 'BasePartId' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/basePartId

PUT Set BaseUnit InventoryPosting

Updates the value of attribute 'BaseUnit' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/baseUnit

PUT Set CalculatedUnitCost InventoryPosting

Updates the value of attribute 'CalculatedUnitCost' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/calculatedUnitCost

PUT Set Company InventoryPosting

Updates the value of attribute 'Company' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/company

PUT Set Currency InventoryPosting

Updates the value of attribute 'Currency' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/currency

PUT Set DimensionSet InventoryPosting

Updates the value of attribute 'DimensionSet' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/dimensionSet

PUT Set DocumentDate InventoryPosting

Updates the value of attribute 'DocumentDate' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/documentDate

PUT Set InValue InventoryPosting

Updates the value of attribute 'InValue' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/inValue

PUT Set InventoryAmount InventoryPosting

Updates the value of attribute 'InventoryAmount' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/inventoryAmount

PUT Set InventoryBalance InventoryPosting

Updates the value of attribute 'InventoryBalance' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/inventoryBalance

PUT Set InventoryPart InventoryPosting

Updates the value of attribute 'InventoryPart' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/inventoryPart

PUT Set IsActive InventoryPosting

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/isActive

PUT Set JournalNumber InventoryPosting

Updates the value of attribute 'JournalNumber' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (int) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/journalNumber

PUT Set PostingDate InventoryPosting

Updates the value of attribute 'PostingDate' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/postingDate

PUT Set PostingKey InventoryPosting

Updates the value of attribute 'PostingKey' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/postingKey

PUT Set PriceDifference InventoryPosting

Updates the value of attribute 'PriceDifference' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/priceDifference

PUT Set Quantity InventoryPosting

Updates the value of attribute 'Quantity' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/quantity

PUT Set ReferenceQuantity InventoryPosting

Updates the value of attribute 'ReferenceQuantity' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/referenceQuantity

PUT Set Reversal InventoryPosting

Updates the value of attribute 'Reversal' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/reversal

PUT Set SourceDoc InventoryPosting

Updates the value of attribute 'SourceDoc' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/sourceDoc

PUT Set SourceDocId InventoryPosting

Updates the value of attribute 'SourceDocId' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/sourceDocId

PUT Set SourceDocLine InventoryPosting

Updates the value of attribute 'SourceDocLine' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (int) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/sourceDocLine

PUT Set SourceDocLineId InventoryPosting

Updates the value of attribute 'SourceDocLineId' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (Guid) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/sourceDocLineId

PUT Set SourceSchemaEntity InventoryPosting

Updates the value of attribute 'SourceSchemaEntity' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/sourceSchemaEntity

PUT Set StockBalance InventoryPosting

Updates the value of attribute 'StockBalance' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/stockBalance

PUT Set SystemDate InventoryPosting

Updates the value of attribute 'SystemDate' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (DateTime) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/systemDate

PUT Set UnitCost InventoryPosting

Updates the value of attribute 'UnitCost' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/unitCost

PUT Set UnitPrice InventoryPosting

Updates the value of attribute 'UnitPrice' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (decimal) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/unitPrice

PUT Set Warehouse InventoryPosting

Updates the value of attribute 'Warehouse' in the specified entity record.

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
companyKey (string) The company key.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/warehouse

PUT Set Custom Attribute InventoryPosting

Updates the value of 'CustomAttribute' in the specified entity record.

The following elements are required:

companyKey (string) The company key.
postingKey (Guid) The Id of the inventory posting.
customAttributeName (string) The custom attribute name.
value (ExtensibilityCustomAttributeValueResource) The request body should contain the new value for the custom attribute.
See ExtensibilityCustomAttributeValueResource.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /inventoryCore/inventoryPostings/{companyKey}/{postingKey}/{customAttributeName}

DELETE Operations

DELETE InventoryPosting by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /inventoryCore/inventoryPostings/{id}

DELETE InventoryPosting by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
postingKey (Guid) The Id of the inventory posting.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /inventoryCore/inventoryPostings/{companyKey}/{postingKey}

Resources


ApiInventoryPostingResource

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
reversal (bool) Internal flag that indicates that the posting is a reveresal of a previous posting.
documentDate (DateTime) The date of the document.
postingDate (DateTime) The posting date of the document.
systemDate (DateTime) The system date of the posting.
unitPrice (MoneyResource) The price per base unit of the posting.
See MoneyResource .
inventoryAmount (MoneyResource) The value or amount of the posting.
See MoneyResource .
priceDifference (MoneyResource) The value or amount of the original posting that cannot be assigned in the inventory balance because the stock does not exist any more.
See MoneyResource .
inventoryBalance (MoneyResource) The current value in stock.
See MoneyResource .
unitCost (MoneyResource) The unit cost that will affect inventory balance.
See MoneyResource .
calculatedUnitCost (MoneyResource) The calculated unit cost based on the inventory balacnce and current stock level.
See MoneyResource .
sourceSchemaEntity (string) The original schema entity of the posting.
company (string) The company of the tranaction.
currency (string) The currency of the posting.
warehouse (string) The warehouse that is affected by the posting.
inventoryPart (string) The inventory part affected by the posting.
inValue (bool) Internal flag that indicates if the posting only affects stock in value.
journalNumber (int) The journal number assigned to the source doc.
baseUnit (string) The base unit of the part.

The following elements are optional:

quantity (decimal) The quantity that is posted to stock.
referenceQuantity (decimal) The affected stock for postings in value only.
stockBalance (decimal) The current quantity in stock.
sourceDoc (string) The original document.
sourceDocId (Guid) The original document ID.
sourceDocLine (int) The source doc line number.
sourceDocLineId (Guid) The source doc line identification.
dimensionSet (string) The dimension set of the inventory part.
basePartId (Guid) The base part identifier.


InventoryPostingResource

The following elements are required:

postingKey (Guid) The Id of the inventory posting.
reversal (bool) Internal flag that indicates that the posting is a reveresal of a previous posting.
documentDate (DateTime) The date of the document.
postingDate (DateTime) The posting date of the document.
systemDate (DateTime) The system date of the posting.
unitPrice (MoneyResource) The price per base unit of the posting.
See MoneyResource .
inventoryAmount (MoneyResource) The value or amount of the posting.
See MoneyResource .
priceDifference (MoneyResource) The value or amount of the original posting that cannot be assigned in the inventory balance because the stock does not exist any more.
See MoneyResource .
inventoryBalance (MoneyResource) The current value in stock.
See MoneyResource .
unitCost (MoneyResource) The unit cost that will affect inventory balance.
See MoneyResource .
calculatedUnitCost (MoneyResource) The calculated unit cost based on the inventory balacnce and current stock level.
See MoneyResource .
sourceSchemaEntity (string) The original schema entity of the posting.
(fk) Allowed value: the natural key of a record of type SchemaEntity. These records are accessibly through the SchemaEntities service.
company (string) The company of the tranaction.
(fk) Allowed value: the natural key of a record of type Company. These records are accessibly through the Companies service.
currency (string) The currency of the posting.
(fk) Allowed value: the natural key of a record of type Currency. These records are accessibly through the Currencies service.
warehouse (string) The warehouse that is affected by the posting.
(fk) Allowed value: the natural key of a record of type Warehouse. These records are accessibly through the Warehouses service.
inventoryPart (string) The inventory part affected by the posting.
(fk) Allowed value: the natural key of a record of type InventoryPart. These records are accessibly through the InventoryParts service.
inValue (bool) Internal flag that indicates if the posting only affects stock in value.
journalNumber (int) The journal number assigned to the source doc.
baseUnit (string) The base unit of the part.
(fk) Allowed value: the natural key of a record of type Unit. These records are accessibly through the Units service.
isEntry (bool) The flag is 1 when the posting references an inbound movement and is 0 when references an outbound movement.

The following elements are optional:

quantity (decimal) The quantity that is posted to stock.
referenceQuantity (decimal) The affected stock for postings in value only.
stockBalance (decimal) The current quantity in stock.
sourceDoc (string) The original document.
sourceDocId (Guid) The original document ID.
sourceDocLine (int) The source doc line number.
sourceDocLineId (Guid) The source doc line identification.
dimensionSet (string) The dimension set of the inventory part.
(fk) Allowed value: the natural key of a record of type DimensionSet. These records are accessibly through the DimensionSets service.
basePartId (Guid) The base part identifier.


MoneyResource

The following elements are required:

amount (decimal) The amount.

The following elements are optional:

baseAmount (decimal) The base amount.
reportingAmount (decimal) The reporting amount.
fractionDigits (int) The fraction digits.
symbol (string) The symbol.

Notes: For the POST operation it is not necessary to send the fields: BaseAmount, ReportingAmount, FractionDigits and Symbol. Will be ignored.



ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.