Inquires discounts from discount providers
The request inquires about discounts for a specific pump and needs to be used before authorizing the payment token. After a discount offer was given the token can be authorized with the discount id in order to activate the discount.
This request is not idempotent and can return a different result on the second invocation.
Only use this if the pump status is ready to pay, otherwise returns 403 Forbidden
.
Path parameters
-
Gas station ID
-
Pump ID
Responses
-
200 application/vnd.api+json
OK
-
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
-
500 application/vnd.api+json
Internal server error
-
502 application/vnd.api+json
Error occurred while communicating with PACE services
curl \
-X POST https://api.pace.cloud/fueling/2024-2/gas-stations/583ad807-6a08-4d5a-b3f6-8861b0e355df/pumps/a4373543-4083-4f0c-a4a9-4bc458b598fd/discounts \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/vnd.api+json"
{
"data": {
"type": "discountInquiry",
"id": "a166d498-a8d6-49f0-83ef-50a42dcf7748",
"attributes": {
"paymentMethodId": "a2c93591-4ce7-42ee-8393-15bfa7239a62",
"paymentMethodKind": "paydirekt"
}
}
}
{
"data": [
{
"id": "a166d498-a8d6-49f0-83ef-50a42dcf7748",
"type": "discount",
"attributes": {
"title": "Giropay discount campaign",
"amount": 1.5,
"provider": "Giropay"
}
}
]
}
{
"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": {}
}
]
}