Log in
 

Soap API documentation

Method: getInvoiceIdFromInvoiceNumber

Returns the latest invoice ID for an invoice prefix and invoice number pair.

Request

Field Type Description  
type string A string identifying the type of the invoice. Value one of: purchases sales required
invoicePrefix string The invoice prefix (e.g.: INV, PUR, ...). required
invoiceNumber string The invoice number. required

Response

Field Type Description  
return integer The invoice number. optional

Examples

Request

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Header>
        <authenticate xmlns="https://secure.clearbooks.co.uk/api/accounting/soap/">
            <apiKey xmlns="">yourApiKey</apiKey>
        </authenticate>
    </Header>
    <Body>
        <getInvoiceIdFromInvoiceNumber xmlns="https://secure.clearbooks.co.uk/api/accounting/soap/">
            <type>sales</type>
            <invoicePrefix>INV</invoicePrefix>
            <invoiceNumber>1</invoiceNumber>
        </getInvoiceIdFromInvoiceNumber>
    </Body>
</Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://secure.clearbooks.co.uk/api/accounting/soap/">
    <SOAP-ENV:Body>
        <ns1:getInvoiceIdFromInvoiceNumberResponse>
            <return>411</return>
        </ns1:getInvoiceIdFromInvoiceNumberResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ICB accreditation

Clear Books, accredited by The Institute of Certified Bookkeepers and registered with the Financial Conduct Authority (reg. no. 843585), delivers valued, comprehensive online accounting software for small businesses in the UK.