Skip to content

Pick Lists

A pick list is a type of custom field within a Job. It contains a set of pre-defined items a user can choose from when filling out the custom field.

vWork supports both single value pick lists where a user can only choose one value, as well as multi-value pick lists where user's can select more than one value. Any of the pick lists defined in the account can be set to either single or multi-value when they are added to a job. You can also set a default value for a pick list when you add it to a job.

The following calls allow you to administer the pick lists that are available in your account.

Here are the fields you can use when making a pick list request:

NameTypeDescription
nameStringA human readable name used to identify the pick list in the vWork admin.
pick_list_itemsArrayAn array of values to populate the pick list
pick_list_item.valueStringThe value to include in the pick list

When retrieving a pick list from vWork, you may also see these additional fields in the response:

NameTypeDescription
idIntegerThe unique identifier for this pick list. Auto-generated by vWork.
created_atDateTimeThe date and time when this pick list was created. Format: ISO 8601.
updated_atDateTimeThe date and time when this pick list was last updated. Format: ISO 8601.
pick_list_itemsArrayArray containing all items of that pick list.
pick_list_itemObjectOne pick list item object.
pick_list_item.idIntegerThe unique identifier for this pick list item. Auto-generated by vWork.
pick_list_item.valueStringThe text for this item.
pick_list_item.created_atDateTimeThe date and time when this pick list item was created. Format: ISO 8601.
pick_list_item.updated_atDateTimeThe date and time when this pick list item was last updated. Format: ISO 8601.

Create A New Pick List

Request

Creates a pick list in vWork. The response includes the pick list’s unique id assigned to it by vWork. This ID needs to be included when adding a pick list custom field to a job.

Security
apiKey
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.

POST
/v5/pick_lists.xml
curl -i -X POST \
  'https://api.vworkapp.com/v5/pick_lists.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>Package Status</name>
      <pick_list_items type="array">
          <pick_list_item>
              <value>Delivered</value>
          </pick_list_item>
          <pick_list_item>
              <value>Not delivered</value>
          </pick_list_item>
      </pick_list_items>
  </pick_list>'

Responses

Created

Headers
Cache-Controlstring
Example:"max-age=0, private, must-revalidate"
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:40:16 GMT"
ETagstring
Example:"W/\"257f6792403fcefc322d57060c8f183e\""
Locationstring
Example:"https://api.vworkapp.com/api/v4/pick_lists/72077"
Statusstring
Example:"201 Created"
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:"80f0a715-3dbb-4941-9304-bb4d9e5b8b6c"
X-Runtimestring
Example:"0.120963"
X-Unique-IDstring
Example:"CA7C7B8A:CFF3_0A001312:01BB_575F5266_7067FB: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"?>
<pick_list>
    <id>1234</id>
    <name>Package Status</name>
    <created_at>2012-10-15T20:53:38+00:00</created_at>
    <updated_at>2012-10-15T20:53:38+00:00</updated_at>
    <pick_list_items type="array">
        <pick_list_item>
            <id>2345</id>
            <value>Delivered</value>
            <created_at>2012-10-15T20:53:38+00:00</created_at>
            <updated_at>2012-10-15T20:53:38+00:00</updated_at>
        </pick_list_item>
        <pick_list_item>
            <id>2346</id>
            <value>Not delivered</value>
            <created_at>2012-10-15T20:53:38+00:00</created_at>
            <updated_at>2012-10-15T20:53:38+00:00</updated_at>
        </pick_list_item>
    </pick_list_items>
</pick_list>