DocsDeveloper guidesConsume a delivery

Consume a delivery

Panel formats, payload types and a webhook receiver.

This is the receiving side. Someone has set up a delivery pointed at you — an SFTP directory, a webhook endpoint, an S3 prefix, or a mailbox — and you have to turn what arrives into something your systems can act on. That means knowing the file format, knowing which payload type you are getting, and handling the two things that will eventually happen: a duplicate send, and a send you missed.

What is actually sent

A delivery is an ordinary workflow on the sender's side — a trigger, an index_panel node, and one send node. index_panel is what produces your file: a flat table, one header row, one record per row, no merged headers or spanning cells, always carrying an index_id column. The send node only decides how that file reaches you.

delivery_trigger
delivery_payload
delivery_send
The sender side of what you receive: an event fires, index_panel builds the file, a send op ships it.
Drag to pan, and select a node to see its configuration.
  1. index_event_trigger fires when the index publishes — here, on a new weighting (a rebalance).
  2. index_panel renders the chosen payload_type. history: "latest" means the newest snapshot only, and category: "symbol" keys the rows by ticker instead of FIGI.
  3. send_sftp writes it into the agreed directory under the filename from filename_template.
ChannelWhat you getHow you pick it up
send_emailThe CSV as an attachment, with the configured subject and bodyMailbox rules, or a scripted IMAP fetch
send_webhookAn HTTP request to your endpoint, one per index unless per_index is offAn HTTP handler you own
send_sftpThe CSV written into an agreed directoryPoll the directory, or an inotify-style watcher
send_s3The CSV written to an object keyS3 event notification, or poll the prefix

If the sender is feeding you through a partner integration instead — send_refinitiv, send_alphabot, send_alphathena, send_stratifi — there is no index_panel node and none of this applies: those operations format and transport the data the one way that partner accepts, and you consume it through that partner's own product.

The payload types

Establish with the sender which of these you are receiving before you write a parser. They have different grains and different keys.

`payload_type`GrainWhat it answers
valuesOne row per session"What is the index level?" — carries every configured series, typically value_pr and value_tr.
weightingsOne row per constituent, per rebalance"What proportions was the index targeting?"
holdingsOne row per constituent, per rebalance or corporate action"What does the index actually own?" — share counts plus the divisor; a latest file weights them at its own time.
changesOne row per changed position"What moved since last time?" — adds, drops and rebalances.
corporate_actionsOne row per action"What splits and dividends were applied?"
tracker_legacyOne file per snapshotThe v1 tracker layout, kept for systems that parse that exact file. Not a flat panel — see below.

The leading columns are fixed per payload type, and anything else the record carries is appended after them:

`payload_type`Leading columns
valuesindex_id, time, value, then each configured series
weightingsindex_id, time, security, weight
holdingsindex_id, time, security, weight, shares, divisor
changesindex_id, time, security, change_type, then shares_prev / shares_new / shares_change and weight_prev / weight_new / weight_change
corporate_actionsindex_id, time, security, type, then the action's own fields (nested ones such as impact arrive JSON-encoded)

change_type on a changes panel is one of added, removed or rebalance. If the sender set include_unchanged, you will also see hold rows for positions that did not move — so do not treat the presence of a row as proof that something changed.

weightings and holdings are not interchangeable

Weightings are the target proportions the rebalance decided on. Corporate actions never change them, so a stock a merger removed stays in them until the next rebalance. Holdings are the book the index actually holds: share counts, which drift away from the targets as prices move and change again on corporate actions, and a latest holdings file weights them at the file's own time. If you are replicating the index or need its current weights, you want holdings. If you are checking methodology, you want weightings. The two differ between rebalances, and that is expected, not a bug.

Ask what `security` is keyed by

By default the security column holds the stored identifier, which is a FIGI. If the sender set category on the panel — symbol is the common one — the column holds that identifier instead, and duplicates are summed on the way. Two feeds from the same index can therefore key positions differently. Agree it once, in writing.

history on the sender side decides how much arrives. latest sends the newest snapshot only — the normal recurring case, and the one where a missed file is a real gap. full sends the whole series, which is self-healing but large.

A webhook receiver

With per_index: true — the default — you get one request per index, and the body is a records-orient envelope. With per_index: false you get a single request carrying {generated_at, deliveries: [...]}, where each entry is one of these envelopes. Handle whichever the sender configured; ask, rather than inferring it from the first request you see.

one webhook body, per_index: true
{
"index_id": "idx_bh7fgXWJMaa3",
"index_name": "US 500",
"payload_type": "weightings",
"time": "2026-06-30 00:00:00",
"generated_at": "2026-06-30 21:12:04",
"records": [
{ "index_id": "idx_bh7fgXWJMaa3", "time": "2026-06-30 00:00:00", "security": "AAPL", "weight": 0.0712 },
{ "index_id": "idx_bh7fgXWJMaa3", "time": "2026-06-30 00:00:00", "security": "MSFT", "weight": 0.0664 }
]
}

time is the snapshot the data belongs to; generated_at is when the file was built. They are not the same and the difference matters for idempotency — a resend of the same snapshot carries the same time and a new generated_at.

One exception: a tracker_legacy payload is an already-rendered file body, so it arrives as content (a string) plus filename, with no records array. Every other payload type sends records.

The important properties of a good receiver: it accepts the request quickly, it is idempotent, and it never does the downstream work inline. Acknowledge, persist the raw body, and process asynchronously — that way a slow database does not turn into a failed delivery.

# FastAPI
import hmac, os
from fastapi import FastAPI, Header, HTTPException, Request
app = FastAPI()
SHARED_SECRET = os.environ["INDEXONE_SHARED_SECRET"]
@app.post("/hooks/indexone")
async def receive(request: Request, x_shared_secret: str = Header(default="")):
# There is no signature on delivery webhooks — a shared secret in a header
# is the available control. Compare in constant time.
if not hmac.compare_digest(x_shared_secret, SHARED_SECRET):
raise HTTPException(status_code=401)
body = await request.body()
payload = await request.json()
# per_index: false bundles every index under "deliveries".
envelopes = payload.get("deliveries") or [payload]
accepted = []
for envelope in envelopes:
# tracker_legacy arrives as a rendered file body, everything else as rows.
rows = envelope.get("records")
if rows is None:
rows = parse_legacy_file(envelope["content"])
# Idempotency key: the sender does not provide one, so derive it from the
# SNAPSHOT time — generated_at changes on every resend of the same data.
key = f"{envelope['index_id']}:{envelope['payload_type']}:{envelope['time']}"
if already_seen(key):
accepted.append({"key": key, "status": "duplicate"})
continue
store_raw(key, body)
enqueue_processing(key, envelope["index_id"], rows)
accepted.append({"key": key, "status": "accepted", "rows": len(rows)})
return {"results": accepted}

Delivery webhooks are not signed

There is no HMAC or signature header on delivery webhooks today, so a receiver cannot cryptographically verify that a request came from Index One. Signing is documented as planned. Until it ships, treat the endpoint as unauthenticated by default and compensate: require a shared secret header, restrict by source IP if you can, and — the strongest control — treat the webhook as a notification and re-read the authoritative data with GET /query before acting on it.

Return a 2xx, or you will be retried

A non-2xx response is a failure on the sender's side. 408, 429 and 5xx are retried — by default twice more after the first attempt — so a 500 from your handler produces the same request again seconds later, which is one more reason to be idempotent. A 4xx is not retried at all: the send is recorded as failed and the sender's next run is the next chance you get.

SFTP pickup

The pattern that survives contact with reality: list, filter by the agreed filename shape, move each file out of the drop directory before parsing it, and record what you took.

pickup.py
import csv, io, posixpath
import paramiko
DROP = "/incoming/indices"
DONE = "/incoming/indices/processed"
transport = paramiko.Transport(("sftp.example.com", 22))
transport.connect(username="you", pkey=paramiko.RSAKey.from_private_key_file("id_rsa"))
sftp = paramiko.SFTPClient.from_transport(transport)
for name in sorted(sftp.listdir(DROP)):
if not name.endswith(".csv"):
continue
src = posixpath.join(DROP, name)
# Move first. A file still in DROP after a crash gets retried; a file
# parsed in place and then lost does not.
dst = posixpath.join(DONE, name)
sftp.rename(src, dst)
with sftp.open(dst) as fh:
rows = list(csv.DictReader(io.TextIOWrapper(fh, encoding="utf-8")))
process(name, rows)

Partial files

Reading a file the moment it appears can catch it mid-upload. Either agree an atomic convention with the sender — upload to a temp name and rename — or wait until a file's size and mtime are stable across two polls before touching it.

Idempotency and replay

Assume every delivery can arrive more than once and that some will not arrive at all. Neither is exotic: a retry after a timeout produces a duplicate, and a receiver that was down during a send produces a gap.

  1. Derive a key. (index_id, payload_type, time) identifies a snapshot. Store it and reject repeats — the same file processed twice is worse than one processed late. Do not key on generated_at; it is different on every resend of the same data.
  2. Keep the raw payload. Store the bytes before parsing. When a downstream mapping turns out to be wrong you can reprocess without asking for a resend.
  3. Detect gaps, do not just log them. For a values feed you know which sessions to expect from the index's exchange_calendar. A missing session should raise an alarm, not sit in a log.
  4. Backfill from the API, not from a resend. GET /query on index-values-eod, index-holdings or index-weightings is authoritative and available immediately. Asking the sender to re-run a delivery is slower and gives you the same data.
  5. Watch for restatements. A corrected historical row will not be pushed to you — event triggers ignore rows older than about three hours. Periodically re-pull a trailing window and compare.
backfilling a missed send
curl -G "https://api.indexone.io/query" \
--data-urlencode "table=index-values-eod" \
--data-urlencode "pk=idx_bh7fgXWJMaa3" \
--data-urlencode "order=descending" \
--data-urlencode "limit=20" \
-H "x-api-key: YOUR_API_KEY" \
-H "Authorization: YOUR_ID_TOKEN"

There is no endpoint that returns a delivery's artifacts

Once a delivery has produced a file, that file only exists where it was sent — the mailbox, the SFTP directory, the object key, the webhook body. There is no route to fetch it back, and GET /deliveries/{id}/executions tells you that a run happened, not what it contained. An artifact-retrieval endpoint is documented as planned. Until then, the receiver is the system of record for what was delivered, and GET /query is the system of record for what the index says — which is why keeping the raw payload matters.

Checking what the sender saw

If a file did not arrive, the sender can check that delivery's run history. This route takes the delivery id — the dlv_ one. (GET /deliveries/{id}, which lists a team's deliveries, is the odd one out: that {id} is a team id.)

curl "https://api.indexone.io/deliveries/dlv_YOUR_DELIVERY_ID/executions" \
-H "x-api-key: YOUR_API_KEY" \
-H "Authorization: YOUR_ID_TOKEN"

The thing to know before reading it: a failed send is recorded as a warning, not an error. That is deliberate — the coordinator parks a live execution group permanently once it errors, so treating a transient failure as an error would silently stop the delivery for good. The consequence is that a run marked complete does not mean your file arrived.

Three outcomes tell you where the problem is. A send reporting {"sent": false, "reason": "sends are disabled in backtest mode"} was a simulation — nothing was ever going to arrive. A run in a warning state means at least one target was refused: the send operation's output carries a per-target results list — [{index_id, target, ok, attempts, detail}] — naming which indices failed and why, and one index failing does not stop the others, so a partially delivered run is a normal thing to see. A send recorded with sent: true against your endpoint means the file left; look at your own intake next.

Stored executions rarely keep the per-target rows

The executor strips results from the record it persists, so the run history usually gives you the run's state and timing but not which index failed. The reliable way to get per-index detail is to run the delivery once on demand — the console's Test delivery button, which posts to /execute and returns the operation output inline.