Skip to main content

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

ParameterRequiredValue
Content-Typerequiredtext/xml

Body

DocumentGetProperty

Authentication
ParameterRequiredDescription
Emailrequiredstring(50) The API user with specific permission to create documents and get information about your own documents into a company. Example: api@magnifinance.com
Tokenrequiredstring(50) The token of the company that you want to get the information about the document.
Parameters
ParameterRequiredDescription
DocumentPropertyrequiredstring Example value: "paymentstatus"
DocumentIdrequiredint Id of the document that you want to get the payment information. Example value: "67053"

Response

ParameterDescription
RequestIdUnique Id for the request to have a way to identify the request
Typestring Description to inform if the request was success or error. Example value: "Success"
Object
PaymentStatusstring The document's payment status. There are three possible values: NoPayment, Incomplete, Complete. Example value: "Incomplete"
TotalAmountstring The total amount of the document. Example value: "20,00"
UnpaidAmountstring The total amount of the document that are missing to be paid. Example value: "1,00"
ErrorValueMagniEnum
Valueint Identifies the error with a number. To identify the types of errors in more detail, click here. Example value: "14"
Namestring 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

StatusDescription
NoPaymentNo payment has been made on this document
IncompletePartial payment has been made, there is still an outstanding amount
CompleteThe document has been fully paid