SOAP API for Partner Invoicing
The SOAP API has the operations to manage the partners in your IPPN network and to invoice on their behalf.
For new integrations, we recommend the REST API instead.
POST https://bo.magnifinance.com/MagniAPI/Invoicing.asmx
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://MagniAPI/Invoicing/AddPartner"
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://MagniAPI/Invoicing/">
<soapenv:Body>
<inv:AddPartner>
<inv:Authentication>
<inv:Email>ippn-api@yourcompany.pt</inv:Email>
<inv:Token>your-ippn-token</inv:Token>
</inv:Authentication>
<inv:PartnerInformation>
<inv:UserName>João Cardoso</inv:UserName>
<inv:UserEmail>contact@partner.pt</inv:UserEmail>
<inv:UserPhone>912345678</inv:UserPhone>
<inv:CompanyTaxId>992281008</inv:CompanyTaxId>
<inv:CompanyLegalName>Partner Company, Lda.</inv:CompanyLegalName>
<inv:CompanyAddress>Av. Sidónio Pais, n.º 2</inv:CompanyAddress>
<inv:CompanyCity>Lisboa</inv:CompanyCity>
<inv:CompanyPostCode>1050-214</inv:CompanyPostCode>
<inv:CompanyCountry>PT</inv:CompanyCountry>
</inv:PartnerInformation>
</inv:AddPartner>
</soapenv:Body>
</soapenv:Envelope>
Every operation on this page, plus Communicate Partner Series, is in the IPPN SOAP Postman collection, with the envelope, Content-Type and SOAPAction already set and the calls in kick-off order. Import it, set email, token, password and partnerTaxId in its Variables tab and press Send. How to use it.
Or paste this URL in Postman's Import:
https://developer.magnifinance.com/ippn/postman/ippn-soap.json
WSDL and endpoints
| Endpoint | WSDL | Namespace | Operations |
|---|---|---|---|
https://bo.magnifinance.com/MagniAPI/Invoicing.asmx | Invoicing.asmx?WSDL | http://MagniAPI/Invoicing/ | AddPartner, GetPartnerAccessTokens, and the invoicing operations |
https://bo.magnifinance.com/MagniAPI/v1.1/Invoicing.asmx | v1.1/Invoicing.asmx?WSDL | http://MagniAPI/v1.1/Invoicing/ | The same operations, plus TaxIdValidation |
Use the namespace of the endpoint you call. Requests use SOAP 1.1 with Content-Type: text/xml; charset=utf-8; the SOAPAction header is optional. See SOAP version and headers and Response Format for the details shared by all operations.
Available Operations
| Operation | Description |
|---|---|
| AddPartner | Add a company to your IPPN network as a partner |
| GetPartnerAccessTokens | Get the tokens to invoice on behalf of a partner |
| TaxIdValidation | Check a partner's tax id before adding it (v1.1 endpoint; in the Finance section, Tax Compliance) |
Workflow
- Add the partner with AddPartner, using its tax id and company details.
- Wait for the partnership to be granted. A partner that already uses MagniFinance receives an email and must accept. One that isn't registered yet is created and linked to your account automatically, a few times per business day. The state is visible only in the web interface; until it's granted, GetPartnerAccessTokens returns
NoPartnerFoundWithTaxId. - Get the partner's token with GetPartnerAccessTokens.
- Create documents with DocumentCreate, sending the partner's token in
Authentication.
Authentication
Send your IPPN credentials in the body of every request:
<inv:Authentication>
<inv:Email>ippn-api@yourcompany.pt</inv:Email>
<inv:Token>your-ippn-token</inv:Token>
</inv:Authentication>
When creating documents on behalf of a partner, send the partner's token instead of your own. GetPartnerAccessTokens also needs your password (see that page).
Web Interface
You can also manage partners in MagniFinance under Config → IPPN → Partnership Management.