Skip to content

Cost curves by UPC or supplier SKU, with observation gaps

GET
/v1/catalog/inventory/cost-trend
curl --request GET \
--url 'https://api.oldsteelarsenal.com/v1/catalog/inventory/cost-trend?days=30' \
--header 'x-client-id: <x-client-id>' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>'

Search products using POST /v1/catalog/search, then provide either upc (optionally distributor and sku to narrow the identity) or distributor + sku. A SKU filter always requires distributor. Each supplier SKU remains a separate series. Points are actual cost samples, with unchanged intervals compressed; baseline resets and missing coverage split segments. No retail prices or extrapolation. Up to 12 series; series_truncated signals more variants. days=0 selects all retained history; 1..3650 selects a rolling window. Large windows return 422 instead of silently losing points. Scope: catalog:read.

upc
Any of:
string
>= 1 characters <= 14 characters
distributor
Any of:
string
/^[a-z0-9_]{1,32}$/
sku
Any of:
string
>= 1 characters <= 128 characters
days
Days
integer
default: 30 <= 3650
x-client-id
Any of:
string
x-timestamp
Any of:
string
x-signature
Any of:
string

Successful Response

Media typeapplication/json
CostTrendResponse
object
currency
required
Currency
string
Allowed value: USD
name
required
Name
string
series
required
Series
Array<object>
CostSeries
object
change_amount
required
Any of:
number
change_comparable
required
Change Comparable
boolean
change_count
required
Change Count
integer
change_percent
required
Any of:
number
changes
required
Changes
Array<object>
CostChange
object
amount
required
Any of:
number
at
required
At
string format: date-time
cost
required
Cost
number
kind
required
Kind
string
Allowed values: baseline change
previous_cost
required
Any of:
number
source
required
Source
string
distributor
required
Distributor
string
distributor_name
required
Distributor Name
string
first_cost
required
Any of:
number
first_observed_at
required
Any of:
string format: date-time
gap_count
required
Gap Count
integer
high_cost
required
Any of:
number
last_cost
required
Any of:
number
last_observed_at
required
Any of:
string format: date-time
low_cost
required
Any of:
number
name
required
Name
string
sample_count
required
Sample Count
integer
segments
required
Segments
Array<object>
CostSegment
object
points
required
Points
Array<object>
CostPoint
object
at
required
At
string format: date-time
cost
required
Cost
number
sku
required
Sku
string
state
required
State
string
Allowed values: no_data fresh stale incomplete
upc
required
Any of:
string
series_truncated
required
Series Truncated
boolean
server_time
required
Server Time
string format: date-time
upc
required
Any of:
string
window_days
required
Window Days

0 means all retained history; otherwise a 1..3650 day window.

integer
window_start
required
Window Start
string format: date-time
Example
{
"currency": "USD",
"series": [
{
"changes": [
{
"kind": "baseline"
}
],
"state": "no_data"
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}