Skip to main content

Enable Card

Enable all fuel authorizations for a card.

POST /projects/{projectId}/cards/{cardId}/enable

Path Parameters​

ParameterTypeRequiredDescription
projectIdUUIDYesProject ID
cardIdUUIDYesCard ID

Request​

curl -X POST "https://api.maes-platform.nuvoni.eu/v1/projects/{projectId}/cards/{cardId}/enable" \
-H "Authorization: Bearer sk_live_xxxxx"

Response​

{
"id": "09c9861c-4c4b-411f-be85-c16ed7e26da4",
"status": "active",
"authGasoline": true,
"authDiesel": true,
"authLpg": true,
"authHeatingOil": true
}

Notes​

  • Only cards with status: active or status: inactive can be enabled
  • In production, this triggers a background job to update the MAES portal
  • All four fuel authorizations are enabled

Errors​

Card Not Active​

Status: 400 Bad Request

{
"code": "error.bad_request",
"message": "Card must be activated before enabling"
}

Card Already Enabled​

Status: 400 Bad Request

{
"code": "error.bad_request",
"message": "Card is already enabled"
}

Card Not Found​

Status: 404 Not Found

{
"code": "error.card_not_found",
"message": "Card not found"
}