Charges a catalog item to a ticket or to a project task.
Required: exactly one of TicketId and TaskId, ItemId (a product or
bundle from GET /v1/items) and Quantity.
Optional:UnitPrice, UnitCost and Description fall back to the
item’s own; BillableStatusId defaults to 1 (Billable). The product is billed to the
ticket’s client, or the task’s project’s client, and appears on the ticket’s or task’s timeline.
Refused with 409, as the app disables Add Product: on a ticket that is closed, has no client or
whose client is on credit hold; on a task whose project is closed or has no client. Clear the
condition and the same request succeeds. A ticket or task that does not exist, or belongs to
another service provider, is a 404. An item that is not an active product or bundle of the
service provider, catalog-wide or scoped to the charge’s client, is a 400 on ItemId.
The response is just the new charge’s Id, the shape Create Time Entry returns.
授权
Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.
请求体
The product to charge.
A catalog item to charge to a ticket or to a project task.
The ticket to charge the product to. Send this or TaskId, not both.
"08dd8170-f413-959c-82ae-152d5f340000"
The project task to charge the product to. Send this or TicketId, not both.
"08dd8170-f413-959c-82ae-152d5f340001"
The catalog item to add - an active product or bundle from GET /v1/items that is
catalog-wide or scoped to the charge's client. Required.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Quantity to charge. Required; greater than 0 and at most 99,999,999, with up to 4 decimal places.
2
Price of one unit, -99,999,999 to 99,999,999. Defaults to the item's price.
189
Cost of one unit to the service provider, 0 to 99,999,999. Defaults to the item's current cost.
142.5
Description shown for the product on the ticket or task and the invoice. Defaults to the item's description.
1 Billable (default), 2 No charge, 3 Non-billable or 5 Void.
1
响应
OK
100, 101, 102, 103, 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 300, 301, 302, 303, 304, 305, 306, 307, 308, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 426, 428, 429, 431, 451, 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511 null