Suspend Key
Overview
This endpoint is used to suspend (temporarily deactivates) a specific Bre-B key associated with a customer account.
Endpoint Details
Definition | Description |
---|---|
Endpoint | https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts/keys/suspend |
Method | PATCH |
Headers | Content-type: application/json, Authorization |
Authentication | Access Token (Bearer Token) |
Request Body
Parameter | Type | Description |
---|---|---|
id | string | The unique identifier of the key to suspend. |
Example Request
6
curl --location --request PATCH 'https://bre-b-sandbox.api.visionamos.passportfintech.com/v1/paas/entities/customers/accounts/keys/suspend' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 33f3ea089c0cb5d6beac9a19c533efc3d38461c47cafcfe319fb61755b863202' \
--data '{
"id": "591883bc-d138-4693-9cd0-c11e5da05207"
}'
Response
- HTTP Status Code: 200 OK.
- The response will contain the key status:
SUSP
(suspended)
Example of Response
3
3
{
"key_status": "SUSP"
}
Common Errors and Handling
HTTP Status Code | Meaning | Description |
---|---|---|
400 | Bad Request | Missing or invalid id field |
401 | Unauthorized | Missing or invalid bearer token |
403 | Forbidden | Insufficient scope or access rights |
404 | Not Found | Key with given id does not exist |
Best Practices
- Refresh OAuth tokens before they expire to avoid authentication failures.
- Validate input data like the
id
before sending to reduce 400 Errors.