ROSE Developers - Web API Reference

Taxes | Tax Report Setup

The Tax Report Setup is used to manage new reports to send to a specificTax Authority, such as like DPIVA or DPIVA-AC( Portuguese Tax Authority (AT)).

Overview


URL api/{tenantKey}/{orgKey}/taxAuthorityPT/taxReportSetups
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 TaxReportSetups

Returns the list of all the entity records available.

Response:

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

Response status codes:

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

Resource URL:

GET /taxAuthorityPT/taxReportSetups

GET TaxReportSetups (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 TaxReportSetupResource.

Response status codes:

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

Resource URL:

GET /taxAuthorityPT/taxReportSetups?page={page}&pageSize={pageSize}

GET TaxReportSetup 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 TaxReportSetupResource.

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 /taxAuthorityPT/taxReportSetups/{id}

GET TaxReportSetup by key

Returns the entity record that matches the specified key.

The following elements are required:

taxReportSetupKey (string) The tax report key.

Response:

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

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}

GET Print TaxReportSetup 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 /taxAuthorityPT/taxReportSetups/{id}/print?template={template}

GET Print TaxReportSetup by key

Prints the specified entity record.

The following elements are required:

taxReportSetupKey (string) The tax report key.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/print

GET Original Print TaxReportSetupOriginal 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 /taxAuthorityPT/taxReportSetups/{id}/printOriginal?template={template}

GET Original Print TaxReportSetup by key

Prints the specified entity record.

The following elements are required:

taxReportSetupKey (string) The tax report key.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/printOriginal

POST Operations

POST TaxReportSetups

Creates a new entity record.

The following elements are required:

taxReportSetupResource (ApiTaxReportSetupResource) The request body should contain the entity record that should be created.
See ApiTaxReportSetupResource.

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

Response status codes:

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

Resource URL:

POST /taxAuthorityPT/taxReportSetups

POST Tax Report

Inserts a new 'Tax Report Field' in the 'Tax Report'.

The following elements are required:

taxReportSetupKey (string) The tax report key.
value (ApiTaxReportSetupTaxReportFieldsResource) The ApiTaxReportSetupTaxReportFieldsResource instance.
See ApiTaxReportSetupTaxReportFieldsResource.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields

PUT Operations

PUT Set Amount TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
lineId (string) The detail identifier.
value (enum TaxAmount) The request body should contain the new value for the attribute.
See TaxAmount.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/amount

PUT Set AutonomousTaxation TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/autonomousTaxation

PUT Set BalancePeriod TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
lineId (string) The detail identifier.
value (enum BalancePeriod) The request body should contain the new value for the attribute.
See BalancePeriod.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/balancePeriod

PUT Set CashFlowItem TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/cashFlowItem

PUT Set ChartOfAccount TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/chartOfAccount

PUT Set Description TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/description

PUT Set FiscalMemoReason TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/fiscalMemoReason

PUT Set GlAccount TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/glAccount

PUT Set InvertSign TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
lineId (string) The detail identifier.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/invertSign

PUT Set IsActive TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/isActive

PUT Set Note TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/note

PUT Set ReportField TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/reportField

PUT Set ReportFieldDescription TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/reportFieldDescription

PUT Set TaxClass TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxClass

PUT Set TaxRegionalArea TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxRegionalArea

PUT Set TaxReportFieldType TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
lineId (string) The detail identifier.
value (enum TaxReportFieldType) The request body should contain the new value for the attribute.
See TaxReportFieldType.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/taxReportFieldType

PUT Set TaxReportForm TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
value (enum TaxReportForm) The request body should contain the new value for the attribute.
See TaxReportForm.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportForm

PUT Set TaxReportSetupKey TaxReportSetup

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

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportSetupKey

PUT Set TaxType TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
lineId (string) The detail identifier.
value (enum TaxType) The request body should contain the new value for the attribute.
See TaxType.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/taxType

PUT Set TaxTypeCode TaxReportField

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

The following elements are required:

taxReportSetupKey (string) The tax report key.
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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}/taxTypeCode

DELETE Operations

DELETE Tax Report Field by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

taxReportSetupKey (string) The tax report 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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}/taxReportFields/{lineId}

DELETE TaxReportSetup 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 /taxAuthorityPT/taxReportSetups/{id}

DELETE TaxReportSetup by key

Deletes the entity record that matches the specified key.

The following elements are required:

taxReportSetupKey (string) The tax report key.

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 /taxAuthorityPT/taxReportSetups/{taxReportSetupKey}

Resources


ApiTaxReportSetupResource

The following elements are required:

taxReportSetupKey (string) The tax report key.

The following elements are optional:

description (string) The description of the report.
taxClass (string) The tax class used in the report(ex: IVA).
taxReportFields (List of ApiTaxReportSetupTaxReportFieldsResource) The fields of the tax report.
See ApiTaxReportSetupTaxReportFieldsResource.
chartOfAccount (string) Chat of Account(ex: SNC).
taxRegionalArea (string) The region where the tax is reported(ex:Madeira).
taxReportForm (enum TaxReportForm) The form where the report is reported.
See TaxReportForm.


ApiTaxReportSetupTaxReportFieldsResource

The following elements are required:

reportField (string) The report field.
reportFieldDescription (string) The report field description. Small description explaining what the tax is for.
taxReportFieldType (enum TaxReportFieldType) The type of report field.
See TaxReportFieldType.
invertSign (bool) If the sign of the amounts is inverted.

The following elements are optional:

taxTypeCode (string) The tax type.
amount (enum TaxAmount) The type of amount (base or tax) is used.
See TaxAmount.
fiscalMemoReason (string) Optional, use only if the amount is only to be added if the transaction was done under the fiscal memo reason.
glAccount (string) The GLAccount .
taxReportSummaries (List of ApiTaxReportSetupTaxReportFieldsTaxReportSummariesResource) The summaries of tax report.
See ApiTaxReportSetupTaxReportFieldsTaxReportSummariesResource.
taxType (enum TaxType) The type of tax.
See TaxType.
balancePeriod (enum BalancePeriod) The balance amount of the period.
See BalancePeriod.
autonomousTaxation (string) The Autonomous Taxation used for the portuguese tax declaration M22Q13.
cashFlowItem (string) The Cash Flow item used for the portuguese tax declaration IES.
note (string) Extended note when the report field is of type text.


ApiTaxReportSetupTaxReportFieldsTaxReportSummariesResource

The following elements are required:

reportField (string) The report field number that will be used in the summary.

The following elements are optional:

invertSign (bool) Invert Sign.


TaxReportFieldResource

The following elements are required:

reportField (string) The report field.
reportFieldDescription (string) The report field description. Small description explaining what the tax is for.
taxReportFieldType (enum TaxReportFieldType) The type of report field.
See TaxReportFieldType.
invertSign (bool) If the sign of the amounts is inverted.

The following elements are optional:

taxTypeCode (string) The tax type.
amount (enum TaxAmount) The type of amount (base or tax) is used.
See TaxAmount.
fiscalMemoReason (string) Optional, use only if the amount is only to be added if the transaction was done under the fiscal memo reason.
chartOfAccount (string) Chart of Account(ex: SNC).
glAccount (string) The GLAccount .
taxReportSummaries (List of TaxReportSummaryResource) The summaries of tax report.
See TaxReportSummaryResource.
taxType (enum TaxType) The type of tax.
See TaxType.
balancePeriod (enum BalancePeriod) The balance amount of the period.
See BalancePeriod.
autonomousTaxation (string) The Autonomous Taxation used for the portuguese tax declaration M22Q13.
cashFlowItem (string) The Cash Flow item used for the portuguese tax declaration IES.
note (string) Extended note when the report field is of type text.


TaxReportSetupResource

The following elements are required:

taxReportSetupKey (string) The tax report key.

The following elements are optional:

description (string) The description of the report.
taxClass (string) The tax class used in the report(ex: IVA).
(fk) Allowed value: the natural key of a record of type TaxClass. These records are accessibly through the TaxClasses service.
taxReportFields (List of TaxReportFieldResource) The fields of the tax report.
See TaxReportFieldResource.
chartOfAccount (string) Chat of Account(ex: SNC).
(fk) Allowed value: the natural key of a record of type ChartOfAccount. These records are accessibly through the ChartOfAccounts service.
taxRegionalArea (string) The region where the tax is reported(ex:Madeira).
(fk) Allowed value: the natural key of a record of type TaxRegionalArea. These records are accessibly through the TaxRegionalAreas service.
taxReportForm (enum TaxReportForm) The form where the report is reported.
See TaxReportForm.


TaxReportSummaryResource

The following elements are required:

reportField (string) The report field number that will be used in the summary.

The following elements are optional:

invertSign (bool) Invert Sign.


Enumerations


BalancePeriod

1 Current
2 YearToPrevious
3 YearToCurrent
4 Opening
5 FirstToPrevious
6 FirstToCurrent


TaxAmount

1 TaxableAmount
2 TaxAmount
3 Balance
4 Credit
5 Debit
6 CreditMovements
7 DebitMovements


TaxReportFieldType

1 Undefined
2 TaxBalance
3 GLAccountBalance
4 Summary
5 AutonomousTaxation
6 CashFlow
7 BalanceNotes


TaxReportForm

1 DPIVAMain
2 DPIVA40
3 DPIVA41
4 DPIVAA1
5 DPIVAA2
6 Model22
7 Model22AD
8 IESAA
9 IESAI
10 IESAL
11 SingleReport


TaxType

1 InputTax
2 OutputTax