Get a Document Property
The document property is used to get information about the document payment status. You can see if the document is paid or not and how much is missing to reconcile.
POST https://bo.magnifinance.com/MagniAPI/Invoicing.asmx
Sample Body
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://MagniAPI/Invoicing/">
<soapenv:Header/>
<soapenv:Body>
<inv:DocumentGetProperty>
<!--Optional:-->
<inv:Authentication>
<!--Optional:-->
<inv:Email>{{userBase}}</inv:Email>
<!--Optional:-->
<inv:Token>{{tokenBase}}</inv:Token>
</inv:Authentication>
<inv:DocumentId>72609</inv:DocumentId>
<!--Optional:-->
<inv:DocumentProperty>paymentstatus</inv:DocumentProperty>
</inv:DocumentGetProperty>
</soapenv:Body>
</soapenv:Envelope>
Request
Header
| Parameter | Required | Value |
|---|---|---|
| Content-Type | required | text/xml |
Body
DocumentGetProperty
Authentication
| Parameter | Required | Description |
|---|---|---|
| required | string(50) The API user with specific permission to create documents and get information about your own documents into a company. Example: api@magnifinance.com | |
| Token | required | string(50) The token of the company that you want to get the information about the document. |
Parameters
| Parameter | Required | Description |
|---|---|---|
| DocumentProperty | required | string Example value: "paymentstatus" |
| DocumentId | required | int Id of the document that you want to get the payment information. Example value: "67053" |
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 success or error. Example value: "Success" |
| Object | |
| PaymentStatus | string The document's payment status. There are three possible values: NoPayment, Incomplete, Complete. Example value: "Incomplete" |
| TotalAmount | string The total amount of the document. Example value: "20,00" |
| UnpaidAmount | string The total amount of the document that are missing to be paid. Example value: "1,00" |
| ErrorValue | MagniEnum |
| Value | int Identifies the error with a number. To identify the types of errors in more detail, click here. Example value: "14" |
| Name | string Identifies the error with a token. Example value: "SaveFailed" |
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>
<DocumentGetPropertyResponse xmlns="http://MagniAPI/Invoicing/">
<ResponseDocumentGetProperty>
<RequestId>3f04f766-c3fe-4ede-a399-8f2a0ae1f3dc</RequestId>
<Type>Success</Type>
<Object>
<PaymentStatus>Complete</PaymentStatus>
<TotalAmount>69,75</TotalAmount>
<UnpaidAmount>0,00</UnpaidAmount>
</Object>
</ResponseDocumentGetProperty>
</DocumentGetPropertyResponse>
</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>
<DocumentGetPropertyResponse xmlns="http://MagniAPI/Invoicing/">
<ResponseDocumentGetProperty>
<RequestId>bd0e8cf2-5bfa-4b4a-9226-e148d1d81e87</RequestId>
<Type>Error</Type>
<ErrorValue>
<Value>24</Value>
<Name>InvalidDocumentProperty</Name>
</ErrorValue>
</ResponseDocumentGetProperty>
</DocumentGetPropertyResponse>
</soap:Body>
</soap:Envelope>
Payment Status Values
| Status | Description |
|---|---|
| NoPayment | No payment has been made on this document |
| Incomplete | Partial payment has been made, there is still an outstanding amount |
| Complete | The document has been fully paid |