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:
-
GET:
- GET InventoryDeclarations
- GET InventoryDeclarations (paged)
- GET InventoryDeclaration by identifier
- GET InventoryDeclaration by key
- GET Print InventoryDeclaration by identifier
- GET Print InventoryDeclaration by key
- GET Original Print InventoryDeclarationOriginal by identifier
- GET Original Print InventoryDeclaration by key
- POST:
-
PUT:
- PUT Set IsActive InventoryDeclaration
- PUT Set Remarks InventoryDeclaration
- PUT Set NumberOfItems InventoryDeclaration
- PUT Set Company InventoryDeclaration
- PUT Set XmlDocument InventoryDeclaration
- PUT Set Note InventoryDeclaration
- PUT Set CanExport InventoryDeclaration
- PUT Set InventoryDeclarationVersion InventoryDeclaration
- PUT Set Status InventoryDeclaration
- PUT Set ProductCategory InventoryDeclarationItem
- PUT Set ProductCode InventoryDeclarationItem
- PUT Set ProductDescription InventoryDeclarationItem
- PUT Set ProductNumberCode InventoryDeclarationItem
- PUT Set ClosingStockQuantity InventoryDeclarationItem
- PUT Set Item InventoryDeclarationItem
- PUT Set UnitOfMeasure InventoryDeclarationItem
- PUT Set Warehouse InventoryDeclarationItem
- DELETE:
All Resources
This service uses the following resources:
- ApiInventoryDeclarationItemsResource
- ApiInventoryDeclarationResource
- InventoryDeclarationItemResource
- InventoryDeclarationResource
All Enumerations
This service uses the following enumerations:
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 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 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 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 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 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 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 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:
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 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:
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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:
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 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 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:
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. |