API
Obtaining the API Key
To obtain the API key:
Navigate to the Settings page in the Staff Panel.
Scroll down to the API Settings section.
Ensure the Enable API checkbox is checked.
Set your desired API key in the input field labeled "Enter API Key".
Save the settings by clicking the Save Settings button.
The API key is private and should not be shared with anyone. It can be any string you choose, but it’s important to make sure it’s secure (e.g., a long and complex password-like string).
Endpoint: /api/users/:discordID
(GET)
/api/users/:discordID
(GET)This API endpoint allows you to retrieve detailed information about a user based on their Discord ID. The data returned includes user information, the contents of their cart, and the products they own.
URL Parameters
discordID (string): The Discord ID of the user whose information you want to retrieve.
Headers
x-api-key (string): This is required for authentication. The API key must be included in the header to access this endpoint.
Success Response
Status Code:
200 OK
Response Body:
Possible Error Responses:
Axios Example:
Endpoint: /api/payments/:transactionID
(GET)
/api/payments/:transactionID
(GET)This API endpoint allows you to retrieve detailed payment information based on a specific transaction ID. The returned data includes details about the payment method, user information, products purchased, and any discounts applied.
URL Parameters
transactionID (string): The unique transaction ID associated with the payment you want to retrieve.
Headers
x-api-key (string): This is required for authentication. The API key must be included in the header to access this endpoint.
Success Response
Status Code:
200 OK
Response Body:
Possible Error Responses:
Axios Example:
Endpoint: /api/products
(GET)
/api/products
(GET)This API endpoint allows you to retrieve detailed information about all products available in the system. The data returned includes the product's name, type, price, total purchases, total earned, total downloads, and creation date.
Headers
x-api-key (string): This is required for authentication. The API key must be included in the header to access this endpoint.
Success Response
Status Code:
200 OK
Response Body:
Possible Error Responses:
Axios Example:
Endpoint: /api/statistics
(GET)
/api/statistics
(GET)This API endpoint provides aggregated statistics about the platform, including total purchases, total earnings, total site visits, as well as the total number of users and products.
Headers
x-api-key (string): This is required for authentication. The API key must be included in the header to access this endpoint.
Success Response
Status Code:
200 OK
Response Body:
Possible Error Responses:
Axios Example:
Endpoint: /api/reviews
(GET)
/api/reviews
(GET)This API endpoint allows you to retrieve all reviews submitted by users. Each review includes the user's Discord ID, the name of the product reviewed, the rating, the comment, and the creation date.
Headers
x-api-key (string): This is required for authentication. The API key must be included in the header to access this endpoint.
Success Response
Status Code:
200 OK
Response Body:
Possible Error Responses:
Axios Example:
Last updated