# Consult Operation

Retrieves the current status and details of a cash operation using its reference number.
Use this endpoint to check the status of cash-in or cash-out operations.

Endpoint: GET /api/v1/cash/consult
Version: 1.0.0
Security: ClientAuth, HMACSignature, Timestamp

## Header parameters:

  - `X-Client-Id` (string, required)
    Client API key (32-character hex)
    Example: "4a8a08f09d37b73795649038408b5f33"

  - `X-Signature` (string, required)
    HMAC-SHA256 signature generated using api_secret
    Example: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

  - `X-Timestamp` (string, required)
    Unix timestamp (seconds since epoch)
    Example: "1705312200"

## Query parameters:

  - `reference` (string, required)
    20-digit operation reference number
    Example: "10511175512161627448"

## Response 200 fields (application/json):

  - `response_code` (string)
    Response code ("0" for success)
    Example: "0"

  - `response_text` (string)
    Response message
    Example: "Operacion encontrada"

  - `result` (object)

  - `result.operation_id` (integer)
    Unique identifier for the operation
    Example: 123

  - `result.kind` (string)
    Operation type
    Enum: "cash_in", "cash_out"

  - `result.reference` (string)
    20-digit operation reference number
    Example: "10511175512161627448"

  - `result.status` (string)
    Current operation status
    Enum: "close", "paid", "expired", "reversed"

  - `result.amount` (integer)
    Transaction amount in MXN
    Example: 500

  - `result.created_at` (string)
    ISO 8601 timestamp of operation creation
    Example: "2025-01-15T10:30:00Z"

  - `result.expire_at` (string)
    ISO 8601 timestamp when operation expires
    Example: "2025-01-18T10:30:00Z"

## Response 400 fields (application/json):

  - `response_code` (string)
    Error code identifier
    Enum: "1", "60", "64"

  - `response_text` (string)
    Human-readable error message
    Example: "Parámetros Incorrectos"

  - `result` (object)
    Additional error context

  - `result.amount` (integer)
    Requested amount (if applicable)
    Example: 100

  - `result.external_user_id` (string)
    User identifier (if applicable)
    Example: "12345"

  - `result.reference` (string)
    Reference number (if applicable)
    Example: "10511397875282322627"

## Response 401 fields (application/json):

  - `error` (string)
    Error message
    Example: "Unauthorized"


