HOME / COMMUNITY Switch to knowledge base

Error when retrieving a list of nominal codes Ledger_GetNominalLedgers

Hi,
when I try to retrieve a list of nominal codes from the database I get an error saying the xML is malformed.

<Ledger_GetNominalLedgers  xmlns=\"https://api.quickfile.co.uk\"  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"  xsi:schemaLocation=\"https://api.quickfile.co.uk https://api.quickfile.co.uk/schemas/1_2/Ledger_Search.xsd\">
<Header>
<MessageType>Request</MessageType>
<SubmissionNumber>[IDSubmission]</SubmissionNumber>
<Authentication>
<AccNumber>{Quickfile.API.accountNo}</AccNumber>
<MD5Value>[MD5]</MD5Value>
<ApplicationID>{Quickfile.API.appID}</ApplicationID>
</Authentication>
</Header>
<Body>
<SearchParameters></SearchParameters>
</Body>
</Ledger_GetNominalLedgers>

I tried by using searchparameters and by not removing them, I want to get a full list of all nominal codes anyway :slight_smile:

While I was doing some testing to try to find out what is happening I got this returned

<Errors>
<Error>1The 'https://api.quickfile.co.uk:Ledger_GetNominalLedgers' element is not declared.</Error>
<Error>2The 'https://api.quickfile.co.uk:Header' element is not declared.</Error>
<Error>3The 'https://api.quickfile.co.uk:MessageType' element is not declared.</Error>
<Error>4The 'https://api.quickfile.co.uk:SubmissionNumber' element is not declared.</Error>
<Error>5The 'https://api.quickfile.co.uk:Authentication' element is not declared.</Error>
<Error>6The 'https://api.quickfile.co.uk:AccNumber' element is not declared.</Error>
<Error>7The 'https://api.quickfile.co.uk:MD5Value' element is not declared.</Error>
<Error>8The 'https://api.quickfile.co.uk:ApplicationID' element is not declared.</Error>
<Error>11The 'https://api.quickfile.co.uk:Body' element is not declared.</Error>
<Error>12The 'https://api.quickfile.co.uk:SearchParameters' element is not declared.</Error>
</Errors>

Hi @APereira

I’ve just tried the follow, which seems to work as expected:

<Ledger_GetNominalLedgers  xmlns="https://api.quickfile.co.uk"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="https://api.quickfile.co.uk https://api.quickfile.co.uk/schemas/1_2/Ledger_GetNominalLedgers.xsd">
  <Header>
    <MessageType>Request</MessageType> 
    <SubmissionNumber>[Submission Number]</SubmissionNumber>
    <Authentication>
      <AccNumber>[Account Number]</AccNumber>
      <MD5Value>[MD5 Value]</MD5Value>
       <ApplicationID>[Application ID]</ApplicationID>
    </Authentication>
  </Header>
  <Body>
  </Body>
</Ledger_GetNominalLedgers>

If you omit the SearchParameters option altogether, this should return the results you’re looking for.

@QFMathew

Weirdly enough now worked hehe

Thanks for your quick reply.

1 Like