vscgames
  • Welcome
  • Getting Started
    • CreateAPIKey
    • CreateMerchantKey
  • Products
  • Mutations
    • buyVoucher
    • FreeFireTopupOrder
    • DeltaForceTopupOrder
    • FreeFireMerchantTopup
    • DeltaForceMerchantTopupOrder
  • Queries
    • getProductsByCategory
    • getProductById
    • getOrderById
    • getUserOrders
    • getTopupsProducts
    • getTopupProduct
    • getPlayerDetails
    • getTopupOrder
    • getUserTopupOrders
  • REST API
    • COMING soon
  • CONTACT
    • Support
Powered by GitBook
On this page
  1. Queries

getUserOrders

Last Updated 11th May, 2025

The getUserOrders query returns a list of all orders placed by an authenticated user, sorted from newest to oldest.


๐Ÿ”— Endpoint

URL: https://api.vscgames.com/graphql Method: POST Content-Type: application/json


๐Ÿ” Query Structure

query {
  getUserOrders {
    orderId
    productId
    name
    amount
    quantity
    playerID
    player_name
    status
    ordertime
    date
  }
}

๐Ÿ“ฅ Headers

Header
Required
Description

apikey

โœ… Yes

API key of the user


โœ… Successful Response

{
  "data": {
    "getUserOrders": [
      {
        "orderId": "ORD123456",
        "productId": "abc123",
        "name": "Free Fire 110 Diamonds",
        "amount": 1.66,
        "quantity": 1,
        "playerID": "2265245647",
        "player_name": "JJ_MUCH",
        "status": "successful",
        "ordertime": "2025-05-11T15:30:00Z",
        "date": "2025-05-11T15:30:00Z"
      },
      ...
    ]
  }
}

๐Ÿšซ Error Responses

Message
Reason

API key required

apikey header is missing

Invalid API key

API key does not match any user


๐Ÿงช Code Examples

Python

import requests

url = "https://api.vscgames.com/graphql"
headers = {
    "Content-Type": "application/json",
    "apikey": "YOUR_API_KEY"
}

query = """
query {
  getUserOrders {
    orderId
    productId
    name
    amount
    quantity
    playerID
    player_name
    status
    ordertime
    date
  }
}
"""

response = requests.post(url, json={"query": query}, headers=headers)
print(response.json())

JavaScript

const fetch = require("node-fetch");

const query = `
query {
  getUserOrders {
    orderId
    productId
    name
    amount
    quantity
    playerID
    player_name
    status
    ordertime
    date
  }
}`;

fetch("https://api.vscgames.com/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "apikey": "YOUR_API_KEY"
  },
  body: JSON.stringify({ query })
})
  .then(res => res.json())
  .then(data => console.log(data));
PreviousgetOrderByIdNextgetTopupsProducts

Last updated 23 days ago