# One request by its id

`GET /requests/{requestId}`

Requires the `businesses` scope.

The request log's row for one call, looked up by the `X-Request-Id` its response carried (or the `request_id` of an error body). On an error, `guide` says what its `reason` means and what to change. No bodies are kept, so none are returned.

## Path parameters

| Name | Type | | Description |
|---|---|---|---|
| `requestId` | string | **required** |  |

## Response

`200`: `{ "ok": true, … }`

| Field | Type | | Description |
|---|---|---|---|
| `ok` | boolean | **required** |  |
| `request` | ApiRequest | **required** | One call made with your key, as the request log recorded it. |
| `guide` | ErrorGuide |  | What an error reason means and what to change, from the same table the API answers errors with (the Errors page). |

Errors: `400`, `401`, `403`, `404`, `429`. Every failure answers `{ "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }`: branch on `reason`, and read `hint` for what to change (https://docs.billos.co.il/errors.md).

## Examples

### cURL

```bash
curl -X GET "$BASE/requests/{requestId}" \
  -H "X-Api-Key: $KEY"
```
### Node

```node
const res = await fetch(`${BASE}/requests/{requestId}`, {
  method: 'GET',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
```
### Python

```python
import requests
res = requests.get(
    f"{BASE}/requests/{requestId}",
    headers={"X-Api-Key": KEY},
)
data = res.json()
```