# Block Card 

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/partner/enKashCard/block:
    post:
      summary: 'Block Card '
      deprecated: false
      description: >-

        :::highlight purple 📌

        This API is used to block a card, immediately preventing any further
        transactions. Use this endpoint to secure the card in cases of loss,
        theft, or suspicious activity

        :::
      operationId: blockCard
      tags:
        - Prepaid Cards/APIs - Prepaid Card/Reloadable Prepaid Cards
      parameters:
        - name: authorization
          in: header
          description: >-
            Provide your bearer token in the Authorization header when making
            requests to protected resources.
          required: true
          example: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379
          schema:
            type: string
        - name: partnerId
          in: header
          description: PartnerID shared during sign-up
          required: true
          example: ' CRXXXXXXX'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-apidog-refs:
                01JJBJERXJ8MH7R006PMDVH6QX:
                  $ref: '#/components/schemas/EnkashCardBlockRequest'
                  x-apidog-overrides: {}
              x-apidog-orders:
                - 01JJBJERXJ8MH7R006PMDVH6QX
                - otpRequired
              properties:
                companyId:
                  type: string
                  description: >-
                    Unique EnKash Company ID. This is the ID assigned to a
                    company onboarded on the EnKash platform.
                cardAccountId:
                  type: string
                  description: >-
                    Unique EnKash Account ID. This is the ID assigned to the
                    account created under the company.
                enKashCardId:
                  type: string
                  description: Unique identifier for the EnKash card.
                blockCode:
                  type: string
                  enum:
                    - L
                    - UL
                    - BL
                    - AP
                  description: >-
                    Card status after card is blocked. Possible values are L -
                    Locked, UL - Unlocked, BL - Blocked, AP - Activation
                    InProgress.
                reason:
                  type: string
                  description: Reason for blocking the card.
                otpMedium:
                  type: string
                  enum:
                    - MOBILE
                    - MFA
                  description: ' Medium for OTP. Allowed values are MOBILE and MFA.'
                otpRequestId:
                  type: string
                  description: Indicates if OTP is required for this operation.
                otp:
                  type: string
                  description: OTP received by the user.
                createdBy:
                  type: string
                  description: ' Identifier of the user who created the request.'
                mfaCode:
                  type: string
                  description: Authenticator code when otpMedium is MFA.
                otpRequired:
                  type: boolean
                  x-apidog-mock: 'false'
                  description: to be passed as false
              required:
                - companyId
                - cardAccountId
                - enKashCardId
                - blockCode
                - otpMedium
                - otpRequired
              x-apidog-ignore-properties:
                - companyId
                - cardAccountId
                - enKashCardId
                - blockCode
                - reason
                - otpMedium
                - otpRequestId
                - otp
                - createdBy
                - mfaCode
            example: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  payload:
                    type: string
                required:
                  - code
                  - message
                  - payload
                x-apidog-orders:
                  - code
                  - message
                  - payload
                x-apidog-ignore-properties: []
              example:
                code: 0
                message: Success
                payload: Success
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: Prepaid Cards/APIs - Prepaid Card/Reloadable Prepaid Cards
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-13438390-run
components:
  schemas:
    EnkashCardBlockRequest:
      required:
        - companyId
        - cardAccountId
        - enKashCardId
        - blockCode
        - otpMedium
      type: object
      properties:
        companyId:
          type: string
          description: >-
            Unique EnKash Company ID. This is the ID assigned to a company
            onboarded on the EnKash platform.
        cardAccountId:
          type: string
          description: >-
            Unique EnKash Account ID. This is the ID assigned to the account
            created under the company.
        enKashCardId:
          type: string
          description: Unique identifier for the EnKash card.
        blockCode:
          type: string
          enum:
            - L
            - UL
            - BL
            - AP
          description: >-
            Card status after card is blocked. Possible values are L - Locked,
            UL - Unlocked, BL - Blocked, AP - Activation InProgress.
        reason:
          type: string
          description: Reason for blocking the card.
        otpMedium:
          type: string
          enum:
            - MOBILE
            - MFA
          description: ' Medium for OTP. Allowed values are MOBILE and MFA.'
        otpRequestId:
          type: string
          description: Indicates if OTP is required for this operation.
        otp:
          type: string
          description: OTP received by the user.
        createdBy:
          type: string
          description: ' Identifier of the user who created the request.'
        mfaCode:
          type: string
          description: Authenticator code when otpMedium is MFA.
      x-apidog-orders:
        - companyId
        - cardAccountId
        - enKashCardId
        - blockCode
        - reason
        - otpMedium
        - otpRequestId
        - otp
        - createdBy
        - mfaCode
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
