With Codyt projects store
URL
Code Block |
---|
(GET) /api/jobs/{id}/cost |
PARAMETERS
The URL parameters are:
...
id
...
, cost details are saved with documents (for client costing) and jobs (for supplier costing). These details are then pulled when creating invoices. The following APIs return cost details:
...
string, Mandatory
RESULTS
The result is a JSON object with these properties:
...
cost
...
The cost details, see below.
...
object
...
counts
...
The word count details, see below.
...
object
...
properties
...
Additional information, see below
...
object
Cost details
...
PROPERTIES
A cost object has these properties:
total | Total amount, excluding VAT. If null, then the cost has not been assigned or calculated. Note, that most (but not all) other properties below will also be null when no cost was assigned. | decimal? |
totalBase | Total cost prior to applying reductions, fees/discounts and percentage of total content costed. The details of these are described in the next lines. | decimal? |
reduction | Information on applicable reductions | object |
reduction.amount | Total reduction | decimal |
reduction.percent | Total reduction in percent relative to totalBase. | decimal? |
reduction.subTotal | Total after applying reduction (totalBase - reduction.amount) | decimal? |
fee | Information on fee (positive) or discounts (negative) | object |
fee.amount | Total amount added. If the amount is positive then it is a fee, otherwise it is a discount. | decimal |
fee.percent | Total reduction in percent | decimal? |
fee.subTotal | Total after applying reduction (reduction.subTotal + fee.amount). | decimal? |
covered.percent | 100% means that the cost is applied (and will be invoiced). 50% means that only half of the cost will be applied. By default the value is 100. | decimal |
covered.subTotal | This is the same as total. | decimal? |
currency | The currency code, see settings/currencies/codes Null if cost is not calculated. | string |
decimals | Decimal places used when rounding amounts. | int |
EXAMPLES
To clarify how reductions, fees and coverage are applied on the base cost, see this screenshot and the corresponding payload below:
...
Code Block |
---|
"cost": { "total": 495.00, "totalBase": 1000.00, "reduction": { "amount": 100.00, "percent": 10.0, "subTotal": 900.00 }, "fee": { "amount": 90.00, "percent": 10.0, "subTotal": 990.00 }, "covered": { "percent": 50.0, "subTotal": 495.00 }, "currency": "USD", "decimals": 2 } |
EXAMPLE
...