/bid/create
This action creates a new bid for a work order.
Request
| Field | Description | Required |
|---|---|---|
report_id | Unique identifier for the work order | Yes |
invoice_item_id | Unique identifier for the invoice item. See /bid/invoice/items | Yes, if creating invoice item bid |
invoice_item_other | Invoice item string | Yes, if creating a custom bid |
qty | Bid quantity | Yes, if creating a bid item |
qty_completion | Completion quantity | Yes, if creating a completion item |
uom | Unique identifier for the Unit of Measure (UOM). See /bid/uom | No |
contractor_price | Contractor price for the bid | Yes |
client_price | Client price for the bid | Yes |
comment | Bid comment | No |
comp_comment | Completion comment | No |
The Unit Of Measure (UOM) field may be set only if the Unit Of Measure feature is enabled for your organization.
Example for creating a bid item:
{
"report_id": 4066,
"invoice_item_id": "42921",
"qty": 5,
"contractor_price": 10.92,
"client_price": 21.96,
"comment": "lock comment"
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id":4066,"invoice_item_id":"42921","qty":5,"contractor_price":10.92,"client_price":21.96,"comment":"lock comment"}' \
https://ppw.web/svc/bid/create
Example for creating a completion item:
{
"report_id": 4066,
"invoice_item_id": "42921",
"qty_completion": 5,
"contractor_price": 10.92,
"client_price": 21.96,
"comp_comment": "completion comment"
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id":4066,"invoice_item_id":"42921","qty_completion":5,"contractor_price":10.92,"client_price":21.96,"comp_comment":"completion comment"}' \
https://ppw.web/svc/bid/create
Response
| Field | Description | Type |
|---|---|---|
comp_note_id | Unique identifier for the bid | number |
Example successful response:
{
"comp_note_id": 44
}
Errors
| Error Type | Description | Status Code |
|---|---|---|
access_denied | Access token is invalid or expired | 401 |
scope_invalid | Client app does not have the required OAuth scope | 403 |
wo_invalid | Work order is invalid | 400 |
invoice_item_id_invalid | Invoice item is invalid | 400 |
invoice_item_other_invalid | Custom Invoice item is invalid | 400 |
invoice_item_id_not_allowed | invoice_item_id cannot be set | 400 |
qty_required | Quantity is not in the request | 400 |
qty_invalid | Quantity is invalid | 400 |
uom_invalid | Unit of Measure (UOM) is invalid | 400 |
uom_not_allowed | Unit of Measure (UOM) cannot be set | 400 |
contractor_price_required | Contractor price not in request | 400 |
contractor_price_invalid | Contractor price is not valid | 400 |
client_price_required | Client price not in request | 400 |
client_price_invalid | Client price is invalid | 400 |
internal_error | Internal server error | 500 |
save_error | Server failed to save the bid | 500 |