Skip to main content

Standardized Structure

All OneClickDz Flexy API v3 endpoints follow a consistent response structure, making it easy to handle responses across your application.

Success Response

When a request is successful, the response follows this structure:

Fields

boolean
required
Always true for successful responses
object
required
Contains the response payload. Structure varies by endpoint.
object
Additional metadata about the response
string
Unique identifier for this request. Use this when contacting support.

Error Response

When a request fails, the response follows this structure:

Fields

boolean
required
Always false for error responses
object
required
Contains error information
string
Unique identifier for this request. Include this when reporting issues.

Response Examples

Account Balance

Mobile Top-Up Send

List Transactions (with Pagination)

Pagination

List endpoints include pagination in the response:

Pagination Fields

integer
Current page number (1-indexed)
integer
Number of items per page
integer
Total number of pages available
integer
Total number of items across all pages

Pagination Query Parameters

Control pagination using these query parameters:
Always check totalPages to know when to stop paginating.

HTTP Status Codes

The API uses conventional HTTP status codes:
Even for non-200 status codes, the response follows the standard error format.

Request ID

Every response includes a unique requestId:

Uses for Request ID

Debugging

Track requests through logs and identify issues

Support

Include in support tickets for faster resolution

Auditing

Correlate requests with transactions

Monitoring

Track request flow across systems
Always log the requestId for every API call you make. It’s invaluable for debugging.

Content Type

All requests and responses use JSON:

Request Headers

Response Headers

Handling Responses

Best Practices

TypeScript Types

If you’re using TypeScript, here are helpful type definitions:

Next Steps

Error Handling

Learn how to handle errors effectively

Core Endpoints

Explore all available endpoints