> For the complete documentation index, see [llms.txt](https://docs.payvalida.com/api-cashout/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payvalida.com/api-cashout/api-cashout-en/consult/consult-operation.md).

# Operation

## Get Operation

<mark style="color:blue;">`GET`</mark> `https::/api.payvalida.com/cashout/v1/operation/{merchant}/{operation}`

`URL Sandbox: https://api-test.payvalida.com/v1/operation/`**`{merchant}/{operation}`**

This method allows to retrieve information of a cashout operation, showing the most relevant data of it.

#### Path Parameters

| Name                                        | Type   | Description                                                          |
| ------------------------------------------- | ------ | -------------------------------------------------------------------- |
| merchant<mark style="color:red;">\*</mark>  | string | Commerce/merchant that owns the operation (Max 30 characters)        |
| operation<mark style="color:red;">\*</mark> | string | Operation ID, generated by the commerce/merchant (Max 40 characters) |

#### Query Parameters

| Name                                       | Type   | Description                                                                                 |
| ------------------------------------------ | ------ | ------------------------------------------------------------------------------------------- |
| checksum<mark style="color:red;">\*</mark> | string | Checksum encoded in SHA512 (merchant + operation + document + FIXED\_HASH) (512 characters) |
| document<mark style="color:red;">\*</mark> | number | ID or reference associated with the operation (Max 20 characters)                           |

{% tabs %}
{% tab title="200 Returns a Json following this structure:" %}

```
{  
   "code":"0000",
   "text":"OK",
   "data":{
      "amount":"45000.0",
      "transactionCost":"2000.0",
      "currency":"COP",
      "description":"Retiro dividendos",
      "document":"986157352",
      "sms":"false",
      "cellphone":"3015555555",
      "operation":"15249",
      "expire":"01122019",
      "update":"01122019",
      "status":"APROBADA"
   }
}
```

{% endtab %}
{% endtabs %}

## Response data

**code:** Code of the result, "0000" indicates success, any other indicates an error&#x20;

**text:** Contains the message associated with the **code** that was sent.&#x20;

**data:** Contains the transaction's data (empty if an error occurs)&#x20;

* **amount:** Transaction amount &#x20;
* **transactionCost:** The cost the user assumes for executing the transaction&#x20;
* **currency:** Registered currency for the cashout operation&#x20;
* **description:** Description of the operation &#x20;
* **document:** Identification number&#x20;
* **sms:** Indicates if the OTP was sent to the end user via SMS&#x20;
* **cellphone:** Phone number where the OTP will be sent&#x20;
* **operation:** Operation ID, generated by the commerce&#x20;
* **expire:** Expiration date of the operation&#x20;
* **update:** Las modified date of the operation&#x20;
* **status:** Operation status&#x20;

## Possible Statuses

* Aprobada (approved): Cashout was processed successfully&#x20;
* Vencida (expired): Cashout wasn't processed before due date&#x20;
* Cancelada (cancelled): The operation was cancelled by the commerce/merchant
* Anulada (nullified): The operation was nullified by Payvalida
* Pendiente (pending): The operation is waiting for the completion of cashout&#x20;
