<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/partners-api/settings/webhook/get-webhook

# Get Webhook

`GET https://partners.99digital.co.il/api/settings/getWebhook`

Part 2: get the webhook address. Get Webhook allows you to see the partner webhook URL you set.

The URL is empty until you set one with
[Set Webhook](https://docs.99digital.co.il/partners-api/settings/webhook/set-webhook). See
[Webhook](https://docs.99digital.co.il/partners-api/settings/webhook) for what is sent to it.

**Settings:**

| Setting | Value |
| --- | --- |
| URL | `https://partners.99digital.co.il/api/settings/getWebhook` |
| Method | GET |
| Header | `Authorization: Bearer <access_token>` — the access token is received from [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). |

**Body:** nothing, leave it empty. There are no parameters either: the
access token tells us your partner account.

**Response:**

```json
{
  "status": "OK",
  "url": "https://your-server.example.com/99digital/partners-webhook",
  "reason": 1
}
```

**Response explained:**

| Parameter | Description |
| --- | --- |
| `status` | OK or FAIL. "OK" means the request was successful. "FAIL" means error. |
| `url` | The webhook URL. Empty when no webhook is set. |
| `reason` | The status explanation — see below. |

| Reason | Explanation |
| --- | --- |
| 1 | Not FAIL. The status is OK. |
| 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer <token>`, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). |
| 3 | Access token does not exist or expired. Please generate another one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token). |
| 4 | Server error, try again. |
| 13 | You need to use the GET method. |

## Remarks

- Call it with GET. Other methods answer with HTTP 405 (Method Not
  Allowed).
- Send your partner access token. A token created with an Online account's
  **Account API Credentials** is rejected with reason 2.

## Authentication

`Authorization: Bearer <token>` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour.

## Responses

### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | (one of: OK) OK means the request was successful. Always `OK`. |
| `url` | string | (one of: OK) The webhook URL. Empty when no webhook is set. Example: `https://your-server.example.com/99digital/partners-webhook`. |
| `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. |
| `status` | string | (one of: FAIL) FAIL means error; `reason` says why. Always `FAIL`. |
| `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer <token>`, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `13` — You need to use the GET method. |

#### Example: OK

Your webhook URL.

```json
{
  "status": "OK",
  "url": "https://your-server.example.com/99digital/partners-webhook",
  "reason": 1
}
```

#### Example: No webhook

No webhook is set yet — `url` is empty.

```json
{
  "status": "OK",
  "url": "",
  "reason": 1
}
```

#### Example: Reason 3

The access token is wrong or expired.

```json
{
  "status": "FAIL",
  "reason": 3
}
```
