Tightly Otb API
The otb API from Tightly — 1 operation(s) for otb.
The otb API from Tightly — 1 operation(s) for otb.
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/tightly-io:tightly-io-otb-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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:
description: 'The public Tightly API. Authenticate with an API key as a bearer token; the key carries the organisation, so no X-Organization-ID header is sent. Every operation below states the scopes a key needs.
Every response carries two headers, whatever it answers: `X-Request-Id`, the handle on that one call, and `X-Tightly-Region`, the home that served it.
Every write accepts an optional `Idempotency-Key` request header, any string up to 255 characters. Send the same key twice and the second request is answered with the first one''s status and body instead of writing again, so a client that retried after a timeout ends holding the record''s id rather than creating a second one. Reusing a key with a different body, or while the first request is still running, is refused `409`. A write that failed releases its key. Keys answer for 24 hours and belong to the API key that used them.
Any operation can answer `503`, and it is about Tightly rather than about the request: a database briefly out of reach, which is what a failover or a full connection pool looks like from outside, or an idempotency store that could not answer. `message.desc` says which, and most carry a `Retry-After` header naming the seconds to wait. Where the sentence says nothing was written, the same request is safe to send again. Otherwise a read is safe to repeat and a write is not certain either way, because the connection was lost in the middle of it: read the object back before sending it a second time. An `Idempotency-Key` does not settle that one, and deliberately: a write that raised releases its key so the retry is a fresh attempt rather than a refusal for the next day. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` or `SERVICE_UNAVAILABLE` depending on which seam refused.'
title: Tightly Otb API
version: 2026-11
servers:
- url: https://api.app.tightly.io
security:
- ApiKey: []
tags:
- name: otb
paths:
/api/v1/otb/{mfp_id}/rollup:
get:
description: 'Open to buy for one season, category by category: the envelope the plan declares, what is already committed, what is reserved against it, what is left, the forward recommended buy and the chase reserve split.
`cost_rows` is the additive, cost-aware row contract. Prefer it when present, including an empty array; fall back to `rows` only when absent or null. Recorded purchase costs remain visible, while headroom, variance and status are null when the selected plan''s cost basis cannot be compared with those sources. `cost_comparison` names the selected and recorded bases and explains the absence. The legacy `rows` contract retains its numeric types and is empty for such an unavailable comparison; standard-plan rows keep their existing values.
A SEASON POOL RATHER THAN A WEEKLY BUDGET. The budget is category x season, so a single week cannot breach on its own; `scope` selects SS or FW and there is no fiscal-year scope, because rolling two disjoint selling windows into one running variance produced a crossing-week signal that meant nothing. `scope=FY` is refused 400. Every figure is at cost.
There is no stored budget and no build step: the envelope is read live from the plan''s own MFP on every call, so this and get_mfp_table cannot disagree about the same season.
Sold with Pro: an organisation without the planning rail is refused 403 `plan_excludes`.
Scope: `planning:read`.'
operationId: get_otb_rollup
parameters:
- description: 'The plan whose envelope this rollup is read against. The same `mfp_id` get_mfp_table takes: the envelope is read live from that plan on every call, so the two cannot disagree.
'
in: path
name: mfp_id
required: true
schema:
type: string
- description: 'SS (Spring/Summer) or FW (Fall/Winter), each narrows to a single season''s half-open window. OMIT IT and the service resolves the plan''s CURRENTLY-ACTIVE season, the one of this plan''s two whose selling window contains today (SS when today falls outside the plan''s fiscal year), and echoes the resolved value back as the response''s `scope`. This is the same resolution /weekly-flow performs, so the rollup and the flow beside it always answer for the SAME season; this parameter used to default to SS at the request boundary, and the two panels disagreed whenever the live season was FW. FY was REMOVED as a client-selectable scope (TIG-2216, 2026-07-22): the rollup is a per-season pool view, so ?scope=FY returns 400 (code VALIDATION_ERROR). Implication for the FE: /risk-timeline is a fixed FY forward horizon (its scope selector was also removed, TIG-2216), so the rollup is a per-season pool (SS|FW) while the risk-timeline is a whole-FY view (no per-season risk-timeline).
'
in: query
name: scope
required: false
schema:
enum:
- SS
- FW
type: string
- description: 'URL-encoded JSON array of filters with keys category and sales_channel_id (operation eq/in), e.g. [{"key":"category","operation":"in","value":["Knitwear"]}]. The channel filter narrows only the Envelope (Committed / Reserved / forward Recommended Buy are channel-agnostic).
'
in: query
name: filter_args
required: false
schema:
type: string
- description: 'Optional (TIG-2216). Comma-separated sort spec applied as a STABLE multi-key sort over the rows, e.g. -variance,category (variance descending, then category ascending). Prefix - = descending, + / none = ascending. The sort column is constrained to the rollup''s sortable columns: category, season_envelope, committed, reserved, remaining, forward_recommended_buy, variance, status (an unknown column returns 400). status sorts on the status string; the rest on the numeric row value. Omitted preserves the default category-ascending order. It orders ONLY the rows array - summary / totals / guardrail stay whole-scope aggregates.
'
in: query
name: sort_args
required: false
schema:
type: string
- description: 'Optional (TIG-2216). Case-insensitive substring matched against the category NAME to filter the rows (e.g. search=knit). Blank / omitted is a no-op (all rows). Like sort_args it narrows only the rows array, never the summary / totals (so summary still ties out to /header). Additive and backward-compatible.
'
in: query
name: search
required: false
schema:
maxLength: 255
type: string
- $ref: '#/components/parameters/TightlyVersion'
responses:
'200':
content:
application/json:
example:
data:
basis: cost
filters:
categories: null
sales_channel_ids: null
guardrail:
absolute_ceiling_ratio: null
amber_threshold_ratio: 0.1
guardrail_tolerance_ratio: 0.0
mode: soft_warning
surplus_threshold_ratio: 0.15
mfp:
fiscal_year: 2027
mfp_id: mfp_01J9X4
name: FY27 Plan
notes:
category_scope: mfp_selected_only
continuity_forward_estimate: open_replen_demand_forecast_cost
cost_basis: po_unit_cost_standard_not_landed
scope_source: resolved_active_season
phase: pre_season
rows:
- active_mode: null
category: Knitwear
chase_reserve: 91000.0
committed: 622400.0
committed_continuity: 210800.0
committed_seasonal: 411600.0
continuity_consumption_ratio: 0.32
continuity_envelope_alert: false
current_excluded_amount: 0.0
estimated: false
exclusion_active: false
forward_continuity_estimate: 61400.0
forward_recommended_buy: 168200.0
forward_seasonal_estimate: 106800.0
max_band: null
remaining: 213500.0
remaining_free: 122500.0
reserved: 74100.0
reserved_continuity: 22300.0
reserved_purchase_orders:
- created_at: '2026-08-28T11:02:00+00:00'
expected_delivery_date: '2027-02-19'
po_id: 41882
reference: PO-00041882
status: DRAFTED
value: 74100.0
reserved_seasonal: 51800.0
season_envelope: 910000.0
short_week: null
status: healthy
substate: null
surplus_free: 45300.0
target_amount: null
tight_week: null
variance: 45300.0
scope: SS
summary:
committed: 1704300.0
continuity_envelope_alerts: 0
fw_envelope: 2210000.0
remaining: 686800.0
reserved: 218900.0
scope_envelope: 2610000.0
ss_envelope: 2610000.0
total_envelope: 4820000.0
totals:
committed: 1704300.0
continuity_envelope_alerts: 0
forward_recommended_buy: 512400.0
remaining: 686800.0
reserved: 218900.0
season_envelope: 2610000.0
status: healthy
substate: null
variance: 174400.0
message:
desc: OK
service: otb
severity: INFO
schema:
$ref: '#/components/schemas/GetOTBRollupResponse'
description: 'The season pool, category by category. Every figure is at cost. `remaining` is `season_envelope - (committed + reserved)`; `variance` is `remaining - forward_recommended_buy` and is the signal a planner acts on. `tight_week` and `short_week` are fiscal weeks and are null while the pool never crosses in the window. The `notes` block says what the figures leaned on, the cost basis, the category scope, and whether a forward estimate was available at all.
'
headers:
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'400':
content:
application/json:
example:
code: validation_error
message:
code: validation_error
desc: 'scope[0]: Must be one of: SS, FW.'
doc_url: https://app.tightly.io/docs/api/guides/errors#validation_error
request_id: req_5e83c1470ab24f9d8c60e2153af7b9d4
service: UNKNOWN
severity: ERROR
description: '`scope=FY` is refused: the rollup is a per-season pool, and rolling two disjoint selling windows into one running variance produced a crossing week that meant nothing. An unknown sort column is refused here too.
'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'401':
content:
application/json:
example:
code: key_invalid
message:
code: key_invalid
desc: The API key is not valid.
doc_url: https://app.tightly.io/docs/api/guides/errors#key_invalid
request_id: req_c1f60b8e3d724a05be9271034fa8d6c5
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc. A keyed refusal also carries code, doc_url and request_id.
type: object
type: object
description: 'No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, telling a caller which is which maps the surface for them. A request with no Authorization header at all is refused 400 before any key is looked for.
'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'403':
content:
application/json:
example:
code: plan_excludes
message:
code: plan_excludes
desc: This organisation's plan does not include Planning. It is sold with Pro.
doc_url: https://app.tightly.io/docs/api/guides/errors#plan_excludes
request_id: req_7a29d40e6c1b48f593ae0d827b1f6534
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc. A keyed refusal also carries code, doc_url and request_id.
type: object
type: object
description: 'The key may not reach this operation. `plan_excludes` when the planning rail is sold with Pro and this organisation''s plan does not include it; `scope_missing` when the key does not hold Planning; `organization_mismatch` when the path names an organisation that is not the key''s; `ip_not_allowed` when the caller''s address is outside the key''s allowlist.
'
headers:
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
'429':
$ref: '#/components/responses/RateLimited'
'503':
$ref: '#/components/responses/DatabaseUnavailable'
security:
- ApiKey: []
summary: get otb rollup
tags:
- otb
x-tightly-scopes:
- planning:read
components:
responses:
DatabaseUnavailable:
content:
application/json:
example:
code: POSTGRES_UNAVAILABLE
message:
code: postgres_unavailable
desc: The database is unavailable right now. Try again in a few seconds.
doc_url: https://app.tightly.io/docs/api/guides/errors#postgres_unavailable
request_id: req_2e7b41c0d9384fa6b15c8073ea92d1f4
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc, and on a keyed refusal code, doc_url and request_id.
type: object
type: object
description: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
RateLimited:
content:
application/json:
example:
code: rate_limited
message:
code: rate_limited
desc: This key has reached its limit of 600 reads a minute; try again in 12 seconds.
doc_url: https://app.tightly.io/docs/api/guides/errors#rate_limited
request_id: req_5c1a9f47b0e34d8f9a2c6e10b3d4f785
service: UNKNOWN
severity: ERROR
schema:
properties:
code:
description: The same stable code as message.code, at the envelope's top level.
type: string
message:
description: severity, service, desc, and on a keyed refusal code, doc_url and request_id.
type: object
type: object
description: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
headers:
Retry-After:
$ref: '#/components/headers/Retry-After'
X-RateLimit-Limit:
$ref: '#/components/headers/X-RateLimit-Limit'
X-RateLimit-Remaining:
$ref: '#/components/headers/X-RateLimit-Remaining'
X-RateLimit-Reset:
$ref: '#/components/headers/X-RateLimit-Reset'
X-Request-Id:
$ref: '#/components/headers/X-Request-Id'
X-Tightly-Region:
$ref: '#/components/headers/X-Tightly-Region'
schemas:
OTBRollupData:
additionalProperties: false
properties:
basis:
type: string
channel_attribution:
additionalProperties: {}
default: null
type:
- object
- 'null'
cost_comparison:
additionalProperties: {}
default: null
type:
- object
- 'null'
cost_rows:
default: null
items:
$ref: '#/components/schemas/OTBCostRollupRow'
type:
- array
- 'null'
filters:
additionalProperties: {}
type: object
guardrail:
additionalProperties: {}
type: object
mfp:
additionalProperties: {}
type: object
notes:
additionalProperties: {}
type: object
phase:
type: string
rows:
items:
$ref: '#/components/schemas/OTBRollupRow'
type: array
scope:
type: string
summary:
additionalProperties: {}
type: object
totals:
additionalProperties: {}
type: object
required:
- basis
- filters
- guardrail
- mfp
- notes
- phase
- rows
- scope
- summary
- totals
type: object
OTBRollupRow:
additionalProperties: false
properties:
active_mode:
default: null
type:
- string
- 'null'
category:
type: string
chase_reserve:
type: number
committed:
type: number
committed_continuity:
default: 0.0
type: number
committed_seasonal:
default: 0.0
type: number
continuity_consumption_ratio:
default: null
type:
- number
- 'null'
continuity_envelope_alert:
default: false
type: boolean
current_excluded_amount:
default: 0.0
type: number
estimated:
default: false
type: boolean
exclusion_active:
default: false
type: boolean
forward_continuity_estimate:
default: null
type:
- number
- 'null'
forward_recommended_buy:
type: number
forward_seasonal_estimate:
default: null
type:
- number
- 'null'
max_band:
default: null
type:
- string
- 'null'
remaining:
type: number
remaining_free:
type: number
reserved:
type: number
reserved_continuity:
default: 0.0
type: number
reserved_purchase_orders:
items:
$ref: '#/components/schemas/OTBVendorPurchaseOrder'
type: array
reserved_seasonal:
default: 0.0
type: number
season_envelope:
type: number
short_week:
default: null
type:
- integer
- 'null'
status:
type: string
substate:
default: null
type:
- string
- 'null'
surplus_free:
type: number
target_amount:
default: null
type:
- number
- 'null'
tight_week:
default: null
type:
- integer
- 'null'
variance:
type: number
required:
- category
- chase_reserve
- committed
- forward_recommended_buy
- remaining
- remaining_free
- reserved
- season_envelope
- status
- surplus_free
- variance
type: object
OTBVendorPurchaseOrder:
additionalProperties: false
properties:
created_at:
default: null
type:
- string
- 'null'
expected_delivery_date:
default: null
type:
- string
- 'null'
po_id:
type: integer
reference:
type: string
status:
type: string
value:
type: number
required:
- po_id
- reference
- status
- value
type: object
OTBApiMessage:
additionalProperties: false
properties:
desc:
default: ''
type: string
service:
default: otb
type: string
severity:
default: INFO
enum:
- SUCCESS
- INFO
- ERROR
- WARNING
type: string
type: object
OTBCostRollupRow:
additionalProperties: false
properties:
active_mode:
default: null
type:
- string
- 'null'
category:
type: string
chase_reserve:
type: number
committed:
type: number
committed_continuity:
default: 0.0
type: number
committed_seasonal:
default: 0.0
type: number
continuity_consumption_ratio:
default: null
type:
- number
- 'null'
continuity_envelope_alert:
default: null
type:
- boolean
- 'null'
current_excluded_amount:
default: 0.0
type: number
estimated:
default: false
type: boolean
exclusion_active:
default: false
type: boolean
forward_continuity_estimate:
default: null
type:
- number
- 'null'
forward_recommended_buy:
type: number
forward_seasonal_estimate:
default: null
type:
- number
- 'null'
max_band:
default: null
type:
- string
- 'null'
remaining:
default: null
type:
- number
- 'null'
remaining_free:
default: null
type:
- number
- 'null'
reserved:
type: number
reserved_continuity:
default: 0.0
type: number
reserved_purchase_orders:
items:
$ref: '#/components/schemas/OTBVendorPurchaseOrder'
type: array
reserved_seasonal:
default: 0.0
type: number
season_envelope:
type: number
short_week:
default: null
type:
- integer
- 'null'
status:
default: null
type:
- string
- 'null'
substate:
default: null
type:
- string
- 'null'
surplus_free:
default: null
type:
- number
- 'null'
target_amount:
default: null
type:
- number
- 'null'
tight_week:
default: null
type:
- integer
- 'null'
variance:
default: null
type:
- number
- 'null'
required:
- category
- chase_reserve
- committed
- forward_recommended_buy
- reserved
- season_envelope
type: object
GetOTBRollupResponse:
additionalProperties: false
properties:
data:
anyOf:
- $ref: '#/components/schemas/OTBRollupData'
- type:
- object
- 'null'
default: null
message:
$ref: '#/components/schemas/OTBApiMessage'
type: object
headers:
X-RateLimit-Reset:
description: Unix seconds. The moment the allowance is whole again.
schema:
examples:
- 1793491260
type: integer
X-Tightly-Region:
description: The home that served the call. `us` for every organisation today.
schema:
examples:
- us
type: string
Retry-After:
description: Seconds to wait before sending the request again.
schema:
examples:
- 12
type: integer
X-Request-Id:
description: The handle on this one call. Quote it in a support conversation, or find the call by it in the key's Usage.
schema:
examples:
- req_8f3c1d0a6b2e4a519c772e0a4b6d1f83
type: string
X-RateLimit-Limit:
description: The ceiling on the allowance this call spent, per key, per minute. Reads and writes are counted apart, so the number moves with the verb.
schema:
examples:
- 600
type: integer
X-RateLimit-Remaining:
description: What is left of that allowance, this call included. Never below zero.
schema:
examples:
- 597
type: integer
parameters:
TightlyVersion:
description: The date train to answer on. One train exists today, `2026-11`, the one this reference describes and the one every key is minted on, so the call answers on it with or without this header. Send it anyway, so a client built now names its train from the start.
in: header
name: Tightly-Version
required: false
schema:
examples:
- 2026-11
type: string
securitySchemes:
ApiKey:
description: 'An API key from Settings > Developer > API keys, sent as `Authorization: Bearer tly_live_...`. The key carries the organisation.'
scheme: bearer
type: http