# Make verify request

{% hint style="info" %}
**Requirement** You are required to show empowered by RE:DREAMER if you used our protocol in any part of your product.
{% endhint %}

![empowered white](/files/gEjvXfdl8K6iMeRwUzvz) ![empowered black](/files/mYCm6o8AEPxDKrp5SI9G)

## Domain

* Mainnet: `mainnet-api.redreamer.io`
* Testnet: `testnet-api.redreamer.io`

## POST /api/v1/passport/:network/campaigns/:uuid/validate

Validate a QR code content.

### QR Code Content

There is a prefix `REDREAMER:` at the beginning of content for quickly identification and then follow by a base64 encoded JSON object.

```
REDREAMER:{base64(JSON object)}
```

JSON object format example:

```json
{
    "campaign_id": "a55df1fe-6bfe-40f6-9977-79d22970cbb7",
    "campaign_uuid": "a55df1fe-6bfe-40f6-9977-79d22970cbb7",
    "contract_address": "0xc5056d906640f89f31ba6eff5e893a1c1e7b0b32",
    "hash": "b677e329-68de-4adb-8c62-8592e1bbf233",
    "network": "polygon",
    "requester_address": "0x85b7ca161c311d9a5f0077d5048cadface89a267",
    "token_id": 2
}
```

### Request Parameters

* \[Required] `network`: the network of campaign (now only support `eth` and `polygon`)
* \[Required] `uuid`: campaign's uuid.

### Reqeust Body

```json
{
	"requester_address": "0x85b7ca161c311d9a5f0077d5048cadface89a267",
	"contract_address": "0xc5056d906640f89f31ba6eff5e893a1c1e7b0b32",
	"token_id": 2,
	"hash": "b677e329-68de-4adb-8c62-8592e1bbf233",
	"validator": "Optional"
}
```

### Request Headers

```json
{
	"X-API-Key": "8AetTdcKwtrOvZJcPLI5VP2qxL70_kQ9Pkn6SNECrwo="
}
```

> We provide an api key - `8AetTdcKwtrOvZJcPLI5VP2qxL70_kQ9Pkn6SNECrwo=` in testnet.

### Response

#### 200

```json
{
    "id": "a55df1fe-6bfe-40f6-9977-79d22970cbb7",
    "uuid": "a55df1fe-6bfe-40f6-9977-79d22970cbb7",
    "network": "polygon",
    "name": "RE:DREAMER TESTING EVENT",
    "description": "WELCOME TO TEST.",
    "validated_description": "Redeemed Description will displayed on PASSPORT QR code page.",
    "redeemed_description": "Validated Description can be displayed after validated.",
    "image_url": "https://passport-testnet.redreamer.io/static/media/logo.9f58bcc2.svg",
    "contract_addresses": [
        "0xc5056d906640f89f31ba6eff5e893a1c1e7b0b32"
    ],
    "start_time": "2022-10-02T16:00:00Z",
    "end_time": "2024-11-30T15:59:59Z",
    "created_at": "2022-10-03T07:33:37.703613Z",
    "updated_at": "2022-10-03T07:33:37.703613Z",
    "deleted_at": "0001-01-01T00:00:00Z"
}
```

#### 400, 500

```json
{
	"code": "ERROR_CODE"
}
```

### Error Code

* `PASSPORT_CAMPAIGN_NOT_FOUND`: campaign not found.
* `PASSPORT_NETWORK_MISMATCH`: network mismatch.
* `EXCEED_MAXIMUM_PASSPORT_REDEMPTION`: out of redemption's limit.
* `NOT_TOKEN_OWNER`: user is not token owner.
* `INVALID_PASSPORT_CAMPAIGN`: invalid campaign.
* `QR_CODE_EXPIRED`: QR code is expired.
* `INVALID_QR_CODE`: QR code is invalid.

### Test information

This QR code created in testnet and it can be verified unlimited times.

![Testnet QR code](/files/uW8Af1TcRB6R1aAEwUnK)

####


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-2022.redreamer.io/re-dreamer-labs-product/redeem-passport/verify-qr-code/make-verify-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
