---
title: "Revokes an issued certificate."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › certificate

`POST /v1/stores/{store}/products/{product}/certificates/issues/{issue}/revoke`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `certificate:write`

## Path parameters

- `store` (`revokeCertificateIssue.path.store`; string, required) — The store's id.
- `product` (`revokeCertificateIssue.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1
- `issue` (`revokeCertificateIssue.path.issue`; string, required)
  - minLength 1

## Header parameters

- `Idempotency-Key` (`revokeCertificateIssue.header.Idempotency-Key`; string, optional) — Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.
  - minLength 1; maxLength 255; pattern `^[\x21-\x7E]+$`

## Request body

_Optional._

## Example request

```json
{}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/certificates/issues/<issue>/revoke' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/certificates/issues/<issue>/revoke';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/certificates/issues/<issue>/revoke"

payload = {}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Revokes an issued certificate.

#### Example

```json
{
  "id": "string",
  "product_id": "string",
  "certificate_id": "string",
  "customer_id": "string",
  "score": 0,
  "attempt": 0,
  "issued_at": "string",
  "revoked_at": "string"
}
```

- `id` (`revokeCertificateIssue.response.200.id`; string, required)
- `product_id` (`revokeCertificateIssue.response.200.product_id`; string, required)
- `certificate_id` (`revokeCertificateIssue.response.200.certificate_id`; string, required)
- `customer_id` (`revokeCertificateIssue.response.200.customer_id`; string, required)
- `score` (`revokeCertificateIssue.response.200.score`; any of, required)
  - any of: `number`, `null`
- `attempt` (`revokeCertificateIssue.response.200.attempt`; any of, required)
  - any of: `number`, `null`
- `issued_at` (`revokeCertificateIssue.response.200.issued_at`; any of, required)
  - any of: `string`, `null`
- `revoked_at` (`revokeCertificateIssue.response.200.revoked_at`; any of, required)
  - any of: `string`, `null`

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`revokeCertificateIssue.response.default.type`; string, required)
  - format `uri`
- `title` (`revokeCertificateIssue.response.default.title`; string, required)
- `status` (`revokeCertificateIssue.response.default.status`; integer, required)
- `detail` (`revokeCertificateIssue.response.default.detail`; string, required)
- `code` (`revokeCertificateIssue.response.default.code`; string, optional)
- `context` (`revokeCertificateIssue.response.default.context`; object, optional)
- `reached_core` (`revokeCertificateIssue.response.default.reached_core`; boolean, optional)
- `core_answer` (`revokeCertificateIssue.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/revoke-certificate-issue/index.md
