SOAP API for Tax Compliance
The SOAP API exchanges XML messages. It is kept for existing integrations.
For new integrations, we recommend the REST API instead.
Every operation on this page is in a ready-made Postman collection, with the envelope, Content-Type and SOAPAction already set. Import it, set email and token in its Variables tab and press Send.
- TaxId Validation: download the collection, or paste this URL in Postman's Import:
https://developer.magnifinance.com/finance/postman/taxid-validation-soap.json - Tax Communication: download the collection, or paste this URL in Postman's Import:
https://developer.magnifinance.com/finance/postman/tax-communication-soap.json
Endpoints and WSDL
The two services live on different endpoints, each with its own namespace:
| Service | Endpoint | Namespace | WSDL |
|---|---|---|---|
| TaxId Validation | https://bo.magnifinance.com/MagniAPI/v1.1/Invoicing.asmx | http://MagniAPI/v1.1/Invoicing/ | v1.1/Invoicing.asmx?WSDL |
| Tax Communication | https://bo.magnifinance.com/MagniAPI/taxcommunication.asmx | http://MagniAPI/TaxCommunication/ | taxcommunication.asmx?wsdl |
Most SOAP tools (SoapUI, .NET "Add Service Reference", wsimport, zeep, PHP SoapClient) can generate a client from these URLs.
SOAP version and headers
Both SOAP 1.1 and SOAP 1.2 are supported. The Content-Type must match the envelope you send: text/xml; charset=utf-8 for a SOAP 1.1 envelope (used in all examples), application/soap+xml; charset=utf-8 for SOAP 1.2. The SOAPAction header is optional and is "<namespace><operation>", for example "http://MagniAPI/TaxCommunication/ActivationGet". See the invoicing SOAP page for the details.
Authentication
Send your credentials in the body of every request, inside the operation element. The element is Authentication for TaxId Validation and authentication for Tax Communication:
<tax:authentication>
<tax:Email>api@yourcompany.pt</tax:Email>
<tax:Token>your-subscription-token</tax:Token>
</tax:authentication>
Available Operations
| Operation | Service | Description |
|---|---|---|
| TaxIdValidation | TaxId Validation | Check that a tax id is valid for a country |
| ActivationSet | Tax Communication | Turn Tax Communication on or off |
| ActivationGet | Tax Communication | Check whether Tax Communication is on |
| CommunicationList | Tax Communication | List the documents communicated to the tax authority |
Response Format
Every operation answers with the same envelope as the invoicing API: RequestId, Type (Success or Error), Object, and on errors ErrorValue, ErrorHumanReadable and ValidationErrors. See the invoicing SOAP page and Error Codes.