API v1

Schema

order_items

One row per line item within an order.

student_ro:SELECT

Columns#

ColumnTypeNullableNotes
idbigintNoPrimary key.
order_idbigintNoReferences orders.id.
product_idbigintNoReferences products.id.
sale_pricenumeric(12,2)NoUnit price charged at sale time.
quantityintegerNoUnits purchased.
amountnumeric(12,2)NoLine total.
created_attimestamptzNoWhen the row was created. Indexed.
updated_attimestamptzNoWhen the row was last modified. Equals created_at until the row changes. May not be indexed.

Example query#

SQL
SELECT oi.order_id, oi.product_id, oi.quantity, oi.amount
FROM order_items oi
JOIN orders o ON o.id = oi.order_id
WHERE o.updated_at >= '2026-03-01'
ORDER BY oi.id
LIMIT 100;

Loading tips#

Filter on updated_at for incremental loads — see Incremental loading.

© 2026 StyleHub · Developer Platform