openapi: 3.0.1
info:
title: Terminal Shop Address Product API
description: Public REST API for Terminal, a developer-focused coffee company. The API powers product browsing, carts, orders, subscriptions, addresses, cards, profiles, personal access tokens, and OAuth apps - the same surface behind the `ssh terminal.shop` storefront and the official SDKs. All monetary amounts are integers in US cents. Authentication is a Bearer personal access token (`trm_live_*` in production, `trm_test_*` in the dev sandbox) or an OAuth 2.0 access token.
termsOfService: https://www.terminal.shop/terms
contact:
name: Terminal Support
url: https://www.terminal.shop
version: '1.0'
servers:
- url: https://api.terminal.shop
description: Production
- url: https://api.dev.terminal.shop
description: Dev sandbox (no real charges)
security:
- bearerAuth: []
tags:
- name: Product
paths:
/product:
get:
operationId: listProducts
tags:
- Product
summary: List all products
description: List all products for sale in the Terminal shop.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/Product'
/product/{id}:
get:
operationId: getProduct
tags:
- Product
summary: Get product
description: Get a product by ID from the Terminal shop.
parameters:
- $ref: '#/components/parameters/PathID'
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Product'
components:
schemas:
ProductTags:
type: object
properties:
app:
type: string
color:
type: string
featured:
type: boolean
market_eu:
type: boolean
market_global:
type: boolean
market_na:
type: boolean
ProductVariant:
type: object
required:
- id
- name
- price
properties:
id:
type: string
name:
type: string
price:
type: integer
format: int64
description: Price of the variant in US cents.
tags:
type: object
additionalProperties: true
Product:
type: object
required:
- id
- name
- description
- variants
properties:
id:
type: string
name:
type: string
description:
type: string
variants:
type: array
items:
$ref: '#/components/schemas/ProductVariant'
order:
type: integer
format: int64
description: Sort order of the product.
subscription:
type: string
enum:
- allowed
- required
description: Whether subscriptions are allowed or required for this product.
tags:
$ref: '#/components/schemas/ProductTags'
parameters:
PathID:
name: id
in: path
required: true
schema:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Personal access token (`trm_live_*` in production, `trm_test_*` in the dev sandbox) or OAuth 2.0 access token, passed as `Authorization: Bearer <token>`.'