API Documentation Overview

1. Get Account Details

Endpoint: GET https://demo.wongate.com/api/account/details

Description: Retrieves details of the account associated with the provided API key.

2. Get All Items

Endpoint: GET https://demo.wongate.com/api/items/all

Description: Retrieves all items associated with the provided API key.

3. Get An Item Details

Endpoint: GET https://demo.wongate.com/api/items/item

Description: Retrieves details of a specific item based on the provided item ID and API key.

4. Purchase Validation

Endpoint: POST https://demo.wongate.com/api/purchases/validation

Description: Validate a purchase code and returns details about the purchase if valid.

Authentication

Navigate to Workspace Settings

The user should first log in to their account on the platform. Then, they can navigate to the "Settings" section of their workspace.

Locate API Key Section

Within the workspace settings, the user should look for a section specifically labeled "API Key" or "API Access."

Generate or Retrieve API Key

In this section, the user can either generate a new API key or retrieve an existing one if it has been previously generated. If there is an option to generate a new key, the user can click on it to create a fresh API key.

Copy the API Key

Once the API key is generated or retrieved, the user should be able to see it displayed on the screen. They can simply click on a button or icon next to the key to copy it to their clipboard.

Use the API Key

With the API key copied, the user can now use it to authenticate their requests when accessing the platform API endpoints. They typically need to include the API key as part of the request headers or parameters, depending on the API authentication mechanism.

Secure the API Key

Its essential to remind users to keep their API keys secure and not share them publicly. They should avoid hardcoding API keys in client-side code or sharing them in publicly accessible repositories. Instead, they should consider storing the API key securely on their server-side applications and using appropriate access controls.

Get Account Details

Retrieves details of the account associated with the provided API key

Endpoint

GET
https://demo.wongate.com/api/account/details

Parameters

  • api_key: Your API key (Required)

Responses

Success Response:

{
    "status": "success",
    "data": {
        "name": {
            "firstname": "John",
            "lastname": "Doe",
            "full_name": "John Doe"
        },
        "username": "johndoe",
        "email": "[email protected]",
        "balance": 100.00,
        "currency": "USD",
        "profile": {
            "heading": "Profile Heading",
            "description": "Profile Description",
            "contact": {
                "email": "[email protected]"
            },
            "social_links": [
                "facebook": "/",
                "x": "/",
                // etc...
            ],
            "media": {
                "avatar": "https://example.com/avatar.jpg",
                "cover": "https://example.com/cover.jpg"
            }
        },
        "registered_at": "2024-04-27T12:00:00Z"
    }
}

Error Response:

{
    "status": "error",
    "msg": "Invalid request"
}

Get All Items

Retrieves all items associated with the provided API key

Endpoint

GET
https://demo.wongate.com/api/items/all

Parameters

  • api_key: Your API key (Required)

Responses

Success Response:

{
    "status": "success",
    "items": [
        {
            "id": 1,
            "name": "Sample Item",
            "description": "This is a sample item",
            "category": "Category Name",
            "sub_category": "Subcategory Name",
            "options": ["option1", "option2"],
            "version": 1.0.0,
            "demo_link": "https://example.com/demo",
            "tags": ["tag1", "tag2"],
            "media": {
                "thumbnail": "https://example.com/thumbnail.png",
                "preview_image": "https://example.com/preview.jpg", // This is not included for audio items
                "preview_video": "https://example.com/video.mp4", // This is only included for video items
                "preview_audio": "https://example.com/audio.mp3", // This is only included for audio items
                "screenshots": [ // This is only included if item has screenshots
                    "https://example.com/screenshot1.jpg",
                    "https://example.com/screenshot2.jpg"
                ],
            },
            "price": {
                "regular": 19.99,
                "extended": 29.99
            },
            "currency": "USD",
            "published_at": "2024-04-27T12:00:00Z"
        },
        {
            // Next item...
        }
    ]
}

Error Response:

{
    "status": "error",
    "msg": "No items found"
}

Get An Item Details

Retrieves details of a specific item based on the provided item ID and API key.

Endpoint

GET
https://demo.wongate.com/api/items/item

Parameters

  • api_key: Your API key (Required)
  • item_id: The ID of the item to retrieve (Required)

Responses

Success Response:

{
    "status": "success",
    "item": {
        "id": 1,
        "name": "Sample Item",
        "description": "This is a sample item",
        "category": "Category Name",
        "sub_category": "Subcategory Name",
        "options": ["option1", "option2"],
        "version": 1.0.0,
        "demo_link": "https://example.com/demo",
        "tags": ["tag1", "tag2"],
        "media": {
            "thumbnail": "https://example.com/thumbnail.png",
            "preview_image": "https://example.com/preview.jpg", // This is not included for audio items
            "preview_video": "https://example.com/video.mp4", // This is only included for video items
            "preview_audio": "https://example.com/audio.mp3", // This is only included for audio items
            "screenshots": [ // This is only included if item has screenshots
                "https://example.com/screenshot1.jpg",
                "https://example.com/screenshot2.jpg"
            ],
        },
        "price": {
            "regular": 19.99,
            "extended": 29.99
        },
        "currency": "USD",
        "published_at": "2024-04-27T12:00:00Z"
    }
}

Error Response:

{
    "status": "error",
    "msg": "Item Not Found"
}

Purchase Validation

Validate a purchase code and returns details about the purchase if valid.

Endpoint

POST
https://demo.wongate.com/api/purchases/validation

Parameters

  • api_key: Your API key (Required).
  • purchase_code: The purchase code to validate (Required).

Responses

Success Response:

{
    "status": "success",
    "data": {
        "purchase": {
            "purchase_code": "abcdefghijklmnopqrstuvwxyz123456789",
            "license_type": "Regular",
            "price": 19.99,
            "currency": "USD",
            "item": {
                "id": 1,
                "name": "Sample Item",
                "description": "This is a sample item",
                "category": "Category Name",
                "sub_category": "Subcategory Name",
                "options": ["option1", "option2"],
                "version": 1.0.0,
                "demo_link": "https://example.com/demo",
                "tags": ["tag1", "tag2"],
                "media": {
                    "thumbnail": "https://example.com/thumbnail.png",
                    "preview_image": "https://example.com/preview.jpg", // This is not included for audio items
                    "preview_video": "https://example.com/video.mp4", // This is only included for video items
                    "preview_audio": "https://example.com/audio.mp3", // This is only included for audio items
                    "screenshots": [ This is only included if item has screenshots
                        "https://example.com/screenshot1.jpg",
                        "https://example.com/screenshot2.jpg"
                    ],
                },
                "price": {
                    "regular": 19.99,
                    "extended": 29.99
                },
                "currency": "USD",
                "published_at": "2024-04-27T12:00:00Z"
            },
            "supported_until": "2024-04-27T12:00:00Z", // This will not exist if support is disabled or its not supported
            "downloaded": false,
            "date": "2024-04-27T12:00:00Z"
        }
    }
}

Error Response:

{
    "status": "error",
    "msg": "Invalid purchase code"
}

Wongate Hybrid Licensing API

Wongate uses a hybrid model: the license is signed by Gibemart, activation is online and domain-bound, and successful activation returns a signed activation certificate. Wongate periodically validates online and may continue locally only until the signed grace period expires.

Endpoints

  • POST /api/license/v1/activate — first activation and domain binding.
  • POST /api/license/v1/validate — periodic entitlement/revocation check.
  • POST /api/license/v1/issue — internal marketplace endpoint; not for buyer applications.
  • POST /api/license/v1/revoke — administrator-only revocation.

Activate

POST https://YOUR-GIBEMART-DOMAIN/api/license/v1/activate
Content-Type: application/json

{
  "license": "BASE64URL_PAYLOAD.BASE64URL_SIGNATURE",
  "domain": "client.example.com",
  "product_slug": "wongate",
  "installation_id": "uuid-generated-once-by-the-installation"
}

On success the response contains activation_certificate. Store it locally; it is signed and contains the bound domain, installation ID, next validation time and offline grace deadline.

Validate

POST https://YOUR-GIBEMART-DOMAIN/api/license/v1/validate
Content-Type: application/json

{
  "license": "BASE64URL_PAYLOAD.BASE64URL_SIGNATURE",
  "domain": "client.example.com",
  "product_slug": "wongate",
  "installation_id": "same-installation-uuid"
}

Client behavior

  1. Verify the Ed25519 license locally.
  2. On first activation, require a successful Gibemart activation response.
  3. Verify and store the signed activation certificate.
  4. Before next_validation_at, local verification is sufficient.
  5. After that time, call /validate. If the authority is unavailable, the installation remains valid only until grace_until.
  6. After the grace deadline, deny protected application use until validation succeeds.

Security rules

Never ship the Gibemart private signing key. Never call the issue endpoint from a buyer installation. Never treat an HTTP success alone as proof of entitlement: the buyer verifies the returned certificate with the pinned public key.