Purchases | Purchase Item
Service to manage entities of type 'PurchaseItem'.
This service extends Items.
Overview
URL | api/{tenantKey}/{orgKey}/purchasesCore/purchasesItems |
Methods Supported | GET, POST, PUT, DELETE |
All Operations
This service includes the following operations:
- GET:
- POST:
-
PUT:
- PUT Set IsActive PurchasesItem
- PUT Set Unit PurchasesItem
- PUT Set LastSupplierParty PurchasesItem
- PUT Set LastPrice PurchasesItem
- PUT Set LastSourceDoc PurchasesItem
- PUT Set LastSourceDocDate PurchasesItem
- PUT Set LastUnit PurchasesItem
- PUT Set Currency PurchasesItem
- PUT Set ItemTaxSchema PurchasesItem
- PUT Set ItemWithholdingTaxSchema PurchasesItem
- PUT Set ExpenseAccount PurchasesItem
- DELETE:
All Resources
This service uses the following resources:
- ApiBasePurchasesItemResource
- ApiPurchasesItemResource
- BasePurchasesItemResource
- MoneyResource
- PurchasesItemResource
All Enumerations
This service uses the following enumerations:
GET PurchasesItems (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 PurchasesItemResource. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
GET PurchasesItem 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 PurchasesItemResource. |
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 PurchasesItem by key
Returns the entity record that matches the specified key.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
Response:
When successful, the response body contains the entity record. See PurchasesItemResource. |
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 PurchasesItems (with Item)
Returns the list of all the entity records available. Each record contains both data from the entity and the base entity.
Response:
When successful, the response body contains the list of records available. See BasePurchasesItemResource. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
GET PurchasesItems (with Item) (paged)
Returns a page of the list of all the entity records available. Each record contains both data from the entity and the base entity.
The following elements are optional:
page | (int) The index of the page of the list that should be returned. This is a query string parameter. |
pageSize | (int) The number of page elements that should be returned (max. is 1000). This is a query string parameter. |
Response:
When successful, the response body contains the list of records available. See BasePurchasesItemResource. |
Response status codes:
200 | OK. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
GET PurchasesItem (with Item) by identifier
Returns the entity record that matches the specified identifier. The record contains both data from the entity and the base entity.
The following elements are required:
id | (string) The record identifier. |
Response:
When successful, the response body contains the entity record. See BasePurchasesItemResource. |
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 PurchasesItem (with Item) by key
Returns the entity record that matches the specified key. The record contains both data from the entity and the base entity.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
Response:
When successful, the response body contains the entity record. See BasePurchasesItemResource. |
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:
POST PurchasesItems
Creates a new entity record.
The following elements are required:
purchasesItemResource | (ApiPurchasesItemResource) The request body should contain the entity record that should be created. See ApiPurchasesItemResource. |
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 ApiPurchasesItemResource. |
Response status codes:
201 | Created. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
POST PurchasesItems (with ApiBasePurchasesItem)
Creates a new entity record. The record shoud contain both data from the entity and the base entity.
The following elements are required:
purchasesItemResource | (ApiPurchasesItemResource) The request body should contain the entity record that should be created. See ApiPurchasesItemResource. |
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 ApiBasePurchasesItemResource. |
Response status codes:
201 | Created. The operation was completed successfully. |
400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set Currency PurchasesItem
Updates the value of attribute 'Currency' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set ExpenseAccount PurchasesItem
Updates the value of attribute 'ExpenseAccount' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set IsActive PurchasesItem
Updates the value of attribute 'IsActive' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set ItemTaxSchema PurchasesItem
Updates the value of attribute 'ItemTaxSchema' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set ItemWithholdingTaxSchema PurchasesItem
Updates the value of attribute 'ItemWithholdingTaxSchema' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set LastPrice PurchasesItem
Updates the value of attribute 'LastPrice' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set LastSourceDoc PurchasesItem
Updates the value of attribute 'LastSourceDoc' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set LastSourceDocDate PurchasesItem
Updates the value of attribute 'LastSourceDocDate' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set LastSupplierParty PurchasesItem
Updates the value of attribute 'LastSupplierParty' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set LastUnit PurchasesItem
Updates the value of attribute 'LastUnit' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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 Set Unit PurchasesItem
Updates the value of attribute 'Unit' in the specified entity record.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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:
DELETE PurchasesItem 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 PurchasesItem by key
Deletes the entity record that matches the specified key.
The following elements are required:
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
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:
Resources
ApiBasePurchasesItemResource
The following elements are required:
unit | (string) The unit for the purchases item. |
lastPrice | (MoneyResource) The last price for the item.
See MoneyResource . |
currency | (string) The money unit used by the system, such as Euros (EUR) or United States Dollars (USD). This value is important for currency exchanges or to set the number of decimal places used to represent values. |
itemTaxSchema | (string) The purchases item tax schema. The tax schema identifies the group of taxes a item is liable for. |
expenseAccount | (string) The expense account for the item. |
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
description | (string) The description for the item. |
isExternallyManaged | (bool) A flag indicating if the item is externally managed. |
baseUnit | (string) The base unit for the item. |
itemType | (enum ItemType) The item type for the item.
See ItemType. |
manageInventory | (bool) Manage Inventory. |
availableInSales | (bool) Available for Sales. |
availableInPurchases | (bool) Available for Purchases. |
The following elements are optional:
lastSupplierParty | (string) The last supplier for the item. |
lastSourceDoc | (string) The last document for the item. |
lastSourceDocDate | (DateTime) The last document date for the item. |
lastUnit | (string) The last unit for the item. |
itemWithholdingTaxSchema | (string) The item withholding tax schema. The withholding tax schema identifies the group of withholding taxes a item is liable for. |
complementaryDescription | (string) The extended description for the item. |
assortment | (string) The assortment for the item. |
barcode | (string) The barcode for the item. |
brand | (string) The brand for the item. |
image | (string) The picture for the item. |
remarks | (string) The remarks for the item. |
externalId | (string) The external identifier for the item. |
externalVersion | (string) The external version for the item. |
brandModel | (string) The brand model for the item. |
ApiPurchasesItemResource
The following elements are required:
unit | (string) The unit for the purchases item. |
lastPrice | (MoneyResource) The last price for the item.
See MoneyResource . |
currency | (string) The money unit used by the system, such as Euros (EUR) or United States Dollars (USD). This value is important for currency exchanges or to set the number of decimal places used to represent values. |
itemTaxSchema | (string) The purchases item tax schema. The tax schema identifies the group of taxes a item is liable for. |
expenseAccount | (string) The expense account for the item. |
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
The following elements are optional:
lastSupplierParty | (string) The last supplier for the item. |
lastSourceDoc | (string) The last document for the item. |
lastSourceDocDate | (DateTime) The last document date for the item. |
lastUnit | (string) The last unit for the item. |
itemWithholdingTaxSchema | (string) The item withholding tax schema. The withholding tax schema identifies the group of withholding taxes a item is liable for. |
BasePurchasesItemResource
The following elements are required:
unit | (string) The unit for the purchases item. |
lastPrice | (MoneyResource) The last price for the item.
See MoneyResource . |
currency | (string) The money unit used by the system, such as Euros (EUR) or United States Dollars (USD). This value is important for currency exchanges or to set the number of decimal places used to represent values. |
itemTaxSchema | (string) The purchases item tax schema. The tax schema identifies the group of taxes a item is liable for. |
expenseAccount | (string) The expense account for the item. |
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
description | (string) The description for the item. |
isExternallyManaged | (bool) A flag indicating if the item is externally managed. |
baseUnit | (string) The base unit for the item. |
itemType | (enum ItemType) The item type for the item.
See ItemType. |
manageInventory | (bool) Manage Inventory. |
availableInSales | (bool) Available for Sales. |
availableInPurchases | (bool) Available for Purchases. |
The following elements are optional:
lastSupplierParty | (string) The last supplier for the item. |
lastSourceDoc | (string) The last document for the item. |
lastSourceDocDate | (DateTime) The last document date for the item. |
lastUnit | (string) The last unit for the item. |
itemWithholdingTaxSchema | (string) The item withholding tax schema. The withholding tax schema identifies the group of withholding taxes a item is liable for. |
complementaryDescription | (string) The extended description for the item. |
assortment | (string) The assortment for the item. |
barcode | (string) The barcode for the item. |
brand | (string) The brand for the item. |
image | (string) The picture for the item. |
remarks | (string) The remarks for the item. |
externalId | (string) The external identifier for the item. |
externalVersion | (string) The external version for the item. |
brandModel | (string) The brand model for the item. |
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.
PurchasesItemResource
The following elements are required:
unit | (string) The unit for the purchases item.
(fk) Allowed value: the natural key of a record of type Unit. These records are accessibly through the Units service. |
lastPrice | (MoneyResource) The last price for the item.
See MoneyResource . |
currency | (string) The money unit used by the system, such as Euros (EUR) or United States Dollars (USD). This value is important for currency exchanges or to set the number of decimal places used to represent values.
(fk) Allowed value: the natural key of a record of type Currency. These records are accessibly through the Currencies service. |
itemTaxSchema | (string) The purchases item tax schema. The tax schema identifies the group of taxes a item is liable for.
(fk) Allowed value: the natural key of a record of type ItemTaxSchema. These records are accessibly through the ItemTaxSchemas service. |
expenseAccount | (string) The expense account for the item.
(fk) Allowed value: the natural key of a record of type Account. These records are accessibly through the Accounts service. |
itemKey | (string) The key for the item. Uniquely identifies the item within the organization. |
The following elements are optional:
lastSupplierParty | (string) The last supplier for the item.
(fk) Allowed value: the natural key of a record of type Party. These records are accessibly through the Parties service. |
lastSourceDoc | (string) The last document for the item. |
lastSourceDocDate | (DateTime) The last document date for the item. |
lastUnit | (string) The last unit for the item.
(fk) Allowed value: the natural key of a record of type Unit. These records are accessibly through the Units service. |
itemWithholdingTaxSchema | (string) The item withholding tax schema. The withholding tax schema identifies the group of withholding taxes a item is liable for.
(fk) Allowed value: the natural key of a record of type ItemWithholdingTaxSchema. These records are accessibly through the ItemWithholdingTaxSchemas service. |