ROSE Developers - Web API Reference

Purchases | Purchase Item

The Purchase Item represents a product or a service offered by another company or an individual.

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:

All Resources

This service uses the following resources:

All Enumerations

This service uses the following enumerations:

GET Operations

GET PurchasesItems

Returns the list of all the entity records available.

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 /purchasesCore/purchasesItems/extension

GET PurchasesItems (paged)

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

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 PurchasesItemResource.

Response status codes:

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

Resource URL:

GET /purchasesCore/purchasesItems/extension?page={page}&pageSize={pageSize}

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 /purchasesCore/purchasesItems/{id}/extension

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 /purchasesCore/purchasesItems/{itemKey}/extension

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 /purchasesCore/purchasesItems

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 /purchasesCore/purchasesItems?page={page}&pageSize={pageSize}

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 /purchasesCore/purchasesItems/{id}

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:

GET /purchasesCore/purchasesItems/{itemKey}

POST Operations

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.

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 ApiPurchasesItemResource.

Response status codes:

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

Resource URL:

POST /purchasesCore/purchasesItems/extension

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.

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 ApiBasePurchasesItemResource.

Response status codes:

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

Resource URL:

POST /purchasesCore/purchasesItems

POST Purchases Item

Inserts a new 'Purchases Item Dimension' in the 'Purchases Item'.

The following elements are required:

itemKey (string) The key for the item. Uniquely identifies the item within the organization.
value (ApiPurchasesItemEntityDimensionDetailsResource) The ApiPurchasesItemEntityDimensionDetailsResource instance.
See ApiPurchasesItemEntityDimensionDetailsResource.

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 is empty.

Response status codes:

204 NoContent. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /purchasesCore/purchasesItems/{itemKey}/entityDimensionDetails

PUT Operations

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 /purchasesCore/purchasesItems/{itemKey}/currency

PUT Set DimensionValue PurchasesItemDimension

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

The following elements are required:

itemKey (string) The key for the item. Uniquely identifies the item within the organization.
lineId (string) The detail identifier.
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 /purchasesCore/purchasesItems/{itemKey}/entityDimensionDetails/{lineId}/dimensionValue

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 /purchasesCore/purchasesItems/{itemKey}/isActive

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 /purchasesCore/purchasesItems/{itemKey}/itemTaxSchema

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 /purchasesCore/purchasesItems/{itemKey}/itemWithholdingTaxSchema

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 /purchasesCore/purchasesItems/{itemKey}/lastPrice

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 /purchasesCore/purchasesItems/{itemKey}/lastSourceDoc

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 /purchasesCore/purchasesItems/{itemKey}/lastSourceDocDate

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 /purchasesCore/purchasesItems/{itemKey}/lastSupplierParty

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 /purchasesCore/purchasesItems/{itemKey}/lastUnit

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:

PUT /purchasesCore/purchasesItems/{itemKey}/unit

PUT Set Custom Attribute PurchasesItem

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

The following elements are required:

itemKey (string) The key for the item. Uniquely identifies the item within the organization.
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 /purchasesCore/purchasesItems/{itemKey}/{customAttributeName}

DELETE Operations

DELETE Purchases Item Dimension by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

itemKey (string) The key for the item. Uniquely identifies the item within the organization.
lineId (string) The line identifier.

Response:

When successful, the response body is empty.

Response status codes:

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

Resource URL:

DELETE /purchasesCore/purchasesItems/{itemKey}/entityDimensionDetails/{lineId}

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 /purchasesCore/purchasesItems/{id}

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:

DELETE /purchasesCore/purchasesItems/{itemKey}

Resources


ApiBasePurchasesItemEntityDimensionDetailsResource

The following elements are required:

dimension (string) The dimension.
dimensionValue (string) The dimension value.


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.
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.
itemAccountType (string) The item type for accounting purposes.
itemSet (string) The item set is used to associate the item to a set of items.

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.
entityDimensionDetails (List of ApiBasePurchasesItemEntityDimensionDetailsResource) The list of dimensions.
See ApiBasePurchasesItemEntityDimensionDetailsResource.
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.


ApiPurchasesItemEntityDimensionDetailsResource

The following elements are required:

dimension (string) The dimension.
dimensionValue (string) The dimension value.


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.
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.
entityDimensionDetails (List of ApiPurchasesItemEntityDimensionDetailsResource) The list of dimensions.
See ApiPurchasesItemEntityDimensionDetailsResource.


BasePurchasesItemEntityDimensionDetailsResource

The following elements are required:

dimension (string) The dimension.
dimensionValue (string) The dimension value.


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.
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.
itemAccountType (string) The item type for accounting purposes.
itemSet (string) The item set is used to associate the item to a set of items.

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.
entityDimensionDetails (List of BasePurchasesItemEntityDimensionDetailsResource) The list of dimensions.
See BasePurchasesItemEntityDimensionDetailsResource.
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.



PurchasesItemDimensionResource

The following elements are required:

dimension (string) The dimension.
dimensionValue (string) The dimension value.


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.
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.
entityDimensionDetails (List of PurchasesItemDimensionResource) The list of dimensions.
See PurchasesItemDimensionResource.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


ItemType

1 Item
2 Service