ROSE Developers - Web API Reference

Taxes | Inventory Declaration

The Inventory Declarations end point is used to manage inventory statement. Mandatory for Portugueses companies.

Overview


URL api/{tenantKey}/{orgKey}/taxes/inventoryDeclarations
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 InventoryDeclarations

Returns the list of all the entity records available.

Response:

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

Response status codes:

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

Resource URL:

GET /taxes/inventoryDeclarations

GET InventoryDeclarations (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 InventoryDeclarationResource.

Response status codes:

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

Resource URL:

GET /taxes/inventoryDeclarations?page={page}&pageSize={pageSize}

GET InventoryDeclaration 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 InventoryDeclarationResource.

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 /taxes/inventoryDeclarations/{id}

GET InventoryDeclaration by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
documentKey (string) The document key of Inventory Declaration.

Response:

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

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}

GET Print InventoryDeclaration by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /taxes/inventoryDeclarations/{id}/print?template={template}

GET Print InventoryDeclaration by key

Prints the specified entity record.

The following elements are required:

companyKey (string) The company key.
documentKey (string) The document key of Inventory Declaration.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/print

GET Original Print InventoryDeclarationOriginal by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /taxes/inventoryDeclarations/{id}/printOriginal?template={template}

GET Original Print InventoryDeclaration by key

Prints the specified entity record.

The following elements are required:

companyKey (string) The company key.
documentKey (string) The document key of Inventory Declaration.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/printOriginal

POST Operations

POST InventoryDeclarations

Creates a new entity record.

The following elements are required:

inventoryDeclarationResource (ApiInventoryDeclarationResource) The request body should contain the entity record that should be created.
See ApiInventoryDeclarationResource.

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

Response status codes:

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

Resource URL:

POST /taxes/inventoryDeclarations

POST Inventory Statement

Inserts a new 'Inventory Statement Item' in the 'Inventory Statement'.

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
companyKey (string) The company key.
value (ApiInventoryDeclarationItemsResource) The ApiInventoryDeclarationItemsResource instance.
See ApiInventoryDeclarationItemsResource.

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items

PUT Operations

PUT Set CanExport InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/canExport

PUT Set ClosingStockQuantity InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/closingStockQuantity

PUT Set Company InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/company

PUT Set InventoryDeclarationVersion InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
companyKey (string) The company key.
value (enum InventoryFileVersion) The request body should contain the new value for the attribute.
See InventoryFileVersion.

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/inventoryDeclarationVersion

PUT Set IsActive InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/isActive

PUT Set Item InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/item

PUT Set Note InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/note

PUT Set NumberOfItems InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/numberOfItems

PUT Set ProductCategory InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/productCategory

PUT Set ProductCode InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/productCode

PUT Set ProductDescription InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/productDescription

PUT Set ProductNumberCode InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/productNumberCode

PUT Set Remarks InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/remarks

PUT Set Status InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
companyKey (string) The company key.
value (enum InventoryDeclarationState) The request body should contain the new value for the attribute.
See InventoryDeclarationState.

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/status

PUT Set UnitOfMeasure InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/unitOfMeasure

PUT Set Warehouse InventoryDeclarationItem

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
lineId (string) The detail identifier.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}/warehouse

PUT Set XmlDocument InventoryDeclaration

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

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/xmlDocument

DELETE Operations

DELETE Inventory Statement Item by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
companyKey (string) The company key.
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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}/items/{lineId}

DELETE InventoryDeclaration 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 /taxes/inventoryDeclarations/{id}

DELETE InventoryDeclaration by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
documentKey (string) The document key of Inventory Declaration.

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 /taxes/inventoryDeclarations/{companyKey}/{documentKey}

Resources


ApiInventoryDeclarationItemsResource

The following elements are required:

item (string) The item for the Inventory declaration.
unitOfMeasure (string) The Unit of the item in the declaration.
warehouse (string) The warehouse where the item is stored.

The following elements are optional:

productCategory (string) Category of the product.
productCode (string) Code of the product.
productDescription (string) Description of the product.
productNumberCode (string) Number code of the product.
closingStockQuantity (decimal) Quantity remaining when the inventory declaration is emited.


ApiInventoryDeclarationResource

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
fiscalYear (int) The fiscal year of the inventory statement.
documentDate (DateTime) The document's date.
inventoryDate (DateTime) The date that determines the inventory statements closing date.
company (string) The company.
canExport (bool) Flag if true the xml document can be exported.

The following elements are optional:

items (List of ApiInventoryDeclarationItemsResource) The inventory statement's items.
See ApiInventoryDeclarationItemsResource.
remarks (string) A place to store related information.
numberOfItems (int) The number of items included at the corresponding date.
xmlDocument (string) The xml document name.
note (string) The declaration's note.
inventoryDeclarationVersion (enum InventoryFileVersion) Indicates the version used in the inventory statement.
See InventoryFileVersion.
status (enum InventoryDeclarationState) The status of the inventory declaration.
See InventoryDeclarationState.


InventoryDeclarationItemResource

The following elements are required:

item (string) The item for the Inventory declaration.
unitOfMeasure (string) The Unit of the item in the declaration.
warehouse (string) The warehouse where the item is stored.

The following elements are optional:

productCategory (string) Category of the product.
productCode (string) Code of the product.
productDescription (string) Description of the product.
productNumberCode (string) Number code of the product.
closingStockQuantity (decimal) Quantity remaining when the inventory declaration is emited.


InventoryDeclarationResource

The following elements are required:

documentKey (string) The document key of Inventory Declaration.
fiscalYear (int) The fiscal year of the inventory statement.
documentDate (DateTime) The document's date.
inventoryDate (DateTime) The date that determines the inventory statements closing date.
company (string) The company.
(fk) Allowed value: the natural key of a record of type Company. These records are accessibly through the Companies service.
canExport (bool) Flag if true the xml document can be exported.

The following elements are optional:

items (List of InventoryDeclarationItemResource) The inventory statement's items.
See InventoryDeclarationItemResource.
remarks (string) A place to store related information.
isPrinted (bool) Read-only.
numberOfItems (int) The number of items included at the corresponding date.
xmlDocument (string) The xml document name.
note (string) The declaration's note.
lastInventoryDate (DateTime) Date of the last inventory.
inventoryDeclarationVersion (enum InventoryFileVersion) Indicates the version used in the inventory statement.
See InventoryFileVersion.
status (enum InventoryDeclarationState) The status of the inventory declaration.
See InventoryDeclarationState.


Enumerations


InventoryDeclarationState

1 Pending
2 Processing
3 Succeeded
4 Failed


InventoryFileVersion

1 Version10200
2 Version20100