Taxes | AT Communication Request
The Authority Communication Request endpoint is used to get information about the result of the communication with the Portuguese Tax Authority (AT).(RESERVED FOR INTERNAL USE.).
Overview
| URL | api/{tenantKey}/{orgKey}/taxesCore/authorityCommunicationRequests |
| Methods Supported | GET, POST, PUT, DELETE |
All Operations
This service includes the following operations:
-
GET:
- GET AuthorityCommunicationRequests
- GET AuthorityCommunicationRequests (paged)
- GET AuthorityCommunicationRequest by identifier
- GET AuthorityCommunicationRequest by key
- GET Print AuthorityCommunicationRequest by identifier
- GET Print AuthorityCommunicationRequest by key
- GET Original Print AuthorityCommunicationRequestOriginal by identifier
- GET Original Print AuthorityCommunicationRequest by key
- POST:
-
PUT:
- PUT Set Custom Attribute AuthorityCommunicationRequest
- PUT Set IsActive AuthorityCommunicationRequest
- PUT Set RequestKey AuthorityCommunicationRequest
- PUT Set SourceDocId AuthorityCommunicationRequest
- PUT Set SourceSchemaEntityId AuthorityCommunicationRequest
- PUT Set SourceDoc AuthorityCommunicationRequest
- PUT Set CommunicationAttempts AuthorityCommunicationRequest
- PUT Set RequestMessageXML AuthorityCommunicationRequest
- PUT Set ResponseCode AuthorityCommunicationRequest
- PUT Set ResponseDescription AuthorityCommunicationRequest
- PUT Set ResponseATDocCodeID AuthorityCommunicationRequest
- PUT Set ResponseDocumentNumber AuthorityCommunicationRequest
- PUT Set ErrorMessage AuthorityCommunicationRequest
- PUT Set ErrorDetails AuthorityCommunicationRequest
- PUT Set Company AuthorityCommunicationRequest
- PUT Set CommunicationStatus AuthorityCommunicationRequest
- PUT Set DeclarationType AuthorityCommunicationRequest
- PUT Set OperationType AuthorityCommunicationRequest
- DELETE:
All Resources
This service uses the following resources:
- ApiAuthorityCommunicationRequestResource
- AuthorityCommunicationRequestResource
- ExtensibilityCustomAttributeValueResource
All Enumerations
This service uses the following enumerations:
GET AuthorityCommunicationRequests
Returns the list of all the entity records available.
Response:
| When successful, the response body contains the list of records available. See AuthorityCommunicationRequestResource. |
Response status codes:
| 200 | OK. The operation was completed successfully. |
| 400 | BadRequest. The request parameters are invalid. |
Resource URL:
GET AuthorityCommunicationRequests (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 AuthorityCommunicationRequestResource. |
Response status codes:
| 200 | OK. The operation was completed successfully. |
| 400 | BadRequest. The request parameters are invalid. |
Resource URL:
GET AuthorityCommunicationRequest 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 AuthorityCommunicationRequestResource. |
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 AuthorityCommunicationRequest by key
Returns the entity record that matches the specified key.
The following elements are required:
| companyKey | (string) The company key. |
| requestKey | (int) The request's key. It is an auto number. |
Response:
| When successful, the response body contains the entity record. See AuthorityCommunicationRequestResource. |
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 AuthorityCommunicationRequest 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 AuthorityCommunicationRequest by key
Prints the specified entity record.
The following elements are required:
| companyKey | (string) The company key. |
| requestKey | (int) The request's key. It is an auto 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 Original Print AuthorityCommunicationRequestOriginal 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 AuthorityCommunicationRequest by key
Prints the specified entity record.
The following elements are required:
| companyKey | (string) The company key. |
| requestKey | (int) The request's key. It is an auto 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:
POST AuthorityCommunicationRequests
Creates a new entity record.
The following elements are required:
| authorityCommunicationRequestResource | (ApiAuthorityCommunicationRequestResource) The request body should contain the entity record that should be created. See ApiAuthorityCommunicationRequestResource. |
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 ApiAuthorityCommunicationRequestResource. |
Response status codes:
| 201 | Created. The operation was completed successfully. |
| 400 | BadRequest. The request parameters are invalid. |
Resource URL:
PUT Set CommunicationAttempts AuthorityCommunicationRequest
Updates the value of attribute 'CommunicationAttempts' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set CommunicationStatus AuthorityCommunicationRequest
Updates the value of attribute 'CommunicationStatus' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto number. |
| companyKey | (string) The company key. |
| value | (enum AuthorityCommunicationState) The request body should contain the new value for the attribute. See AuthorityCommunicationState. |
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 AuthorityCommunicationRequest
Updates the value of attribute 'Company' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set DeclarationType AuthorityCommunicationRequest
Updates the value of attribute 'DeclarationType' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto number. |
| companyKey | (string) The company key. |
| value | (enum AuthorityDeclarationType) The request body should contain the new value for the attribute. See AuthorityDeclarationType. |
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 ErrorDetails AuthorityCommunicationRequest
Updates the value of attribute 'ErrorDetails' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set ErrorMessage AuthorityCommunicationRequest
Updates the value of attribute 'ErrorMessage' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set IsActive AuthorityCommunicationRequest
Updates the value of attribute 'IsActive' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set OperationType AuthorityCommunicationRequest
Updates the value of attribute 'OperationType' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto number. |
| companyKey | (string) The company key. |
| value | (enum AuthorityOperationType) The request body should contain the new value for the attribute. See AuthorityOperationType. |
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 RequestKey AuthorityCommunicationRequest
Updates the value of attribute 'RequestKey' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set RequestMessageXML AuthorityCommunicationRequest
Updates the value of attribute 'RequestMessageXML' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set ResponseATDocCodeID AuthorityCommunicationRequest
Updates the value of attribute 'ResponseATDocCodeID' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set ResponseCode AuthorityCommunicationRequest
Updates the value of attribute 'ResponseCode' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set ResponseDescription AuthorityCommunicationRequest
Updates the value of attribute 'ResponseDescription' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set ResponseDocumentNumber AuthorityCommunicationRequest
Updates the value of attribute 'ResponseDocumentNumber' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set SourceDoc AuthorityCommunicationRequest
Updates the value of attribute 'SourceDoc' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set SourceDocId AuthorityCommunicationRequest
Updates the value of attribute 'SourceDocId' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set SourceSchemaEntityId AuthorityCommunicationRequest
Updates the value of attribute 'SourceSchemaEntityId' in the specified entity record.
The following elements are required:
| requestKey | (int) The request's key. It is an auto 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 Set Custom Attribute AuthorityCommunicationRequest
Updates the value of 'CustomAttribute' in the specified entity record.
The following elements are required:
| companyKey | (string) The company key. |
| requestKey | (int) The request's key. It is an auto number. |
| 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:
DELETE AuthorityCommunicationRequest 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 AuthorityCommunicationRequest by key
Deletes the entity record that matches the specified key.
The following elements are required:
| companyKey | (string) The company key. |
| requestKey | (int) The request's key. It is an auto 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:
Resources
ApiAuthorityCommunicationRequestResource
The following elements are required:
| requestKey | (int) The request's key. It is an auto number. |
| sourceDocId | (Guid) The document's identifier. Indicates the document comunicated on this request. |
| sourceSchemaEntityId | (Guid) The document's source schema entity identifier. Indicates the schema entity of the document comunicated on this request. |
| sourceDoc | (string) The source document using the format { |
| company | (string) The request company. The company code is the central organizational unit within the system. |
The following elements are optional:
| communicationAttempts | (int) The number of communication attempts for the current request. |
| requestMessageXML | (string) The actual XML message sent to the AT. |
| responseCode | (string) The response's code returned by the AT webservice. |
| responseDescription | (string) The response's description returned by the AT webservice. |
| responseATDocCodeID | (string) When aplicable the document code returned by the AT webservice after a valid communication. |
| responseDocumentNumber | (string) The number of the document returned by the AT webservice. |
| errorMessage | (string) The error messages related to problems communicating with the web service. |
| errorDetails | (string) The details of the error messages related to problems communicating with the web service. |
| communicationStatus | (enum AuthorityCommunicationState) The request's status. Indicates the status of the request.
See AuthorityCommunicationState. |
| declarationType | (enum AuthorityDeclarationType) The request's type. Indicates if it is a request for transport or financial documents.
See AuthorityDeclarationType. |
| operationType | (enum AuthorityOperationType) The request's operation. Indicates if the operation is registration or change status fo the document.
See AuthorityOperationType. |
AuthorityCommunicationRequestResource
The following elements are required:
| requestKey | (int) The request's key. It is an auto number. |
| sourceDocId | (Guid) The document's identifier. Indicates the document comunicated on this request. |
| sourceSchemaEntityId | (Guid) The document's source schema entity identifier. Indicates the schema entity of the document comunicated on this request. |
| sourceDoc | (string) The source document using the format { |
| company | (string) The request company. The company code is the central organizational unit within the system.
(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:
| communicationAttempts | (int) The number of communication attempts for the current request. |
| requestMessageXML | (string) The actual XML message sent to the AT. |
| responseCode | (string) The response's code returned by the AT webservice. |
| responseDescription | (string) The response's description returned by the AT webservice. |
| responseATDocCodeID | (string) When aplicable the document code returned by the AT webservice after a valid communication. |
| responseDocumentNumber | (string) The number of the document returned by the AT webservice. |
| errorMessage | (string) The error messages related to problems communicating with the web service. |
| errorDetails | (string) The details of the error messages related to problems communicating with the web service. |
| communicationStatus | (enum AuthorityCommunicationState) The request's status. Indicates the status of the request.
See AuthorityCommunicationState. |
| declarationType | (enum AuthorityDeclarationType) The request's type. Indicates if it is a request for transport or financial documents.
See AuthorityDeclarationType. |
| operationType | (enum AuthorityOperationType) The request's operation. Indicates if the operation is registration or change status fo the document.
See AuthorityOperationType. |
ExtensibilityCustomAttributeValueResource
The following elements are required:
| value | (object) The custom attribute value. |