Skip to main content

SOAP API for Tax Compliance

The SOAP API exchanges XML messages. It is kept for existing integrations.

Note

For new integrations, we recommend the REST API instead.

PostmanTry it in Postman

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:

ServiceEndpointNamespaceWSDL
TaxId Validationhttps://bo.magnifinance.com/MagniAPI/v1.1/Invoicing.asmxhttp://MagniAPI/v1.1/Invoicing/v1.1/Invoicing.asmx?WSDL
Tax Communicationhttps://bo.magnifinance.com/MagniAPI/taxcommunication.asmxhttp://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​

OperationServiceDescription
TaxIdValidationTaxId ValidationCheck that a tax id is valid for a country
ActivationSetTax CommunicationTurn Tax Communication on or off
ActivationGetTax CommunicationCheck whether Tax Communication is on
CommunicationListTax CommunicationList 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.