/other-costs
This endpoint allows you to list all Other Costs. Other Costs in Infraspeak refer to the type of costs that usually are not categorized as costs for physical materials (bought from suppliers) or costs for services (provided by 3rd party entities) to enable the corrective and preventive maintenance operations. Some examples of an Other Cost could be traveling costs (which can be measured in traveling duration or traveling distance), stay costs or meal costs.
getOtherCosts
| Name | Type | Description |
|---|---|---|
expanded
|
string |
Allows you to expand the available Other Cost relations. customClientPrices
entity
|
data
array<object>
id
string
required
read-only
The ID of the Other Cost
Example: 123
type
string
required
read-only
Model type
other-cost
Example: other-cost
attributes
object
required
other_cost_id
integer
read-only
The ID of the Other Cost
Example: 123
entity_id
integer
read-only
The ID of the Entity
Example: 123
input_type
string
The type of Other Cost. Different types of Other Costs have different associated fields. Other Costs of type resource will measure its total cost based on how long (e.g. hours, minutes) the resource is occupied. Other Costs of type distance will measure its total cost based on how many units (e.g. meters, kilometers) are needed. Other Costs of type interval and time_range will measure its total cost based on duration. Other Costs of type currency will have a fixed cost manually defined for each operation. Other Costs of type custom_unit_of_measurement will measure its total cost based on how many units (e.g. m3, liters) are needed.
currency
distance
interval
time_range
resource
custom_unit_of_measurement
Example: currency
name
string
The name (or description) of the Other Cost
Example: Contractual Labor
failure
boolean
Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work Orders)
Example: 1
schedule_work
boolean | null
Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned Job Orders)
Example: 1
operator
boolean | null
Indicates if the Other Cost can be included in individual costs for operators (technicians)
Example: 1
icon
string
The icon to be presented for the Other Cost in Infraspeak platform.
truck
car
clock-o
bed
user
usd
cutlery
wrench
Example: truck
element
boolean | null
Indicates if the Other Cost can be included in costs for Assets
Example: 1
cost_per_unit
number | null
Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or "custom_unit_of_measurement"
Example: 2.5
default_sell_price
number | null
Default sell price of the Other Cost. Specific for input_type "resource", "distance" or "custom_unit_of_measurement"
Example: 4
default_sell_vat
number | null
Default sale VAT/IVA percentage of the Other Cost. Specific for input_type "resource", "distance" or "custom_unit_of_measurement"
Example: 23
unit
string | null
Unit of the Other Cost. Specific for input_type "resource", "distance" or "custom_unit_of_measurement"
relationships
object
The relationships of the Other Cost (Only present when expanded in the request)
customClientPrices
object
The Custom Client Prices associated with the Other Cost
entity
object
The Entity where the Other Cost belongs
included
array<object>
List of relationships to be included
meta
object
Meta model structure details
pagination
object
total
integer
required
Total items.
Example: 1
count
integer
required
Total items returned for the current page.
Example: 1
per_page
integer
required
Maximum number of records per page.
Example: 1
current_page
integer
required
Number of the current page.
total_pages
integer
required
Number of the total pages.
links
object
Requests that return multiple items include a `links` attribute, with links related to request's context.
self
string
required
read-only
Current response link.
Example: /path?page=1
first
string
required
read-only
Link to the first page result.
Example: /path?page=1
last
string
required
read-only
Link to the previous page result.
Example: /path?page=1
next
string
read-only
Link to the next page result.
Example: /path?page=1
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X GET \
'https://api.sandbox.infraspeak.com/v3/other-costs' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/other-costs', {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->get('https://api.sandbox.infraspeak.com/v3/other-costs');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/other-costs',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()