We need to display the user’s remaining credits in every relevant API response. This will allow users to track their credit balance in real-time when making requests, such as enriching companies. The credit balance should be included in the meta section of the response across all necessary endpoints.
🔹 Why?
• Helps users monitor their credit usage without needing to check separately.
• Improves transparency and prevents unexpected service interruptions.
• Allows developers to handle low-credit situations dynamically in their applications.
• Ensures consistency by standardizing credit tracking across API responses.
🔹 How it works?
1. Modify API responses to include remaining credits in the meta field:
{ "data": [...], "meta": { "total_results": 100, "credits_remaining": 450 } }2. Ensure all relevant endpoints (e.g., enrichment, search, company details) return this field.
3. Implement backend logic to retrieve and attach the correct credit balance for each request.
4. Add unit and integration tests to verify that:
• The credits_remaining field is always present in responses.
• The value updates correctly as credits are consumed.
5. Ensure performance optimization, retrieving credit balances efficiently without extra database load.
Please authenticate to join the conversation.
In Review
Features & Integrations
12 months ago

Julien Le Coupanec
Get notified by email when there are changes.
In Review
Features & Integrations
12 months ago

Julien Le Coupanec
Get notified by email when there are changes.