Features
Pricing
Support
Accountants
MTD Software
Contact
More
Log in
 

Soap API documentation

Method: updateEntity

Update an existing customer or supplier.

Request

Field Type Description  
entityId integer The internal id of the entity required
all other fields string See createEntity optional

Response

Field Type Description  
The return value integer The internal id of the entity optional

Examples

Request

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:cb="https://secure.clearbooks.co.uk/api/soap/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <env:Header>
    <cb:authenticate apiKey="yourApiKey" />
  </env:Header>
  <env:Body>
    <env:updateEntity env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
      <entityId xsi:type="xsd:int">10</entityId>
        <entity
          company_name="A new company"
          contact_name="Mr Contact Person"
          address1="address1"
          town="town"
          county="county"
          postcode="postcode"
          email="email@address.com"
          phone1="01234 567890"
          xsi:type="cb:Entity">
          <customer
            default_account_code="1001001"
            default_vat_rate="0.15"
            default_credit_terms="30"
            xsi:type="cb:EntityExtra" />
          <supplier
            default_account_code="1001001"
            default_vat_rate="0.15"
            default_credit_terms="30"
            xsi:type="cb:EntityExtra" />
        </entity>
      </env:updateEntity>
    </env:Body>
</env:Envelope>

Response

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
  xmlns:cb="https://secure.clearbooks.co.uk/api/soap/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
  <env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc">
    <env:updateEntityResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
      <updateEntityReturn xsi:type="xsd:int">18</updateEntityReturn>
    </env:updateEntityResponse>
  </env:Body>
</env:Envelope>

Clear Books is proudly registered with the Financial Conduct Authority as an Account Information Services Provider (register no. 843585).