Lock/Unlock Customer Temporarily
This endpoint allows partners to temporarily lock or unlock a customer's profile by updating the account status based on the provided profile ID. When locked, the customer loses access to their account and card transactions are optionally suspended. When unlocked, normal account access is restored.
Endpoint
POST /netevia/lock/{profileId}
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint to temporarily restrict a customer's account access during sensitive operations such as account investigations, suspected fraud, or security reviews. It is also useful when a customer requests a temporary hold on their account, or when a partner needs to suspend access while account changes are being processed.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| profileId | string | Yes | The unique identifier of the customer profile to lock or unlock |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| profileId | integer (int32) | No | The profile ID of the customer (should match the path parameter) |
| notes | string | No | Optional notes or reason for the lock/unlock action |
| isLocked | boolean | Yes | Set to true to lock the account; false to unlock it |
| cardsUpdateType | integer (int32) | No | Controls how payment cards are affected: 0 = no change, 1 = lock cards, 2 = unlock cards |
{
"profileId": 10045,
"notes": "Temporary lock pending fraud review",
"isLocked": true,
"cardsUpdateType": 1
}Response
200 OK
| Field | Type | Description |
|---|---|---|
| profileId | integer (int32) | The profile ID of the affected customer |
| errors | string | Error message if the operation encountered issues; null on success |
| success | boolean | Indicates whether the lock/unlock operation was successful |
| changeLog | array | List of changes applied during this operation |
| changeLog[].requestType | integer (int32) | Enum value representing the type of banking request that was processed |
| changeLog[].changes | string | Description of the specific change that was made |
| financialAccountId | string | (If present) The financial account ID associated with the profile — returned when the response includes account-level changes |
{
"profileId": 10045,
"errors": null,
"success": true,
"changeLog": [
{
"requestType": 3,
"changes": "Account status updated to locked"
}
]
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields or validation error (e.g., invalid cardsUpdateType value) |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to lock/unlock this profile |
| 404 | Profile ID not found |
| 500 | Internal server error |
Common Mistakes
- Setting
isLocked: truein the request body but providing a differentprofileIdin the body than in the path — the path parameter takes precedence for identifying the profile - Not specifying
cardsUpdateTypewhen intending to also lock or unlock associated payment cards, resulting in cards remaining in their previous state - Forgetting to unlock the profile after a temporary security hold, leaving the customer permanently locked out
- Using
cardsUpdateType: 2(unlock cards) while settingisLocked: true(locking the account), which creates an inconsistent state where the account is locked but cards remain active
Related Endpoints
POST /netevia/boarding/business— Create a new business customer profilePOST /netevia/boarding/personal— Create a new personal customer profilePUT /netevia/profile/{profileId}— Update customer profile detailsGET /netevia/profile/{profileId}— Retrieve customer profile information
Example
curl -X POST https://api.banking.netevia.dev/netevia/lock/10045 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"profileId": 10045,
"notes": "Temporary lock pending fraud review",
"isLocked": true,
"cardsUpdateType": 1
}'