List orders
Read the seller’s order history, newest first, with the same filters the Hoard dashboard exposes. Each order can optionally embed its line items./api/orders, not /api/v1/orders — the
/api/v1/orders POST is a separate upload surface (see below). Bearer
authentication is supported (Authorization: Bearer YOUR_API_KEY) for AI
assistants and integrations.
Line items
By default, each order in the response carries up to 20 line items, sorted by id ascending. The response also includesitems_truncated and
items_total_count so the caller knows whether they got every item.
?items_per_order=N— change the cap. Clamped to0..200.0omits items entirely (legacy callers that only need order headers).?items=full— return every line item on every order. Use this when building a packing slip or auditing a refund. Pairs poorly with very wide pages — preferper_page=10&items=fulloverper_page=200&items=full.
Refund, discount, tax, and internal id fields are intentionally omitted from
the embedded line-item shape. If you need per-line refund detail, the dashboard
exposes it on the individual order page.
Order-level refund fields are present on each order header:
refund_type
(full / partial), refund_origin (who initiated it, e.g. tcgplayer),
refund_amt (refunded dollars as a USD string), refund_reason, and
refund_note. All are null when the order was not refunded; refund_amt
being absent means “not refunded”, distinct from a $0 refund. refund_reason
and refund_note are buyer/marketplace-authored free text — on this read
surface they are length-bounded and stripped of control / zero-width characters.
Other filters
All standard order filters work — pass any combination:page(default 1),per_page(default 50, max 200)sort=date | total | buyer | status | number(defaultdate),direction=asc | desc(defaultdesc)status— one status, orstatus[]=Completed&status[]=Refundedfor manysearch— order number or buyer name (case-insensitive substring)date_from,date_to—YYYY-MM-DDwindow onorder_dateproduct_line— restrict to orders containing at least one item in the given gamerefund=true— only refunded ordersunfeedbacked=true— only orders with no seller feedback yetshipping_type=pwe | tracked | expeditedship_mark=pending— only orders the seller has marked Shipped that have not yet synced back from TCGplayer (the “pushing to TCGplayer” working set). Each order row carriesshipped_marked_at(timestamp, null if never marked) andmarked_shipped_pending(boolean, true while the optimistic mark is still ahead of the synced status).pull_session— a pull session id, or one of:active(the open session),none(available to pull — excludes dismissed orders),dismissed(orders excluded from pulls). Each order row includespull_dismissed_at(timestamp, null when the order is still pullable).
Example response
curl example
Upload orders
Upload parsed order data from TCGplayer’s order export. The request is shape-validated synchronously and queued for upsert in a background job — the response is202 Accepted
and the database write happens asynchronously. Orders are upserted by
(user_id, order_number) so re-uploading the same orders is safe.
Content-Type: application/gzip and gzip the JSON body. The server transparently
decompresses gzip and falls back to raw bytes when the body is not gzip-encoded.
Request body:
Order object fields
Response:
202 Accepted — the server has validated the payload shape and
enqueued the upsert. The count field reflects the number of orders in the
request (not the number of new rows — duplicates are updated in place).
If an active Pull session exists, the same upload also checks refreshed orders
against Pull eligibility. Orders that are now cancelled, shipped, refunded, or
otherwise no longer pullable stay in the session but are marked for review so
the tablet queue can warn the puller instead of silently dropping work.
curl example
Error responses
Notes
- Hoard parses TCGplayer’s order export CSV and converts it to this JSON format
- First sync sends full order history (from January 2020)
- Subsequent syncs send a rolling window of recent orders to keep their status current; older history is sent once and not re-sent every sync
- Focused
refresh_orderstasks reuse the same upload endpoint after Hoard fetches updated orders - Order upload is non-fatal. If it fails, the inventory sync still completes.
- Active Pull sessions keep their snapshot stable; refreshed orders that drift out of eligibility are flagged in the Pull queue.
Upload order refunds
Upload parsed refund rows from TCGplayer’s order export. The request is shape-validated synchronously and queued for upsert in a background job — the response is202 Accepted and the database write happens asynchronously.
Refund rows are upserted by (user_id, order_number), either creating new
orders or enriching existing ones with refund metadata.
Content-Type: application/gzip and gzip the JSON body. The
server transparently decompresses gzip and falls back to raw bytes when the
body is not gzip-encoded.
Request body:
202 Accepted — the server has validated the payload shape
and enqueued the upsert. The count field reflects the number of refund rows
in the request.
curl example
Error responses
Upload order line items
Upload parsed line items for existing orders. The request is shape-validated synchronously and queued for upsert in a background job — the response is202 Accepted and the database write happens asynchronously. Items are
upserted by (order_id, sku_id). Items whose order_number has no matching
order owned by the user are silently skipped, and multiple sku-less rows per
order are allowed.
/api/v1/orders apply.
Request body:
curl example
Error responses
Upload order shipping
Upload shipping enrichment (carrier, address, tracking, weight) for existing orders. The request is shape-validated synchronously and queued for a bulk SQL update in a background job — the response is202 Accepted and the
database write happens asynchronously. Updates are keyed on
(user_id, order_number); unknown order numbers are silently skipped.
/api/v1/orders apply.
Request body:
curl example
Error responses
Upload seller feedback
Upload seller feedback ratings scraped from TCGplayer. Matches each item to an existing order byorder_number and stores the rating and comment.
Items with no matching order or ratings outside 1–5 are silently skipped.
Feedback object fields
Response:
updated field is the number of orders that had feedback written to them.