Home»Developers

API Documentation

Manage your inventory programmatically -- add listings, update status, and upload photos without opening the site.

Getting Started

  1. Request access from Settings > API Access.
  2. A verified seller is approved instantly; otherwise we'll review your request shortly.
  3. Once approved, generate your token -- it's shown exactly once, so copy it somewhere safe.
  4. Include it as a Bearer token on every request to the endpoints below.

Authentication

Every request (except the public reference endpoints) must include your token in the Authorization header:

Authorization: Bearer osk_your_token_here

Tokens are tied to your account -- every listing you create, edit, or read through the API is scoped to your own inventory only.

Listing Lifecycle

A listing created through the API always starts as a draft, the same as starting one by hand on the site -- it can't publish without at least one photo, and this call can't carry one.

  1. POST a new listing -- it's created as a draft.
  2. Upload one or more photos to it.
  3. POST a status change (e.g. "AV") to publish it.

Endpoints

Get Your Account

GET/api/v1/me/

The account your token belongs to

curl https://onlysalvage.com/api/v1/me/ \
  -H "Authorization: Bearer osk_your_token_here"

List Field Choices

GET/api/v1/schema/choices/

Valid values for status, vehicle_type, fuel_type, etc.

curl https://onlysalvage.com/api/v1/schema/choices/

List Makes

GET/api/inventory/makes/

List all vehicle makes (no token required)

curl https://onlysalvage.com/api/inventory/makes/

List Models

GET/api/inventory/models/?make={id}

List models for a given make (no token required)

curl "https://onlysalvage.com/api/inventory/models/?make=21"

List Your Listings

GET/api/v1/listings/

List your own listings -- filterable, see below

curl "https://onlysalvage.com/api/v1/listings/?status=AV&min_price=5000" \
  -H "Authorization: Bearer osk_your_token_here"

Create a Listing

POST/api/v1/listings/

Create a new listing (always starts as a draft)

curl -X POST https://onlysalvage.com/api/v1/listings/ \
  -H "Authorization: Bearer osk_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "vin": "1HGCM82633A004352",
    "year": 2018,
    "make": 21,
    "model": 186,
    "price": 9500,
    "vehicle_type": "SDN",
    "title_document": "SA"
  }'

Retrieve a Listing

GET/api/v1/listings/{id}/

Get a single listing of yours

curl https://onlysalvage.com/api/v1/listings/123/ \
  -H "Authorization: Bearer osk_your_token_here"

Update a Listing

PATCH/api/v1/listings/{id}/

Edit a listing's fields (partial updates supported)

curl -X PATCH https://onlysalvage.com/api/v1/listings/123/ \
  -H "Authorization: Bearer osk_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"price": 8900, "description": "Price reduced -- motivated seller."}'

Delete a Listing

DELETE/api/v1/listings/{id}/

Permanently delete a listing and its photos

curl -X DELETE https://onlysalvage.com/api/v1/listings/123/ \
  -H "Authorization: Bearer osk_your_token_here"

# 204 No Content on success

Change Listing Status

POST/api/v1/listings/{id}/status/

Change just a listing's status

curl -X POST https://onlysalvage.com/api/v1/listings/123/status/ \
  -H "Authorization: Bearer osk_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"status": "AV"}'

Renew a Listing

POST/api/v1/listings/{id}/renew/

Bump an eligible listing back to the top

curl -X POST https://onlysalvage.com/api/v1/listings/123/renew/ \
  -H "Authorization: Bearer osk_your_token_here"

List Photos

GET/api/v1/listings/{id}/images/

List a listing's photos

curl https://onlysalvage.com/api/v1/listings/123/images/ \
  -H "Authorization: Bearer osk_your_token_here"

Upload a Photo

POST/api/v1/listings/{id}/images/

Upload a photo, by file or image_url

curl -X POST https://onlysalvage.com/api/v1/listings/123/images/ \
  -H "Authorization: Bearer osk_your_token_here" \
  -F "file=@photo.jpg"

# or, from an existing hosted URL instead of a local file:
curl -X POST https://onlysalvage.com/api/v1/listings/123/images/ \
  -H "Authorization: Bearer osk_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"image_url": "https://example.com/photo.jpg"}'

Delete a Photo

DELETE/api/v1/listings/{id}/images/{image_id}/

Remove a single photo

curl -X DELETE https://onlysalvage.com/api/v1/listings/123/images/456/ \
  -H "Authorization: Bearer osk_your_token_here"

# 204 No Content on success

Good to Know

  • Requests are rate-limited to 120 per minute per account.
  • Every endpoint is scoped to your own listings -- there's no way to read or modify another seller's inventory through this API.
  • Validation errors come back as a JSON object mapping field names to error messages, same as the rest of the site's API.
  • List responses are paginated (50 per page by default, up to 200 with ?page_size=); use the returned next/previous links to page through the rest.