Implement a Credit API Workflow

Read the full interview experience this question came from →

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.

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.

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.

Read the full Profound Software Engineer interview experience this question came from

|Home/Software Engineering Fundamentals/Profound
Profound logo
Profound
Apr 4, 2026
easySoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
14
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.

Loading comments...