Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microservices-patterns/ftgo-application/llms.txt

Use this file to discover all available pages before exploring further.

The Consumer Service REST API is available at http://localhost:8081. It handles consumer registration and profile retrieval. A consumer must exist before they can place orders through the Order Service.

POST /consumers

Creates a new consumer with the provided name. Returns the system-assigned consumer ID on success.

Request body

name
object
required
The full name of the consumer to register.

Response

consumerId
number
The unique identifier assigned to the newly created consumer.

Status codes

CodeMeaning
200 OKConsumer created successfully.

Example

curl -s -X POST http://localhost:8081/consumers \
  -H "Content-Type: application/json" \
  -d '{
    "name": {
      "firstName": "Jane",
      "lastName": "Doe"
    }
  }'

GET /consumers/

Retrieves an existing consumer’s profile by their ID.

Path parameters

consumerId
number
required
The unique ID of the consumer to retrieve.

Response

name
object
The consumer’s full name.

Status codes

CodeMeaning
200 OKConsumer found and returned.
404 Not FoundNo consumer exists with the given consumerId.

Example

curl -s http://localhost:8081/consumers/1

Build docs developers (and LLMs) love