Log in
 

Soap API documentation

Method: createJournal()

Creates a journal.

Request

Field Type Description  
journal description string The description of the journal. required
journal accountingDate string The accounting date of the journal in the format (YYYY-MM-DD). optional
journal entity integer The ID of an entity attached to the journal. optional
journal project integer The ID of a project attached to the journal. optional
journal ledger[ ] array An array of transactions added to the journal. Two items required. optional
journal ledger[ ][account] integer Account code for associated transaction. optional
journal ledger[ ][amount] float Amount for associated transaction in the journal. optional

Response

Field Type Description  
journal journal_id integer Set to the id of the created journal if creation was successful . optional

Examples

Request

<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>
        <createJournal xmlns="https://secure.clearbooks.co.uk/api/accounting/soap/">
            <root project="2" entity="2">
                <description>Test journal</description>
                <accountingDate>2019-09-03</accountingDate>
                <ledger>
                    <JournalLedgerItem>
                        <account>1001001</account>
                        <amount>200.00</amount>
                    </JournalLedgerItem>
                    <JournalLedgerItem>
                        <account>2001001</account>
                        <amount>-200.00</amount>
                    </JournalLedgerItem>
                </ledger>
            </root>
        </createJournal>
    </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:createJournalResponse>
            <return>
                <journal_id>3476</journal_id>
            </return>
        </ns1:createJournalResponse>
    </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.