Idempotent Requests
These endpoints support idempotency; you can safely submit the same request multiple times without accidentally creating duplicate entities.
How It Works
- The client generates an idempotency key and sends a
POST
/PATCH
request to the endpoint.
Your system generates the idempotency key; it can have a maximum of 64 characters and send it in the
x-idempotency-key
header. -
The Enfuce server checks cache and returns an appropriate result.
- First request: If the idempotency key is new, the enfuce server processes the API request and caches the successful response. If the request has an error, the enfuce server returns an appropriate HTTP error response code.
- Retries with same idempotency key: If the request is successfully processed, the enfuce server just returns the cached response (no additional outcome). If the request has an error, the enfuce server returns an appropriate HTTP error response code.
- The enfuce server retains a successful response for 24 hours. After 24 hours, the cached response and the idempotency key expire; subsequent requests containing the same key are treated as new requests.
- Errors are not persisted; we treat each retry as a fresh attempt. Based on the HTTP error response code you receive, modify the request and recall the endpoint.
Endpoints
Create a Multi-application card
POST /v1/MULTI_APPLICATION_CARD/customer/{customerId}
Create a MasterCard branded card
POST /v4/MC_CARD/customer/{customerId}/account/{accountId}/{cardRole}
Create a virtual Mastercard branded card
POST /v4/MC_VIRTUAL/customer/{customerId}/account/{accountId}/{cardRole}
Create a debit Mastercard branded card
POST /v4/DEBIT_MC/customer/{customerId}/account/{accountId}
Create a debit Mastercard VIRTUAL branded card
POST /v4/DEBIT_MC_VIRTUAL/customer/{customerId}/account/{accountId}
Create a VISA branded card
POST /v4/VISA_CARD/customer/{customerId}/account/{accountId}/{cardRole}
Create a virtual VISA branded card
POST /v4/VISA_VIRTUAL/customer/{customerId}/account/{accountId}/{cardRole}
Create a debit VISA branded card
POST /v4/DEBIT_VISA/customer/{customerId}/account/{accountId}
Create a debit VISA VIRTUAL branded card
POST /v4/DEBIT_VISA_VIRTUAL/customer/{customerId}/account/{accountId}
Create a fleet card
POST /v4/{fleetTemplate}/customer/{customerId}/account/{accountId}/{cardRole}
Create card (Deprecated)
POST /v3/customer/{customerId}/account/{accountId}/{cardRole}