API 2.1
Activation Set
This method allows you to active or inactive the Tax Communication service that enables the communication of invoices automatically after creation to the government.
To start use this method you need a specific Tax Authority User and Password that should be created with the appropriate permission ('WFA - Comunicação de dados de faturas' and/or 'WDT - Comunicação de dados de documentos de transporte') inside the "Portal das Finanças" web site.
When you call the method trying to active the service, we will validate the credentials and only in case of success the service is turn to active.
POST https://bo.magnifinance.com/MagniAPI/taxcommunication.asmx
Sample Body
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tax="http://MagniAPI/TaxCommunication/">
<soapenv:Header/>
<soapenv:Body>
<tax:ActivationSet>
<!--Optional:-->
<tax:authentication>
<!--Optional:-->
<tax:Email>{emailAPI}</tax:Email>
<!--Optional:-->
<tax:Token>{token}</tax:Token>
</tax:authentication>
<!--Optional:-->
<tax:activation>
<!--Optional:-->
<tax:Username>{User}</tax:Username>
<!--Optional:-->
<tax:Password>{password}</tax:Password>
<tax:IsActive>true</tax:IsActive>
</tax:activation>
</tax:ActivationSet>
</soapenv:Body>
</soapenv:Envelope>
Request
Header
Parameter |
Required |
value |
Content-Type |
required |
text/xml
|
Body
Authentication
Parameter |
Required |
Description |
Email |
required |
string(50) The API user email with specific permission to configure this service into the company.
|
Token |
required |
string(50) The token of the company that you are trying to active the Tax communication service.
|
Activation
Parameter |
Required |
Description |
Email |
required |
string (50) The email address of the Tax Authority(AT) user with the appropriate permission (WFA / WDT). You can create a user in the AT website by navigating through the sections 'Serviços tributários/Outros serviços/Gestão de utilizadores'. There, create a user and give it the appropriate permissions 'WFA - Comunicação de dados de faturas' and/or 'WDT - Comunicação de dados de documentos de transporte'. Example value:"info@magnifinance.com"
|
Password |
required |
string (min = 6 and max = 50) The password of the Tax Authority user of the company with the appropriate permission (WFA / WDT). For security reason, the password should have more than 6 characters but less than 50 characters. For Example value:"XYs123cath4rlaYcbyJwNeOp"
|
IsActive |
required |
boolean When you set "true" if the Tax Authority service accept your user and password, the service will be set to Active. If you set "false" the request will remove the data about this user and inactive the tax communication service for this company. Example value:"true"
|
Response
Parameter |
Description |
RequestId |
Unique Id for the request to have a way to identify the request |
Type |
string Description to inform if the request was a success or error. Example value: "Success"
|
Object |
|
|
IsActive |
boolean It will return if the Tax Communication service is active or not. In case of the credentials fail in the validation of the Tax Authority portal, the API will return "false". Example value: "true"
|
ErrorMessage |
string Unprocessed error message.
|
|
ErrorValue |
MagniEnum |
|
Value |
int Identifies the error with a number. To identify the types of errors in more detail click here Example value: "1"
|
Name |
string Identifies the error with a token. Example value: "AuthenticationError"
|
|
Example Response
Success
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ActivationSetResponse xmlns="http://MagniAPI/TaxCommunication/">
<ResponseActivationSet xsi:type="ResponseOfActivation">
<RequestId>08d52dd7-cfba-4542-abeb-935504ccdbaa</RequestId>
<Type>Success</Type>
<Object>
<IsActive>true</IsActive>
</Object>
</ResponseActivationSet>
</ActivationSetResponse>
</soap:Body>
</soap:Envelope>
Error
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ActivationSetResponse xmlns="http://MagniAPI/TaxCommunication/">
<ResponseActivationSet>
<RequestId>5165e271-97ec-4425-aa33-f7c32c7c6f3d</RequestId>
<Type>Error</Type>
<ErrorValue>
<Value>1</Value>
<Name>AuthenticationError</Name>
</ErrorValue>
</ResponseActivationSet>
</ActivationSetResponse>
</soap:Body>
</soap:Envelope>