Reference
DEX Screener API reference
Parameters
Name | Type | Required | Description |
---|---|---|---|
review | str | ✅ | The review text that needs improvement. |
Response Fields
Field | Type | Description |
---|---|---|
previous_prompt | string | The previous prompt that was classified as abusive. |
is_abusive | boolean | Whether the text is abusive or not. |
refined_prompts | nullable array of string | The refined prompts if the text is classified as abusive. |
Success Response
HTTP Status | Status Message | Description |
---|---|---|
201 | OK | The request was successful. |
Error Responses
HTTP Status | Error Message | Description |
---|---|---|
400 | Invalid input | If the input text is missing or improperly formatted. |
Implementation Notes
The Secure Opinion AI Model powers the generation of review suggestions, ensuring context-aware and accurate recommendations.
To maintain consistency and prevent randomness, the AI model is configured with low variability, ensuring reliable output for review suggestions.
An advanced abusive language filter is implemented to automatically detect and block inappropriate content, ensuring all generated suggestions adhere to community guidelines.
The final response, generated by the Secure Opinion AI Model, is returned in JSON format, providing users with easy-to-process review suggestions.
Request Fields
Name | Type | Required | Description |
---|---|---|---|
user_id | int | ✅ | The ID of the user submitting the review. |
business_id | int | ✅ | The ID of the business being reviewed. |
name | str | ✅ | The reviewer's name. |
description | str | ✅ | The content of the review. |
rating | int | ✅ | The rating given to the business (e.g., 1-5 stars). |
Response Fields
Field | Type | Description |
---|---|---|
status | string | The status of the review submission. |
tx_hash | string | The transaction hash of the review submission. |
Success Response
HTTP Status | Status Message | Description |
---|---|---|
201 | OK | The request was successful. |
Error Responses
HTTP Status | Error Message | Description |
---|---|---|
400 | Invalid request | If the request body is missing or improperly formatted. |
401 | Unauthorized | If the API key is invalid or missing. |
403 | Forbidden | If the user is not authorized to access the requested resource. |
404 | Not found | If the requested resource does not exist. |
Implementation Notes
The Secure Opinion AI Model validates reviews for spam, bias, and inappropriate language.
Valid reviews are stored on the blockchain with a unique transaction hash (tx_hash) for transparency.
If the business has an active campaign, the user’s wallet is updated with rewards based on the review rating.
The review submission is processed asynchronously for faster response times.
Error handling is in place for issues like mismatched user IDs or invalid business IDs.
API access is secured, and sensitive data is encrypted for safe transactions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
business_id | int | ✅ | The unique identifier of the business whose reviews are being fetched. |
page | int | ❌ (default: 1) | The page number for pagination. |
per_page | int | ❌ (default: 10) | The number of reviews to display per page. |
Response Fields
Field | Type | Description |
---|---|---|
reviews | list | A list of review objects. |
reviews[].id | int | The unique identifier of the review. |
reviews[].description | string | The content of the review. |
reviews[].business_name | string | The name of the business associated with the review. |
reviews[].rating | int | The rating given in the review (e.g., 1-5 stars). |
reviews[].created_at | string | The timestamp when the review was created. |
reviews[].user_id | int | The ID of the user who posted the review. |
reviews[].business_id | int | The ID of the business associated with the review. |
reviews[].tx_hash | string | The transaction hash associated with the review. |
reviews[].tx_receipt | string | The transaction receipt associated with the review. |
reviews[].coins_earned | float | The number of coins earned for posting the review. |
page | int | The current page number. |
per_page | int | The number of reviews per page. |
total_pages | int | The total number of pages available based on per_page. |
total_count | int | The total number of reviews available for the business. |
Success Response
HTTP Status | Status Message | Description |
---|---|---|
200 | OK | The request was successful. |
Error Responses
HTTP Status | Error Message | Description |
---|---|---|
400 | Invalid business ID | If the provided business_id is invalid. |
404 | No reviews found | If no reviews exist for the given business. |
Implementation Notes
The API supports pagination by calculating the total review count and determining the total number of pages.
Reviews are sorted in descending order by their creation date.
If the requested page number exceeds the total pages, the last available page is returned.
The response is standardized using ReviewResponse serialization.