Cheese Store

v2.0.0
Base URLs
https://cheese.example.com/v2Example production URL (not a live service)
https://sandbox.cheese.example.com/v2Example sandbox URL (not a live service)
http://localhost:3000/v2Example local development URL

This is a fictional API contract used to demonstrate documentation generated by Sourcey. The Cheese Store service, accounts, keys, and endpoints are examples; there is no live cheese-ordering service behind this reference.

The Cheese Store API is organized around REST. It uses resource-oriented URLs, standard HTTP methods, and returns JSON responses. All requests are authenticated using an API key or OAuth2 token.

Getting Started

Read the endpoints and schemas as examples. If you adapt this contract for a real API, issue your own credentials and send them in the X-API-Key header.

Rate Limiting

PlanRequests/hourBurst
Free10010
Pro10,000100
EnterpriseUnlimited1,000

When you exceed the rate limit, the API returns 429 Too Many Requests with a Retry-After header.

Pagination

List endpoints return paginated results. Use cursor and limit query parameters:

{
  "items": [...],
  "nextCursor": "eyJpZCI6NDJ9",
  "hasMore": true
}

Authentication

api_keyapiKey

API key authentication. Include your API key in the X-API-Key header.

This is an example scheme. Supply credentials from your own service when adapting this contract.

API Key: X-API-Key in header

cheesy_oauthoauth2

OAuth2 authentication for full API access

implicit
Authorization URL
https://cheese.example.com/oauth/authorize
Scopes
  • read:cheeses- Read cheese data
  • write:cheeses- Create and update cheeses
  • read:orders- View order history
  • write:orders- Place and manage orders
authorizationCode
Authorization URL
https://cheese.example.com/oauth/authorize
Token URL
https://cheese.example.com/oauth/token
Scopes
  • read:cheeses- Read cheese data
  • write:cheeses- Create and update cheeses
  • read:orders- View order history
  • write:orders- Place and manage orders
bearer_authhttp

JWT token obtained from the /customer/login endpoint

Scheme: bearer (JWT)

Cheese

Cheese endpoints provide access to information and operations relating to the cheeses available in the store.

Cheeses can be filtered by status, tags, and category. Each cheese has a unique ID, name, category, and availability status.

Cheese Wiki

List all cheeses

GET
https://cheese.example.com/v2/cheeses

Returns a paginated list of cheeses in the store. Results can be filtered by status and sorted by name or creation date.

The response includes cursor-based pagination. Use the nextCursor value from the response as the cursor parameter in subsequent requests.

Parameters

cursorstringquery

Pagination cursor from a previous response

limitinteger[1, 100]20query

Maximum number of cheeses to return

statusstringavailablependingsoldquery

Filter by availability status

sortstringname-namecreatedAt-createdAtnamequery

Sort order for results

Response

A paginated list of cheeses

Response headers
X-Total-Countintegerheader

Total number of cheeses matching the filter

Response fields application/json

Paginated list of cheeses

Show child attributes
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

nextCursorstring | null

Cursor for the next page (null if no more results)

hasMoreboolean

Whether there are more results

totalinteger

Total number of matching cheeses

429Too Many RequestsError

Rate limit exceeded

Response headers
Retry-Afterintegerheader

Seconds to wait before retrying

X-Rate-Limitintegerheader

Your rate limit (requests per hour)

X-Rate-Limit-Remainingintegerheader

Remaining requests in the current window

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

api_keyapiKey in header

API key authentication. Include your API key in the X-API-Key header.

This is an example scheme. Supply credentials from your own service when adapting this contract.

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: read:cheeses

Add a new cheese

POST
https://cheese.example.com/v2/cheeses

Add a new cheese to the store inventory. The cheese name must be unique within its category.

Body

application/json

Cheese object to add to the store

namestringrequired
categoryobject
Show child attributes
namestring
photoUrlsArray<string>
tagsArray<object>
Show child attributes
namestring
statusstringavailablependingsoldavailable
originstring | null
pricePerKgnumber<float>> 0
ageMonthsinteger[0, 120]
organicbooleanfalse

Response

201CreatedCheese

Cheese created successfully

Response headers
Locationstring<uri>header

URL of the newly created cheese

Response fields application/json
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

409ConflictError

A cheese with this name already exists in the category

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:cheeses

Update an existing cheese

PUT
https://cheese.example.com/v2/cheeses

Replace an existing cheese with updated data. The cheese ID in the body must match an existing cheese.

Body

application/json

Cheese object with updated fields

idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

Response

200OKCheese

Cheese updated successfully

Response fields application/json
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:cheeses

Find cheeses by status

GET
https://cheese.example.com/v2/cheeses/findByStatus

Multiple status values can be provided as comma-separated strings. Returns all cheeses matching any of the given statuses.

Parameters

statusArray<string>availablependingsoldrequiredquery

Status values to filter by

Response

Matching cheeses

Response fields application/json
Show child attributes
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

400Bad RequestError

Invalid status value provided

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: read:cheeses

Find cheeses by tags

deprecated
GET
https://cheese.example.com/v2/cheeses/findByTags

Multiple tags can be provided as comma-separated strings (e.g. ?tags=blue,italian,aged).

Deprecated: Use GET /cheeses?tags=blue,italian query parameter instead.

Parameters

tagsArray<string>requiredquery

Tags to filter by

Response

Matching cheeses

Response fields application/json
Show child attributes
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

400Bad RequestError

Invalid tag value

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: read:cheeses

Get cheese by ID

GET
https://cheese.example.com/v2/cheeses/{cheeseId}

Returns detailed information about a specific cheese, including its category, tags, and current availability status.

Parameters

cheeseIdinteger<int64>>= 1requiredpath

Unique identifier for the cheese

Response

200OKCheese

Cheese details

Response fields application/json
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

api_keyapiKey in header

API key authentication. Include your API key in the X-API-Key header.

This is an example scheme. Supply credentials from your own service when adapting this contract.

Update cheese with form data

POST
https://cheese.example.com/v2/cheeses/{cheeseId}

Updates specific fields of a cheese using form data. Only provided fields are updated.

Parameters

cheeseIdinteger<int64>>= 1requiredpath

Unique identifier for the cheese

namestringquery

Updated name of the cheese

statusstringavailablependingsoldquery

Updated status of the cheese

Response

200OKCheese

Cheese updated

Response fields application/json
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:cheeses

Delete a cheese

DELETE
https://cheese.example.com/v2/cheeses/{cheeseId}

Permanently removes a cheese from the store. This action cannot be undone. Any pending orders for this cheese will be cancelled.

Parameters

cheeseIdinteger<int64>>= 1requiredpath

Unique identifier for the cheese

X-Confirm-Deletebooleanrequiredheader

Must be set to true to confirm deletion

Response

204No Content

Cheese deleted successfully

404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
409ConflictError

Cheese has active orders and cannot be deleted

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:cheeses

Upload a cheese image

POST
https://cheese.example.com/v2/cheeses/{cheeseId}/uploadImage

Upload a photo of the cheese. Supports JPEG, PNG, and WebP formats. Maximum file size is 10MB.

Body

multipart/form-data
filestring<binary>required

Image file (JPEG, PNG, or WebP, max 10MB)

captionstring

Optional caption for the image

isPrimarybooleanfalse

Set as the primary display image

Parameters

cheeseIdinteger<int64>requiredpath

ID of cheese to upload image for

Response

200OKobject

Image uploaded successfully

Response fields application/json
imageUrlstring<uri>
thumbnailUrlstring<uri>
sizeinteger

File size in bytes

413Payload Too LargeError

File too large (max 10MB)

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
415Unsupported Media TypeError

Unsupported media type

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:cheeses

Store

Store endpoints provide access to cheese store orders and inventory management. Orders track the purchase lifecycle from placement through delivery.

Get store inventory

GET
https://cheese.example.com/v2/store/inventory

Returns a map of cheese status codes to quantities, representing the current inventory levels.

Response

200OKobject

Inventory counts by status

Response fields application/json
[key: string]integer<int32>

Authorization

api_keyapiKey in header

API key authentication. Include your API key in the X-API-Key header.

This is an example scheme. Supply credentials from your own service when adapting this contract.

Place a cheese order

POST
https://cheese.example.com/v2/store/order

Place an order to purchase cheese from the store. The cheese must be in available status.

Orders are processed asynchronously. Use the returned order ID to check status via GET /store/order/{orderId}.

Body

application/json

Order details

itemsArray<object>required
Show child attributes
cheeseIdinteger<int64>required
quantityinteger[1, 100]required
shippingAddressAddressrequired
Show child attributes
streetstringrequired
Example
123 Cheese Lane
citystringrequired
Example
Cheddarville
statestring | null
Example
WI
zipCodestring
Example
53001
countrystringrequired

ISO 3166-1 alpha-2 country code

Example
US
notesstring | null

Response

201CreatedOrder

Order placed successfully

Response headers
Locationstring<uri>header

URL of the created order

Response fields application/json
idinteger<int64>
Example
1001
Show child attributes
cheeseIdinteger<int64>
cheeseNamestring
quantityinteger>= 1
pricePerKgnumber<float>
shippingAddressAddress
Show child attributes
streetstringrequired
Example
123 Cheese Lane
citystringrequired
Example
Cheddarville
statestring | null
Example
WI
zipCodestring
Example
53001
countrystringrequired

ISO 3166-1 alpha-2 country code

Example
US
statusstringplacedapprovedshippeddeliveredcancelled

Order lifecycle status

Example
placed
notesstring | null

Special instructions for the order

totalnumber<float>

Order total in USD

Example
114.5
shipDatestring<date-time> | null

Estimated ship date (null if not yet scheduled)

createdAtstring<date-time>
updatedAtstring<date-time>
Example
{
  "id": 1001,
  "items": [
    {
      "cheeseId": 42,
      "cheeseName": "Gorgonzola",
      "quantity": 3,
      "pricePerKg": 28.5
    },
    {
      "cheeseId": 17,
      "cheeseName": "Brie",
      "quantity": 1,
      "pricePerKg": 22
    }
  ],
  "shippingAddress": {
    "street": "123 Cheese Lane",
    "city": "Cheddarville",
    "state": "WI",
    "zipCode": "53001",
    "country": "US"
  },
  "status": "placed",
  "notes": "Please wrap each wheel separately",
  "total": 114.5,
  "shipDate": null,
  "createdAt": "2026-03-10T14:30:00Z",
  "updatedAt": "2026-03-10T14:30:00Z"
}
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:orders

Get order by ID

GET
https://cheese.example.com/v2/store/order/{orderId}

Retrieve details of a specific order. For testing, use order IDs between 1 and 10.

Parameters

orderIdinteger<int64>>= 1requiredpath

ID of the order

Response

200OKOrder

Order details

Response fields application/json
idinteger<int64>
Example
1001
Show child attributes
cheeseIdinteger<int64>
cheeseNamestring
quantityinteger>= 1
pricePerKgnumber<float>
shippingAddressAddress
Show child attributes
streetstringrequired
Example
123 Cheese Lane
citystringrequired
Example
Cheddarville
statestring | null
Example
WI
zipCodestring
Example
53001
countrystringrequired

ISO 3166-1 alpha-2 country code

Example
US
statusstringplacedapprovedshippeddeliveredcancelled

Order lifecycle status

Example
placed
notesstring | null

Special instructions for the order

totalnumber<float>

Order total in USD

Example
114.5
shipDatestring<date-time> | null

Estimated ship date (null if not yet scheduled)

createdAtstring<date-time>
updatedAtstring<date-time>
Example
{
  "id": 1001,
  "items": [
    {
      "cheeseId": 42,
      "cheeseName": "Gorgonzola",
      "quantity": 3,
      "pricePerKg": 28.5
    },
    {
      "cheeseId": 17,
      "cheeseName": "Brie",
      "quantity": 1,
      "pricePerKg": 22
    }
  ],
  "shippingAddress": {
    "street": "123 Cheese Lane",
    "city": "Cheddarville",
    "state": "WI",
    "zipCode": "53001",
    "country": "US"
  },
  "status": "placed",
  "notes": "Please wrap each wheel separately",
  "total": 114.5,
  "shipDate": null,
  "createdAt": "2026-03-10T14:30:00Z",
  "updatedAt": "2026-03-10T14:30:00Z"
}
404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

api_keyapiKey in header

API key authentication. Include your API key in the X-API-Key header.

This is an example scheme. Supply credentials from your own service when adapting this contract.

Cancel an order

DELETE
https://cheese.example.com/v2/store/order/{orderId}

Cancel a pending order. Orders that have already been shipped cannot be cancelled.

Parameters

orderIdinteger<int64>>= 1requiredpath

ID of the order

Response

204No Content

Order cancelled successfully

404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
409ConflictError

Order has already been shipped

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

cheesy_oauthoauth2

OAuth2 authentication for full API access

Scopes: write:orders

Customer

Customer endpoints handle account creation, authentication, and profile management.

Customer accounts support OAuth2 login and API key authentication.

Customer Portal

Create a customer account

POST
https://cheese.example.com/v2/customer

Register a new customer account. The username and email must be unique.

Body

application/json

Customer registration details

usernamestringrequired
firstNamestring
lastNamestring
emailstring<email>required
passwordstring<password>required
phonestring | null

Response

201CreatedCustomer

Customer account created

Response fields application/json
idinteger<int64>
Example
1
usernamestring
Example
gordo
firstNamestring

Customer first name

Example
Alotta
lastNamestring

Customer last name

Example
Cheese
emailstring<email>
Example
love@cheese.com
phonestring | null
Example
+3344556677
customerStatusstringbronzesilvergoldplatinum

Customer tier based on purchase volume

Example
gold
favouriteCheeseCheese | object

The customer's favourite cheese (by reference or by name)

Show child attributes
One of
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

namestringrequired
createdAtstring<date-time>
409ConflictError

Username or email already exists

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Create multiple customers

POST
https://cheese.example.com/v2/customer/createMultiple

Create a batch of customer accounts from an array. Each customer is validated independently - partial success is possible.

Returns the created customers and any validation errors:

{
  "created": [...],
  "errors": [
    { "index": 2, "message": "Email already exists" }
  ]
}

Body

application/json

Array of customer objects to create

Show child attributes
usernamestringrequired
firstNamestring
lastNamestring
emailstring<email>required
passwordstring<password>required
phonestring | null

Response

200OKobject

Batch creation result

Response fields application/json
Show child attributes
idinteger<int64>
Example
1
usernamestring
Example
gordo
firstNamestring

Customer first name

Example
Alotta
lastNamestring

Customer last name

Example
Cheese
emailstring<email>
Example
love@cheese.com
phonestring | null
Example
+3344556677
customerStatusstringbronzesilvergoldplatinum

Customer tier based on purchase volume

Example
gold
favouriteCheeseCheese | object

The customer's favourite cheese (by reference or by name)

Show child attributes
One of
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

namestringrequired
createdAtstring<date-time>
errorsArray<object>
Show child attributes
indexinteger
messagestring
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Customer login

POST
https://cheese.example.com/v2/customer/login

Authenticate a customer and receive a session token. The token expires after 24 hours.

Body

application/json
usernamestringrequired

The customer's username

passwordstring<password>required

The customer's password

Response

200OKobject

Login successful

Response headers
X-Rate-Limitinteger<int32>header

Requests per hour allowed for this customer

X-Expires-Afterstring<date-time>header

Token expiration date-time (UTC)

Response fields application/json
tokenstring

JWT session token

expiresAtstring<date-time>

Token expiration time (UTC)

401UnauthorizedError

Invalid username or password

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Customer logout

GET
https://cheese.example.com/v2/customer/logout

End the current customer session and invalidate the session token.

Response

204No Content

Logout successful

Authorization

bearer_authhttp (bearer)

JWT token obtained from the /customer/login endpoint

Get customer by username

GET
https://cheese.example.com/v2/customer/{username}

Retrieve a customer's profile by their username.

Parameters

usernamestringrequiredpath

The customer's username

Response

Customer profile

Response fields application/json
idinteger<int64>
Example
1
usernamestring
Example
gordo
firstNamestring

Customer first name

Example
Alotta
lastNamestring

Customer last name

Example
Cheese
emailstring<email>
Example
love@cheese.com
phonestring | null
Example
+3344556677
customerStatusstringbronzesilvergoldplatinum

Customer tier based on purchase volume

Example
gold
favouriteCheeseCheese | object

The customer's favourite cheese (by reference or by name)

Show child attributes
One of
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

namestringrequired
createdAtstring<date-time>
404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

api_keyapiKey in header

API key authentication. Include your API key in the X-API-Key header.

This is an example scheme. Supply credentials from your own service when adapting this contract.

bearer_authhttp (bearer)

JWT token obtained from the /customer/login endpoint

Update customer profile

PUT
https://cheese.example.com/v2/customer/{username}

Update a customer's profile. Can only be performed by the authenticated customer.

Body

application/json

Updated customer fields

usernamestringrequired
firstNamestring
lastNamestring
emailstring<email>required
passwordstring<password>required
phonestring | null

Parameters

usernamestringrequiredpath

The customer's username

Response

Customer updated

Response fields application/json
idinteger<int64>
Example
1
usernamestring
Example
gordo
firstNamestring

Customer first name

Example
Alotta
lastNamestring

Customer last name

Example
Cheese
emailstring<email>
Example
love@cheese.com
phonestring | null
Example
+3344556677
customerStatusstringbronzesilvergoldplatinum

Customer tier based on purchase volume

Example
gold
favouriteCheeseCheese | object

The customer's favourite cheese (by reference or by name)

Show child attributes
One of
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

namestringrequired
createdAtstring<date-time>
404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten
422Unprocessable EntityValidationError

The request body failed validation

Response fields application/json
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message

Authorization

bearer_authhttp (bearer)

JWT token obtained from the /customer/login endpoint

Delete customer account

DELETE
https://cheese.example.com/v2/customer/{username}

Permanently delete a customer account and all associated data. This action cannot be undone.

Parameters

usernamestringrequiredpath

The customer's username

Response

204No Content

Customer deleted

404Not FoundError

The requested resource was not found

Response fields application/json
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

Authorization

bearer_authhttp (bearer)

JWT token obtained from the /customer/login endpoint

Models

Cheese

object
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

CheeseInput

object
namestringrequired
categoryobject
Show child attributes
namestring
photoUrlsArray<string>
tagsArray<object>
Show child attributes
namestring
statusstringavailablependingsoldavailable
originstring | null
pricePerKgnumber<float>> 0
ageMonthsinteger[0, 120]
organicbooleanfalse

CheeseList

object

Paginated list of cheeses

Show child attributes
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

nextCursorstring | null

Cursor for the next page (null if no more results)

hasMoreboolean

Whether there are more results

totalinteger

Total number of matching cheeses

Category

object
idinteger<int64>
Example
1
namestring
Example
Italian Cheese

Tag

object
idinteger<int64>
Example
1
namestring
Example
blue

Order

object
idinteger<int64>
Example
1001
Show child attributes
cheeseIdinteger<int64>
cheeseNamestring
quantityinteger>= 1
pricePerKgnumber<float>
shippingAddressAddress
Show child attributes
streetstringrequired
Example
123 Cheese Lane
citystringrequired
Example
Cheddarville
statestring | null
Example
WI
zipCodestring
Example
53001
countrystringrequired

ISO 3166-1 alpha-2 country code

Example
US
statusstringplacedapprovedshippeddeliveredcancelled

Order lifecycle status

Example
placed
notesstring | null

Special instructions for the order

totalnumber<float>

Order total in USD

Example
114.5
shipDatestring<date-time> | null

Estimated ship date (null if not yet scheduled)

createdAtstring<date-time>
updatedAtstring<date-time>
Example
{
  "id": 1001,
  "items": [
    {
      "cheeseId": 42,
      "cheeseName": "Gorgonzola",
      "quantity": 3,
      "pricePerKg": 28.5
    },
    {
      "cheeseId": 17,
      "cheeseName": "Brie",
      "quantity": 1,
      "pricePerKg": 22
    }
  ],
  "shippingAddress": {
    "street": "123 Cheese Lane",
    "city": "Cheddarville",
    "state": "WI",
    "zipCode": "53001",
    "country": "US"
  },
  "status": "placed",
  "notes": "Please wrap each wheel separately",
  "total": 114.5,
  "shipDate": null,
  "createdAt": "2026-03-10T14:30:00Z",
  "updatedAt": "2026-03-10T14:30:00Z"
}

OrderInput

object
itemsArray<object>required
Show child attributes
cheeseIdinteger<int64>required
quantityinteger[1, 100]required
shippingAddressAddressrequired
Show child attributes
streetstringrequired
Example
123 Cheese Lane
citystringrequired
Example
Cheddarville
statestring | null
Example
WI
zipCodestring
Example
53001
countrystringrequired

ISO 3166-1 alpha-2 country code

Example
US
notesstring | null

OrderItem

object
cheeseIdinteger<int64>
cheeseNamestring
quantityinteger>= 1
pricePerKgnumber<float>

Address

object
streetstringrequired
Example
123 Cheese Lane
citystringrequired
Example
Cheddarville
statestring | null
Example
WI
zipCodestring
Example
53001
countrystringrequired

ISO 3166-1 alpha-2 country code

Example
US

Customer

object
idinteger<int64>
Example
1
usernamestring
Example
gordo
firstNamestring

Customer first name

Example
Alotta
lastNamestring

Customer last name

Example
Cheese
emailstring<email>
Example
love@cheese.com
phonestring | null
Example
+3344556677
customerStatusstringbronzesilvergoldplatinum

Customer tier based on purchase volume

Example
gold
favouriteCheeseCheese | object

The customer's favourite cheese (by reference or by name)

Show child attributes
One of
idinteger<int64>required

Unique identifier

Example
42
namestringrequired

Name of the cheese

Example
Gorgonzola
categoryCategory
Show child attributes
idinteger<int64>
Example
1
namestring
Example
Italian Cheese
photoUrlsArray<string>

URLs of cheese photos

Example
[
  "https://wannabechef.com/gorgonzola.jpg"
]

Classification tags

Show child attributes
idinteger<int64>
Example
1
namestring
Example
blue
statusstringavailablependingsoldrequired

Availability status in the store

Example
available
originstring | null

Country of origin (null if unknown)

Example
Italy
pricePerKgnumber<float>> 0

Price per kilogram in USD

Example
28.5
ageMonthsinteger[0, 120]

Aging period in months

Example
12
organicbooleanfalse

Whether the cheese is certified organic

createdAtstring<date-time>

When the cheese was added to the store

updatedAtstring<date-time>

When the cheese was last updated

namestringrequired
createdAtstring<date-time>

CustomerInput

object
usernamestringrequired
firstNamestring
lastNamestring
emailstring<email>required
passwordstring<password>required
phonestring | null

Error

object
codeinteger<int32>required
Example
404
typestring
Example
Not found
messagestringrequired
Example
Your cheese has already been eaten

ValidationError

object
codeinteger<int32>
Example
422
typestring
Example
Validation error
messagestring
Example
Your cheese is not mouldy enough
errorsArray<object>

Individual field validation errors

Show child attributes
fieldstring

The field that failed validation

messagestring

Human-readable error message