> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vultlocal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unblock Card

> Restore a blocked NFC card

<Info>
  Unblocking restores full transaction capability to a previously blocked card.
</Info>

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer olive_live_xxx` or `Bearer eyJ...` (JWT)
</ParamField>

### Path Parameters

<ParamField path="serial" type="string" required>
  Card serial number (e.g., `OLIV0001`)
</ParamField>

### Body Parameters

<ParamField body="pin" type="string">
  Subscriber's PIN (required for self-service unblock)
</ParamField>

***

## Response

<ResponseField name="success" type="boolean">
  Whether unblock succeeded
</ResponseField>

<ResponseField name="message" type="string">
  Result message
</ResponseField>

***

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://demo.api.vultlocal.com/api/v1/cards/OLIV0001/unblock" \
    -H "Authorization: Bearer olive_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{
      "pin": "1234"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "message": "Card unblocked successfully",
    "card": {
      "serial": "OLIV0001",
      "status": "ACTIVE",
      "unblocked_at": "2025-01-20T15:30:00Z",
      "unblocked_by": "admin@olive.sl"
    }
  }
  ```

  ```json 409 Not Blocked theme={null}
  {
    "error": "Card is not blocked",
    "code": "NOT_BLOCKED"
  }
  ```
</ResponseExample>

***

## What Gets Restored

<Steps>
  <Step title="Status Updated">
    Card status changes from BLOCKED to ACTIVE
  </Step>

  <Step title="Transactions Enabled">
    POS payments and NFC tap work again
  </Step>

  <Step title="PIN Active">
    Original PIN remains unchanged
  </Step>
</Steps>

***

## Restrictions

<Warning>
  Cards blocked as "Lost" or "Stolen" **cannot** be unblocked. Issue a new card instead.
</Warning>

***

## Errors

| Status | Code              | Description                            |
| ------ | ----------------- | -------------------------------------- |
| 400    | `INVALID_PIN`     | PIN verification failed                |
| 400    | `PERMANENT_BLOCK` | Card cannot be unblocked (lost/stolen) |
| 401    | `UNAUTHORIZED`    | Invalid API key                        |
| 404    | `CARD_NOT_FOUND`  | Card serial not found                  |
| 409    | `NOT_BLOCKED`     | Card is not blocked                    |
| 500    | `INTERNAL_ERROR`  | Server error                           |

***

## Related

<Card title="Block Card" icon="ban" href="/api-reference/cards/block">
  Block a card from transactions
</Card>


## OpenAPI

````yaml olive-openapi.json POST /cards/{serial}/unblock
openapi: 3.0.0
info:
  description: >-
    API Gateway for OLIVE NFC Card Payment System - Comprehensive payment, card
    management, agent operations, and admin authentication. All /api/v1 routes
    require authentication using either API Key or JWT token.
  title: OLIVE NFC Card Payment API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    email: support@olive.sl
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://olive-gateway-a6ba.onrender.com/api/v1
security: []
paths:
  /cards/{serial}/unblock:
    post:
      tags:
        - Cards
      summary: Unblock a card
      description: Unblock a previously blocked NFC card
      parameters:
        - description: Card Serial Number
          name: serial
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.UnblockCardRequest'
        description: PIN for non-admin users
      responses:
        '200':
          description: Card unblocked
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    handler.UnblockCardRequest:
      type: object
      properties:
        pin:
          type: string
          example: '1234'
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API Key for third-party integrations (WhatsApp, Smart PAY, VULT).
        Format: 'Bearer olive_live_xxxxxxxxxxxxx'
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      description: >-
        JWT token from admin login for administrative operations. Format:
        'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
      type: apiKey
      name: Authorization
      in: header

````