ROSE Developers - Web API Reference

GET Operations

GET SalesSAFTImports

Returns the list of all the entity records available.

Response:

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

Response status codes:

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

Resource URL:

GET /taxAuthorityPT/salesSAFTImports

GET SalesSAFTImports (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 SalesSAFTImportResource.

Response status codes:

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

Resource URL:

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

GET SalesSAFTImport 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 SalesSAFTImportResource.

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

GET SalesSAFTImport by key

Returns the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
salesSAFTImportKey (int) Number.

Response:

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

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/salesSAFTImports/{companyKey}/{salesSAFTImportKey}

GET Print SalesSAFTImport 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/salesSAFTImports/{id}/print?template={template}

GET Print SalesSAFTImport by key

Prints the specified entity record.

The following elements are required:

companyKey (string) The company key.
salesSAFTImportKey (int) Number.

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/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/print

GET Original Print SalesSAFTImportOriginal 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/salesSAFTImports/{id}/printOriginal?template={template}

GET Original Print SalesSAFTImport by key

Prints the specified entity record.

The following elements are required:

companyKey (string) The company key.
salesSAFTImportKey (int) Number.

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/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/printOriginal

POST Operations

POST SalesSAFTImports

Creates a new entity record.

The following elements are required:

salesSAFTImportResource (ApiSalesSAFTImportResource) The request body should contain the entity record that should be created.
See ApiSalesSAFTImportResource.

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

Response status codes:

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

Resource URL:

POST /taxAuthorityPT/salesSAFTImports

POST Verify Customers

Custom operation 'VerifyCustomers'.

The following elements are required:

customers (List) Customers.

Response:

When successful, the response body contains a list of resources of type 'VerifyCustomerResult'. See VerifyCustomerResult.

Resource URL:

POST /taxAuthorityPT/salesSAFTImports/verifyCustomers

POST Process Sales SAFT Import Status

Custom operation 'ProcessSalesSAFTImportStatus'.

The following elements are required:

result (SalesSaftImportResult) Result.

Response:

When successful, the response body is empty.

Resource URL:

POST /taxAuthorityPT/salesSAFTImports/processSalesSAFTImportStatus

POST Verify Journal Entries

Custom operation 'VerifyJournalEntries'.

The following elements are required:

documents (List) Documents.

Response:

When successful, the response body contains a list of resources of type 'VerifyDocumentResult'. See VerifyDocumentResult.

Resource URL:

POST /taxAuthorityPT/salesSAFTImports/verifyJournalEntries

PUT Operations

PUT Set Company SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/company

PUT Set EndDate SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
companyKey (string) The company key.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/endDate

PUT Set Filename SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/filename

PUT Set ImportedCustomers SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/importedCustomers

PUT Set ImportedDocuments SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/importedDocuments

PUT Set IsActive SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/isActive

PUT Set SalesSAFTImportStatus SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
companyKey (string) The company key.
value (enum SalesSAFTImportStatus) The request body should contain the new value for the attribute.
See SalesSAFTImportStatus.

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/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/salesSAFTImportStatus

PUT Set StartDate SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
companyKey (string) The company key.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/startDate

PUT Set TotalCustomers SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/totalCustomers

PUT Set TotalDocuments SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
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 /taxAuthorityPT/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/totalDocuments

PUT Set UserId SalesSAFTImport

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

The following elements are required:

salesSAFTImportKey (int) Number.
companyKey (string) The company key.
value (Guid) 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/salesSAFTImports/{companyKey}/{salesSAFTImportKey}/userId

DELETE Operations

DELETE SalesSAFTImport 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/salesSAFTImports/{id}

DELETE SalesSAFTImport by key

Deletes the entity record that matches the specified key.

The following elements are required:

companyKey (string) The company key.
salesSAFTImportKey (int) Number.

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/salesSAFTImports/{companyKey}/{salesSAFTImportKey}

Resources


ApiSalesSAFTImportResource

The following elements are required:

company (string) Company.

The following elements are optional:

filename (string) Filename.
totalDocuments (int) Total Documents.
totalCustomers (int) Total Customers.
importedDocuments (int) Imported Documents.
importedCustomers (int) Imported Customers.
startDate (DateTime) Start Date.
endDate (DateTime) End Date.
userId (Guid) User Id.
salesSAFTImportStatus (enum SalesSAFTImportStatus) Status.
See SalesSAFTImportStatus.


SalesSAFTImportResource

The following elements are required:

salesSAFTImportKey (int) Number.
company (string) Company.
(fk) Allowed value: the natural key of a record of type Company. These records are accessibly through the Companies service.

The following elements are optional:

filename (string) Filename.
totalDocuments (int) Total Documents.
totalCustomers (int) Total Customers.
importedDocuments (int) Imported Documents.
importedCustomers (int) Imported Customers.
startDate (DateTime) Start Date.
endDate (DateTime) End Date.
userId (Guid) User Id.
salesSAFTImportStatus (enum SalesSAFTImportStatus) Status.
See SalesSAFTImportStatus.


StandardSalesSAFTImportResource

The following elements are required:

company (string) Company.
salesSAFTImportKey (int) Number.

The following elements are optional:

totalCustomers (int) Total Customers.
userId (Guid) User Id.
totalDocuments (int) Total Documents.
salesSAFTImportStatus (enum SalesSAFTImportStatus) Status.
See SalesSAFTImportStatus.
endDate (DateTime) End Date.
filename (string) Filename.
importedCustomers (int) Imported Customers.
importedDocuments (int) Imported Documents.
startDate (DateTime) Start Date.


VerifyCustomerResult

The following elements are optional:

customerId (string) Customer Id.
partyId (Guid) Party Id.
partyKey (string) Party Key.
customerPartyId (Guid) Customer Party Id.
isValidCustomerTaxId (bool) Is Valid Customer Tax Id.
country (string) Country.
customerGroup (string) Customer Group.
partyAccountType (string) Party Account Type.
partyTaxSchema (string) Party Tax Schema.
isOtherReceivable (bool) Is Other Receivable.
partyWithholdingTaxSchema (string) Party Withholding Tax Schema.


VerifyDocumentResult

The following elements are optional:

documentName (string) Document Name.
documentId (Guid) Document Id.
needToInsert (bool) Need To Insert.
needToDelete (bool) Need To Delete.
documentReference (string) Document Reference.


Enumerations


SalesSAFTImportStatus

1 VerifyingFile
2 InvalidFile
3 ProcessingFile
4 ProcessingError
5 NothingToImport
6 ReadyToAccount
7 Importing
8 ImportSucceeded
9 ImportPartiallySucceeded
10 ImportFailed
11 Reverting
12 ReversalSucceeded
13 ReversalPartiallySucceeded
14 ReversalFailed
15 Deleting
16 DeletionSucceeded
17 DeletionFailed