> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/products/landing/resultados-y-callbacks/consulta-de-operaciones.md).

# Operation query

Using GET requests, it is possible to query the list of operations and the status of an operation associated with a `operationId`.

## Authentication

The following credentials are required to request operation status information.

* `x-api-key`: Landing API Key.
* `x-client-id`: Client ID associated with the API Key.

These data will be provided by the Facephi team.

***

## Services

It is possible to request the list of completed operations or the status of a specific operation via a request **GET**.

### Operation list

To obtain the list of operations, we can use a GET request to the Endpoint `https://api.landing.identity-platform.io/callback`:

```bash
curl -X 'GET' \
  'https://api.landing.identity-platform.io/callback' \
  -H 'accept: application/json' \
  -H 'x-api-key: PRIVATE_API_KEY' \
  -H 'x-client-id: PRIVATE_CLIENT_ID'
```

This will return a response with the list of operations, with the *operationId* and the *timestamp* for each one:

```json
{
  "operations": [
    {
      "operationId": "UNIQUE_OPERATION_ID_1",
      "timestamp": "2025-12-22T07:59:53.517Z"
    },
    {
      "operationId": "UNIQUE_OPERATION_ID_2",
      "timestamp": "2025-12-22T07:58:44.071Z"
    },
    ...
  ]
}
```

#### Filter operations by time:

It is possible to filter the results by date/time using the following parameters:

* `startDate`: Start time. (Format: ISO 8601, e.g.: 2024-01-01T00:00:00Z)
* `endDate`: End time. (Format: ISO 8601, e.g.: 2024-12-31T23:59:59Z)

```bash
curl -X 'GET' \
  'https://api.landing.identity-platform.io/callback?startDate=2025-12-22T07%3A52%3A57.231Z&endDate=2025-12-22T07%3A58%3A45.000Z' \
  -H 'accept: application/json' \
  -H 'x-api-key: PRIVATE_API_KEY' \
  -H 'x-client-id: PRIVATE_CLIENT_ID'
```

This type of request will return the filtered results with the operations performed in that time interval.

### Operation status

To obtain the status of an operation, we can use a GET request to the Endpoint `https://api.landing.identity-platform.io/callback/OPERATION_ID`, using the `OPERATION_ID` of the desired operation

```bash
curl -X 'GET' \
  'https://api.landing.identity-platform.io/callback/b682caa8-f0da-4fc5-a373-24a3b81a889b' \
  -H 'accept: application/json' \
  -H 'x-api-key: PRIVATE_API_KEY' \
  -H 'x-client-id: PRIVATE_CLIENT_ID'
```

#### Status request responses

These requests can resolve with the following codes:

The user has completed the operation:

* `SUCCESS`: The request was completed successfully.
* `DENIED`: The request could not be made due to missing credentials.
* `ERROR`: The request could not be made due to some type of error.

The Flow has not yet been completed by the user:

* `NOT_FINISHED`: The operation has not finished. More information will be found within this state:
  * `reason`: Reason for the status.
  * `step_result`: Flow status.

**Successful response example**:

```json
{
  "operationId": "OPERAtION_ID",
  "operation_result": "SUCCEEDED",
  "callback_result": {
    "id": "a85b2714-1968-4306-adda-cc1b20ec04a9",
    "auth": {},
    "callback": {
      "request": {
        "url": "https://webhook.site/e8865aec-75e7-4474-87ef-69280bdde8b5",
        "method": "post",
        "header": {
          "Accept": "application/json, text/plain, */*",
          "Content-Type": "application/json",
          "User-Agent": "axios/1.5.1",
          "Content-Length": "CONTENT_LENGHT",
          "Accept-Encoding": "gzip, compress, deflate, br"
        },
        "body": "RECIEVED_DATA"
      },
      "response": {
        "status": 200,
        "body": "This URL has no default content configured. <a href=\"https://webhook.site/#!/edit/e8865aec-75e7-4474-87ef-69280bdde8b5\">Change response in Webhook.site</a>."
      }
    },
    "operationId": "OPERAtION_ID",
    "landingId": "LANDING_ID",
    "timestamp": "2025-12-15T14:00:10.755Z"
  }
}
```
