MZR GAMES Public API Documentation

Last Updated: 13 Feb 2025 01:00 AM UTC

Welcome to the MZR GAMES Public API documentation. This guide provides details about the API, authentication methods, request/response formats, and error handling.

Base URL

https://mzr-games.upgrow.uz/

Table of Contents

Authentication

Public Access

Header: X-API-Key

Description: Some endpoints require an API key for access. Obtain an API key from the MZR GAMES Telegram Bot.

Public Endpoints

Get Me

Endpoint: GET /v1/getMe

Authentication: X-API-Key

Response: JSON object containing user details.

{
  "balance": 8.74,
  "first_name": "John Doe",
  "success": true,
  "user_id": 123456789,
  "username": "username"
}

Get All Categories

Endpoint: GET /v1/category

Authentication: None

Response: JSON list of categories.

{
  "success": true,
  "categories": [
    {
      "id": 1,
      "title": "PUBG Mobile UC Vouchers",
      "description": "",
      "product_count": 11
    },
    {
      "id": 2,
      "title": "Razer Gold Accounts",
      "description": "",
      "product_count": 0
    },
    {
      "id": 3,
      "title": "Itunes USA",
      "description": "",
      "product_count": 0
    }
  ]
}

Get All Products

Endpoint: GET /v1/products

Authentication: None

Response: JSON list of products.

{
  "success": true,
  "products": [
    {
      "id": 1,
      "title": "60 UC Voucher",
      "description": "",
      "category_id": 1,
      "category_title": "PUBG Mobile UC Vouchers",
      "unit_price": 0.84,
      "stock": 1006
    },
    {
      "id": 2,
      "title": "325 UC Voucher",
      "description": "",
      "category_id": 1,
      "category_title": "PUBG Mobile UC Vouchers",
      "unit_price": 4.2,
      "stock": 0
    },
    {
      "id": 3,
      "title": "660 UC Voucher",
      "description": "",
      "category_id": 1,
      "category_title": "PUBG Mobile UC Vouchers",
      "unit_price": 8.4,
      "stock": 0
    }
  ]
}

Get All Products From Specific Category

Endpoint: GET /v1/category/:id

Authentication: None

Response: JSON list of products.

{
  "success": true,
  "products": [
    {
      "id": 1,
      "title": "60 UC Voucher",
      "description": "",
      "category_id": 1,
      "category_title": "PUBG Mobile UC Vouchers",
      "unit_price": 0.84,
      "stock": 1006
    },
    {
      "id": 2,
      "title": "325 UC Voucher",
      "description": "",
      "category_id": 1,
      "category_title": "PUBG Mobile UC Vouchers",
      "unit_price": 4.2,
      "stock": 0
    }
  ]
}

Get Product by ID

Endpoint: GET /v1/products/:id

Authentication: None

Response: JSON representation of the product.

{
  "product": {
    "id": 1,
    "title": "60 UC Voucher",
    "description": "",
    "category_id": 1,
    "category_title": "PUBG Mobile UC Vouchers",
    "unit_price": 0.84,
    "stock": 1006
  },
  "success": true
}

Purchase Product

Endpoint: POST /v1/products/:id/purchase

Authentication: X-API-Key

Request Body:

{
  "quantity": 1
}

Response: Purchase confirmation.

Response Body:

{
  "success": true,
  "order_id": 123,
  "transaction_id": 123,
  "product_id": 1,
  "product_title": "Product Title",
  "delivery_items": [
    "arrayOfSecretKeys",
    "..."
  ]
}

Get All Orders

Endpoint: GET /v1/orders

Authentication: X-API-KEY

Response: JSON list of orders.

{
  "success": true,
  "orders": [
    {
      "id": 1,
      "user_id": 123456789,
      "product_id": 1,
      "product_title": "60 UC Voucher",
      "quantity": 1,
      "total_price": 0.84,
      "status": "COMPLETED",
      "description": "Purchase from MZR GAMES Bot"
    },
    {
      "id": 2,
      "user_id": 123456789,
      "product_id": 1,
      "product_title": "60 UC Voucher",
      "quantity": 10,
      "total_price": 8.4,
      "status": "COMPLETED",
      "description": "Purchase from MZR GAMES Bot"
    },
    {
      "id": 3,
      "user_id": 123456789,
      "product_id": 1,
      "product_title": "60 UC Voucher",
      "quantity": 3,
      "total_price": 2.52,
      "status": "COMPLETED",
      "description": "Purchase from MZR GAMES Bot"
    }
  ]
}

Get Order by ID

Endpoint: GET /v1/orders/:id

Authentication: X-API-KEY

Response: JSON representation of the order.

{
  "order": {
    "id": 1,
    "user_id": 123456789,
    "product_id": 1,
    "product_title": "60 UC Voucher",
    "quantity": 1,
    "total_price": 0.84,
    "status": "COMPLETED",
    "description": "Purchase from MZR GAMES Bot"
  },
  "success": true
}

Get PUBG Mobile Recharge Offers

Endpoint: GET /v1/topup/pubgMobile/offers

Authentication: None

Response: JSON list of the offers.

{
  "success": true,
  "offers": [
    {
      "id": 1,
      "title": "60 UC Voucher",
      "unit_price": "0.834",
      "stock": 9962
    },
    {
      "id": 2,
      "title": "325 UC Voucher",
      "unit_price": "4.171",
      "stock": 0
    },
    {
      "id": 3,
      "title": "660 UC Voucher ",
      "unit_price": "8.341",
      "stock": 0
    }
  ]
}

Purchase PUBG Mobile Recharge Offer

Endpoint: POST /v1/topup/pubgMobile/offers/:id/purchase

Authentication: X-API-KEY

Request Body:

{
  "player_id": "123456789"
}

Response: Confirmation of the purchase.

{
  "success": true,
  "topup_id": 58,
  "message": "We are processing your order. Thank you."
}

Manual order

Endpoint: POST /v1/manual/order

Authentication: X-API-KEY

Request Body:

{
  "product_id": 1,
  "count": 2,
  "pubg_id": "123456789"
}

Response:

{
  "success": true,
  "order_id": 1,
  "total_price": 50
}

Manual Order Chack Status

Endpoint: GET /v1/order/status/order_id

Authentication: X-API-KEY

Response:

{
  "id": 1,
  "product_id": 1,
  "product_title": "100 USD 805000 TOKEN",
  "quantity": 1,
  "total_price": "50.000",
  "status": "COMPLETED"
}

Rate Limiting

Error Handling

Status Code
Meaning
400
Bad Request - Invalid request format
401
Unauthorized - Authentication failed
404
Not Found - Requested resource does not exist
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error - An unexpected error occurred

Support

For questions, issues, or API key requests, contact our support team.