Skip to content

Update A Specific Pick List

Request

Updates an existing pick list within vWork that has the given id. If the pick list is in use by active jobs, they will also receive the new pick list items. Completed jobs will be unaffected.

To add a new value include a new <pick_list_item> element without an id.

To change an existing value you must include the unique id of that <pick_list_item> along with its new value.

To remove an existing value you must include the unique id of that <pick_list_item> along with an empty <value/> tag.

Here are four common examples...

To rename a pick list, you might send the following XML in a PUT to an existing pick list.

<pick_list>
    <name>Delivery Progress</name>
</pick_list>

To add a new value to an existing pick list, you might send the following XML in a PUT to an existing pick list.

<pick_list>
    <pick_list_items type="array">
        <pick_list_item>
            <value>Not Delivered</value>
        </pick_list_item>
    </pick_list_items>
</pick_list>

To remove a value from an existing pick list, you might send the following XML in a PUT to an existing pick list.

<pick_list>
    <pick_list_items type="array">
        <pick_list_item>
            <id>1234</id>
            <value/>
        </pick_list_item>
   </pick_list_items>
</pick_list>

To update an existing value in an existing pick list, you might send the following XML in a PUT to an existing pick list.

<pick_list>
    <pick_list_items type="array">
        <pick_list_item>
            <id>2345</id>
            <value>Delivered</value>
        </pick_list_item>
   </pick_list_items>
</pick_list>
Security
apiKey
Path
idstringrequired
Query
api_keystringrequired
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/pick_lists/{id}.xml
curl -i -X PUT \
  'https://api.vworkapp.com/v5/pick_lists/{id}.xml?api_key=string&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"?>
  <pick_list>
      <name>New Picklist Name Here</name>
  </pick_list>'

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:"Tue, 14 Jun 2016 00:59:33 GMT"
ETagstring
Example:"W/\"c35e9a187b8bba57f18eca3de8a18a05\""
Locationstring
Example:"https://api.vworkapp.com/api/v4/pick_lists/58806"
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:"0b564407-6654-48c3-aeb0-f0d1e8f0e3ea"
X-Runtimestring
Example:"31.127951"
X-Unique-IDstring
Example:"CA7C7B8A:D00F_0A000ED8:01BB_575F565C_75931D:1E66"
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"?>
<pick_list>
    <id>61461</id>
    <name>New Picklist Name Here</name>
    <created_at>2015-07-09T02:30:22+00:00</created_at>
    <updated_at>2015-07-09T02:53:30+00:00</updated_at>
    <pick_list_items type="array">
        <pick_list_item>
            <id>376744</id>
            <value>Delivered</value>
            <created_at>2015-07-09T02:30:22+00:00</created_at>
            <updated_at>2015-07-09T02:30:22+00:00</updated_at>
        </pick_list_item>
        <pick_list_item>
            <id>376745</id>
            <value>Not delivered</value>
            <created_at>2015-07-09T02:30:22+00:00</created_at>
            <updated_at>2015-07-09T02:30:22+00:00</updated_at>
        </pick_list_item>
    </pick_list_items>
</pick_list>