Wait for a status change on a given pump
Uses long polling to wait for a status change on a given pump. Returns as soon as the status has changed or after the number of seconds provided by the optional timeout
query parameter (default timeout is 30 seconds). In case of timeout (408 status code) you're safe to start the request again. Instantaneously returns if lastStatus
was given and already changed between request. If successful, it returns the same structure as the normal status call
Only use after approaching, otherwise returns 403 Forbidden
.
Query parameters
-
Use long polling for status updates
Value is
longPolling
. -
Pump status
Values are
free
,inUse
,readyToPay
,locked
,inTransaction
, oroutOfOrder
. -
Timeout in seconds
Responses
-
OK
-
Bad request
-
OAuth token missing or invalid or a linked identity is missing.
Linked identity missing is a special case where you need to make sure that the user has additionally logged in / authorized with a third-party.
This is not relevant for most use-cases.
The specific error code that identifies a missing linked identity is
missing-linked-identity
Example:
{ "errors": [ { "id": "cbgmhslmp1o9or9kh1p0", "title": "Missing linked identity for authorized access", "detail": "Linked identity is needed to access this resource, please check why the user does not have a linked identity", "status": "401", "code": "missing-linked-identity" } ] }
-
Forbidden
-
Resource not found
-
The specified accept header is invalid
-
Your request timed out
-
Resource is gone
-
Internal server error
-
Error occurred while communicating with PACE services
curl \
--request GET 'https://api.pace.cloud/fueling/2024-3/gas-stations/a6ec9bd7-cf0b-416c-b24f-9ce65ab3dfe1/pumps/4665fddc-83fe-46bd-85ae-110d71e78357/wait-for-status-change' \
--header "Authorization: Bearer $ACCESS_TOKEN"
{
"data": {
"id": "baca9c76-82bf-44e7-b8b0-8af44fa4998b",
"type": "pump",
"attributes": {
"VAT": {
"rate": 0.19,
"amount": 9.72
},
"status": "readyToPay",
"currency": "EUR",
"fuelType": "ron95e10",
"fuelAmount": 44.3,
"identifier": "3",
"productName": "Super E10",
"priceWithoutVAT": 51.37,
"priceIncludingVAT": 61.09
}
}
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}
{
"errors": [
{
"id": "string",
"links": {
"about": "string"
},
"status": "string",
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}