PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Software Engineering Fundamentals/Profound

Implement a Credit API Workflow

Last updated: May 19, 2026

Quick Overview

This question evaluates a candidate's ability to integrate with RESTful APIs, manage authentication and HTTP responses, automate a client workflow, and organize reusable program logic.

  • easy
  • Profound
  • Software Engineering Fundamentals
  • Software Engineer

Implement a Credit API Workflow

Company: Profound

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Technical Screen

You are given documentation for a sandbox credit-management API. The documentation describes API operations for creating an account, adding credits, checking the account balance, and spending credits. AI-assisted coding tools are allowed during the exercise. Build a small script or command-line program that performs the full workflow below: 1. Discover or configure the API base URL and authentication key. If the documentation page only shows runnable examples, use the browser developer tools or network inspector to identify the actual request URL, headers, and payload format. 2. Create a new account. 3. Add a fixed amount of credits to that account, for example `100` credits. 4. Retrieve and print the current balance. 5. Spend a fixed amount of credits, for example `30` credits. 6. Retrieve and print the final balance. 7. Validate that the final balance is correct based on the initial top-up and spend amount. Your implementation should be easy to run, should avoid hardcoding secrets, should handle non-successful HTTP responses clearly, and should keep the API calls organized into reusable functions.

Quick Answer: This question evaluates a candidate's ability to integrate with RESTful APIs, manage authentication and HTTP responses, automate a client workflow, and organize reusable program logic.

Profound logo
Profound
Apr 4, 2026, 12:00 AM
Software Engineer
Technical Screen
Software Engineering Fundamentals
0
0

You are given documentation for a sandbox credit-management API. The documentation describes API operations for creating an account, adding credits, checking the account balance, and spending credits. AI-assisted coding tools are allowed during the exercise.

Build a small script or command-line program that performs the full workflow below:

  1. Discover or configure the API base URL and authentication key. If the documentation page only shows runnable examples, use the browser developer tools or network inspector to identify the actual request URL, headers, and payload format.
  2. Create a new account.
  3. Add a fixed amount of credits to that account, for example 100 credits.
  4. Retrieve and print the current balance.
  5. Spend a fixed amount of credits, for example 30 credits.
  6. Retrieve and print the final balance.
  7. Validate that the final balance is correct based on the initial top-up and spend amount.

Your implementation should be easy to run, should avoid hardcoding secrets, should handle non-successful HTTP responses clearly, and should keep the API calls organized into reusable functions.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Profound•More Software Engineer•Profound Software Engineer•Profound Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.