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
.
Path parameters
-
Gas station ID
-
Pump ID
Query parameters
-
update string
Use long polling for status updates
Value is
longPolling
. -
lastStatus string
Pump status
Values are
free
,inUse
,readyToPay
,locked
,inTransaction
, oroutOfOrder
. -
timeout integer
Timeout in seconds
Responses
-
200 application/vnd.api+json
OK
-
400 application/vnd.api+json
Bad request
-
401 application/vnd.api+json
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" } ] }
-
403 application/vnd.api+json
Forbidden
-
404 application/vnd.api+json
Resource not found
-
406 application/vnd.api+json
The specified accept header is invalid
-
408 application/vnd.api+json
Your request timed out
-
410 application/vnd.api+json
Resource is gone
-
500 application/vnd.api+json
Internal server error
-
502 application/vnd.api+json
Error occurred while communicating with PACE services
curl \
-X GET https://api.pace.cloud/fueling/2024-2/gas-stations/a6ec9bd7-cf0b-416c-b24f-9ce65ab3dfe1/pumps/4665fddc-83fe-46bd-85ae-110d71e78357/wait-for-status-change \
-H "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": {}
}
]
}