update()

IMPORTANT  The SOAP API entered a limited enhancement phase in Q4 2020. Access to version 1.6 will be deactivated.

Use this call to update objects in the Autotask system. Not all entities accept the update() call. To determine if an entity can be updated, find the Entity in the , click and check the Entity Details in the topic. Alternately, use the The getEntityInfo() SOAP API call call.

NOTE  When you use the update() call, all entity fields are updated unless they are ReadOnly. On update(), if no value is provided for non- ReadOnly fields, those fields are cleared.

NOTE  Use the Entity Returned by update() to Obtain Id Only.
You can use the entity returned by create() and update() to obtain the Id field content, but do not rely on the rest of the content. Some entity fields cannot be calculated immediately during create and update. In the returned entity , those fields may not be accurate.

If you need to access the entity for information other than the Id, query for the entity after the create() or update() succeeds.

Considerations

The following general considerations apply to the Web Services update() call.

Permissions By default, the API User (system) (API-only) security level grants Full access permissions, but copies of this security level may have been modified. The API user must have access to the appropriate Autotask module for the entity type and sufficient rights to perform the specified API call.
id The id is auto-generated by Autotask and uniquely identifies a particular entity instance. It is also used with the update() call to identify the target record. You cannot assign a value to this field.
ReadOnly Fields Some fields are set by Autotask and cannot be changed via the API. These are marked as Read Only in the tables for each entity type.  New values assigned to these fields are ignored for any entity object passed to the create() or update() API calls.
Required Fields For update() and create() calls, you must specify values for required fields. If no value is specified, an error will occur and no data will be changed in Autotask.
System Integrity Some fields on Entities require an id to a parent Entity. These are referred to as Reference fields. For example, when creating a Ticket Note you must supply the id for the Ticket that the note will be associated with.
Update/Create Maximum Entities The Web Service API calls can update or create a maximum of 200 objects with one call. If you send more then 200 elements in your array, the call will fail and no changes will occur in Autotask.
White Spacing API functions will trim all white spaces in the beginning and end of each string type entry.

Sample update() SOAP XML

            <?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:Header>
    <AutotaskIntegrations xmlns="http://autotask.net/ATWS/v1_6/">
       <IntegrationCode>[insert your own tracking identifier]</IntegrationCode>
    </AutotaskIntegrations>
  </soap:Header>
  <soap:Body>
    <update xmlns="http://autotask.net/ATWS/v1_6/">
      <Entities>
        <Entity xsi:type="Ticket" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <AccountID>174</AccountID>
          <AccountPhysicalLocationID>2</AccountPhysicalLocationID>
          <CreateDate>2018-11-21T11:01:37.4000000</CreateDate>
          <CreatorResourceID>29683121</CreatorResourceID>
          <CreatorType>1</CreatorType>
          <DueDateTime>2019-01-15T00:00:00.0000000</DueDateTime>
          <id>24126</id>
          <LastActivityDate>2018-11-21T11:01:37.5730000</LastActivityDate>
          <LastActivityPersonType>1</LastActivityPersonType>
          <LastActivityResourceID>29683121</LastActivityResourceID>
          <Priority>3</Priority>
          <QueueID>8</QueueID>
          <Status>8</Status>
          <TicketCategory>3</TicketCategory>
          <TicketNumber>T20181121.0011</TicketNumber>
          <TicketType>1</TicketType>
          <Title>My Ticket Title</Title>
          <UserDefinedFields>
            <UserDefinedField>
              <Name>Continuum Owner</Name>
              <Value>2</Value>
            </UserDefinedField>
          </UserDefinedFields>
        </Entity>
      </Entities>
    </update>
  </soap:Body>
</soap:Envelope>