/requests/{requestId}
This endpoint allows users to consult a specific Request. These requests are generated by technicians in the mobile app and can be approved or rejected by manager in the web.
getRequest
| Name | Type | Description |
|---|---|---|
requestId
required
|
string |
Request Id |
| Name | Type | Description |
|---|---|---|
expanded
|
string |
Allows you to expand the available Request relations. RelatedTo will be a Failure (Work Order) or Scheduled Work (Planned Job Order) Responsibles will be a list of Operators. relatedTo
operator
responsibles
requestMaterials
files
|
data
object
Request model structure details
id
string
read-only
ID of the Request.
type
string
read-only
Model type
request
attributes
object
entity_id
integer
description
string
Description of the Request.
type
string
read-only
Type of the Request.
MATERIAL_REQUEST
SERVICE_REQUEST
OTHERS
date_created
string (date-time)
Creation date of the Request.
Example: 2020-08-28T17:12:00.000Z
date_updated
string (date-time)
Last update date of the Request.
Example: 2020-08-28T17:12:00.000Z
operator_id
integer
ID of the operator that created the Request.
priority
integer
Request priority number, being 1 the lowest priority and 4 the highest priority.
1
2
3
4
related_to_id
integer
ID of the object (failure or scheduled work) related to the quote.
related_to_type
string
Type of object related to the quote.
FAILURE
SCHEDULED_WORK
Example: FAILURE
request_id
integer
read-only
ID of the Request.
state
string
State of the Request.
PENDING
RUNNING
COMPLETED
CANCELLED
Example: PENDING
stock_consumed
boolean
Indicates if the the stock was consumed, with the Status change to `COMPLETED`.
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
404
message
string
Example: Resource not found
more_info
string | null
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/requests/{requestId}' \
-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/requests/{requestId}', {
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/requests/{requestId}');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/requests/{requestId}',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()