/invoice/id
This action returns the unique identifier for the invoice associated with the work order.
Request
| Field | Description | Required |
|---|---|---|
report_id | Unique identifier for the work order | Yes |
Example:
{
"report_id": 3851
}
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-d '{"report_id": 3849}' \
https://ppw.web/svc/invoice/id
Response
| Field | Description | Type |
|---|---|---|
invoice_id | Unique identifier for the work order’s invoice | number |
Example successful response:
{
"invoice_id": 422
}
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_not_found | Invoice does not exist for the work order | 400 |