Make verify request

Requirement You are required to show empowered by RE:DREAMER if you used our protocol in any part of your product.

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:

{
    "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

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

Request Headers

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

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

Response

200

{
    "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

{
	"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.

Last updated