Get Presale Order by ID
Retrieve detailed information about a specific presale order using its unique identifier
ADMIN ONLY
Get Order by ID
Retrieve comprehensive details about a specific presale order using its unique identifier.
Admin Access Required
This query is only accessible to users with ADMIN privileges for order management and support operations.
Overview
The getPresaleById
query allows administrators to retrieve complete information about a specific presale order, including order details, status, and delivery information.
GraphQL Schema
query {
getPresaleById(
id: Int!
): PreSaleOrder
}
Parameters
id
RequiredInt
The unique ID of the presale order to retrieve.
Return Value
✓ Success Response
Returns a PreSaleOrder object containing:
Example Usage
Request
query GetSpecificOrder {
getPresaleById(id: 456) {
id
presaleId
userId
ndbAmount
destination
extAddr
status
createdAt
updatedAt
}
}
Response
{
"data": {
"getPresaleById": {
"id": 456,
"presaleId": 12,
"userId": 789,
"ndbAmount": 1000.0,
"destination": 1,
"extAddr": null,
"status": 2,
"createdAt": 1704067200,
"updatedAt": 1704153600
}
}
}
Order Retrieved
The query successfully returned the presale order details with ID 456.
Use Cases
Customer Support
Retrieve order details when assisting users with questions or issues about their presale purchases.
Order Management
Review and manage individual orders, including status updates and delivery verification.
Audit & Compliance
Access detailed order information for auditing, compliance checks, and transaction verification.
Fraud Prevention
Investigate suspicious orders by examining order patterns, amounts, and delivery addresses.
Best Practices
🔒 Access Control
Ensure proper authentication and authorization before exposing order details to prevent data leaks.
📝 Logging
Log all order lookups for audit trails, especially when accessing sensitive user information.
⚡ Cache Strategy
Implement appropriate caching for completed orders while ensuring real-time data for pending orders.
🔍 Error Handling
Handle cases where the order ID doesn't exist gracefully with appropriate error messages.