Pricebooks are simply an easy way to define what items are available to be added to an invoice.
Pricebooks can contain up to 2000 items, each item has a code, description and unit cost.
Web users can select a pricebook for each of their templates. When using the API, you can either inherit the pricebook from the template, or specify the pricebook for each job you create.
If you are using our customer specific pricebooks features, you can also inherit the pricebook from the customer record.
The following web services can be used to create, update, delete and search for pricebooks within vWork.
Here are the fields you can use when making a pricebook request:
| Name | Type | Description |
|---|---|---|
| name | String | Unique name of pricebook, cannot be blank. |
| description | String | A user friendly description of the pricebook, should not be blank. |
| pricebook_items | Array | An array of values to populate the pricebook |
| pricebook_item.code | String | The item code to include in the pick list |
| pricebook_item.description | String | The item description to include in the pick list |
| pricebook_item.price | String | The item value to include in the pick list |
When retrieving a priceboook from vWork, you may also see these additional fields in the response.
| Name | Type | Description |
|---|---|---|
| id | Integer | The unique ID of the pricebook. Auto-generated by vWork. |
| pricebook_id | Integer | The unique ID of the pricebook. Auto-generated by vWork. |
| account_id | Integer | The unique ID of your account. Auto-generated by vWork. |
| item id | Integer | The unique ID of each item in the pricebook. Auto-generated by vWork. |
Creates a new pricebook in vWork.
curl -i -X POST \
'https://api.vworkapp.com/v5/pricebooks.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"?>
<pricebook>
<name>test pricebook</name>
<description>pricebook</description>
<pricebook_items type="array">
<pricebook_item>
<code>3</code>
<description>Description 3</description>
<price>40.0</price>
</pricebook_item>
<pricebook_item>
<code>2</code>
<description>Description 2</description>
<price>30.0</price>
</pricebook_item>
<pricebook_item>
<code>1</code>
<description>Description 1</description>
<price>20.0</price>
</pricebook_item>
</pricebook_items>
</pricebook> '<?xml version="1.0" encoding="utf-8"?>
<pricebook>
<id readonly="readonly">1090</id>
<name>test pricebook</name>
<account_id>1296</account_id>
<description>pricebook</description>
<pricebook_items type="array">
<pricebook_item>
<id readonly="readonly">113124</id>
<pricebook_id>1090</pricebook_id>
<code>3</code>
<description>Description 3</description>
<price>40.0</price>
</pricebook_item>
<pricebook_item>
<id readonly="readonly">113125</id>
<pricebook_id>1090</pricebook_id>
<code>2</code>
<description>Description 2</description>
<price>30.0</price>
</pricebook_item>
<pricebook_item>
<id readonly="readonly">113126</id>
<pricebook_id>1090</pricebook_id>
<code>1</code>
<description>Description 1</description>
<price>20.0</price>
</pricebook_item…