Skip to content

Update A Specific Customer

Request

Updates an existing customer record. When updating a customer you only need to specify the fields that you would like to change. All other fields will remain unchanged. For example; to update the notes you might post XML formed as follows:

<customer>
    <notes>Beware of the dog.</notes>
</customer>
Security
apiKey
Path
idstringrequired
Query
api_keystringrequired
use_third_party_idboolean

When set to true (e.g. 'true') the :id argument is taken to be the job's third party id instead of the job's normal id.

Example:use_third_party_id=true
Headers
Accept-Encodingstringrequired

Must be gzip. The vWork API requires HTTP compression on all requests; requests without it may be rejected with 406 Not Acceptable (see Tech Notes → HTTP Compression).

Value:"gzip"
Example:gzip
Bodyapplication/xml; charset=utf-8
string

Raw XML payload — see the example.

PUT
/v5/customers/{id}.xml
curl -i -X PUT \
  'https://api.vworkapp.com/v5/customers/{id}.xml?api_key=string&use_third_party_id=true&api_key=YOUR_API_KEY_HERE' \
  -H 'Accept-Encoding: gzip' \
  -H 'Content-Type: application/xml; charset=utf-8' \
  -d '<?xml version="1.0" encoding="utf-8"?>
  <customer>
      <notes>Beware of the dog.</notes>
  </customer>'

Responses

OK

Headers
Cache-Controlstring
Example:"max-age=0, private, must-revalidate"
Content-Encodingstring
Example:"gzip"
Content-Security-Policystring
Example:"frame-ancestors *.vworkapp.com *.vwork.io *.visfleet.com *.salesforce.com *.zoho.com, default-src: google.com google-analytics.com googleapis.com gst
Datestring
Example:"Mon, 13 Jun 2016 23:01:46 GMT"
ETagstring
Example:"W/\"9b4e74990926e6cc627402b2aaab449d\""
Statusstring
Example:"200 OK"
Strict-Transport-Securitystring
Example:"max-age=31536000"
Transfer-Encodingstring
Example:"chunked"
X-Content-Type-Optionsstring
Example:"nosniff"
X-Frame-Optionsstring
Example:"SAMEORIGIN"
X-Request-Idstring
Example:"51f4063c-55fd-4d82-8d5d-86643ebc858b"
X-Runtimestring
Example:"0.136054"
X-Unique-IDstring
Example:"CA7C7B8A:CC3A_0A001312:01BB_575F3B5A_6D4613:1EB6"
X-XSS-Protectionstring
Example:"1; mode=block"
Bodyapplication/xml; charset=utf-8
string

Raw XML payload — see the example.

Response
<?xml version="1.0" encoding="utf-8"?>
<customer>
    <id>1119086</id>
    <name>Joe's Plumbing</name>
    <notes>Beware of the dog.</notes>
    <third_party_id>ABC123</third_party_id>
    <billing_contact>
        <first_name>Bob</first_name>
        <last_name>Lei</last_name>
        <phone>1 555 111 1111</phone>
        <mobile/>
        <email/>
        <location>
            <id type="integer">23839050</id>
            <created_at type="datetime" readonly="readonly">2016-06-13T22:51:25+00:00</created_at>
            <updated_at type="datetime" readonly="readonly">2016-06-13T22:51:25+00:00</updated_at>
            <address1/>
            <address2/>
            <suburb/>
            <city/>
            <post_code/>
            <country/>
            <province/>
            <region/>
            <state/>
            <formatted_address>880 Harrison Street, San Francisco, CA, 94107</formatted_address>
            <lat type="decimal">-37.779536</lat>
            <lng type="decimal">-12…