Terminal Cart API
The Cart API from Terminal — 5 operation(s) for cart.
The Cart API from Terminal — 5 operation(s) for cart.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/terminal-shop-cart-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Terminal Shop Address Cart 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: Cart
paths:
/cart:
get:
operationId: getCart
tags:
- Cart
summary: Get cart
description: Get the current user's cart.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Cart'
delete:
operationId: clearCart
tags:
- Cart
summary: Clear cart
description: Clear the current user's cart.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: string
description: Empty string on success.
/cart/item:
put:
operationId: setCartItem
tags:
- Cart
summary: Add or update cart item
description: Add an item to the current user's cart, or update its quantity.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- productVariantID
- quantity
properties:
productVariantID:
type: string
description: ID of the product variant to add.
quantity:
type: integer
format: int64
description: Quantity of the item. Set to 0 to remove it.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Cart'
/cart/address:
put:
operationId: setCartAddress
tags:
- Cart
summary: Set cart shipping address
description: Set the shipping address for the current user's cart.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- addressID
properties:
addressID:
type: string
description: ID of the saved shipping address.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: string
/cart/card:
put:
operationId: setCartCard
tags:
- Cart
summary: Set cart payment card
description: Set the payment card for the current user's cart.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- cardID
properties:
cardID:
type: string
description: ID of the saved payment card.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: string
/cart/convert:
post:
operationId: convertCart
tags:
- Cart
summary: Convert cart to order
description: Convert the current user's cart to an order and place it.
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Order'
components:
schemas:
Cart:
type: object
required:
- items
- subtotal
- amount
properties:
items:
type: array
items:
$ref: '#/components/schemas/CartItem'
subtotal:
type: integer
format: int64
description: Subtotal of the items in the cart, in cents.
amount:
$ref: '#/components/schemas/CartAmount'
addressID:
type: string
cardID:
type: string
shipping:
$ref: '#/components/schemas/CartShipping'
CartShipping:
type: object
properties:
service:
type: string
timeframe:
type: string
OrderTracking:
type: object
properties:
number:
type: string
service:
type: string
status:
type: string
enum:
- PRE_TRANSIT
- TRANSIT
- DELIVERED
- RETURNED
- FAILURE
- UNKNOWN
statusDetails:
type: string
statusUpdatedAt:
type: string
url:
type: string
CartAmount:
type: object
required:
- subtotal
properties:
subtotal:
type: integer
format: int64
shipping:
type: integer
format: int64
total:
type: integer
format: int64
OrderAmount:
type: object
required:
- shipping
- subtotal
properties:
shipping:
type: integer
format: int64
subtotal:
type: integer
format: int64
Order:
type: object
required:
- id
- amount
- created
- items
- shipping
- tracking
properties:
id:
type: string
amount:
$ref: '#/components/schemas/OrderAmount'
created:
type: string
items:
type: array
items:
$ref: '#/components/schemas/OrderItem'
shipping:
$ref: '#/components/schemas/OrderShipping'
tracking:
$ref: '#/components/schemas/OrderTracking'
index:
type: integer
format: int64
CartItem:
type: object
required:
- id
- productVariantID
- quantity
- subtotal
properties:
id:
type: string
productVariantID:
type: string
quantity:
type: integer
format: int64
subtotal:
type: integer
format: int64
OrderShipping:
type: object
required:
- city
- country
- name
- street1
- zip
properties:
city:
type: string
country:
type: string
name:
type: string
street1:
type: string
street2:
type: string
zip:
type: string
province:
type: string
phone:
type: string
OrderItem:
type: object
required:
- id
- amount
- quantity
properties:
id:
type: string
amount:
type: integer
format: int64
quantity:
type: integer
format: int64
description:
type: string
productVariantID:
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>`.'