Skip to content

Autobaza API

A REST API for connecting your yard software to Autobaza. Create a key in your store settings.

openapi.json

Authentication

Send your key in the Authorization header on every request. Keys in the URL are rejected so they never land in logs.

Authorization: Bearer abk_XXXXXXXX_…

Each key carries scopes:

  • parts:read — read parts and vehicles
  • parts:write — change parts
  • vehicles:write — change vehicles
  • orders:read — orders with buyer details

Limits and errors

120 requests per minute per key; a 429 carries Retry-After and X-RateLimit-* headers. Bodies up to 256 KB. Errors look like this:

{ "error": { "code": "validation_failed", "message": "Invalid part.", "fields": { "price": "price must be a positive number" } } }

Endpoints

get/api/v1/parts

List parts

Scope: parts:read

status
draft, active, paused or sold.
updated_since
ISO 8601; only parts changed since then.
donor_ref
Only parts from this donor vehicle.
limit
Page size, 1–100 (default 100).
cursor
The `next_cursor` of the previous page.
curl -X GET 'https://autobaza.hr/api/v1/parts' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…'
  • 200 A page of parts: `{ data: Part[], next_cursor }`.

get/api/v1/parts/{external_id}

Get a part

Scope: parts:read

external_id
Your own part code (SKU), 1–64 characters. URL-encode it.
curl -X GET 'https://autobaza.hr/api/v1/parts/A-1001' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…'
  • 200 `{ data: Part }`
  • 404 No part with this code in your store.

put/api/v1/parts/{external_id}

Create or update a part

Idempotent upsert keyed on your code. A field you leave out is not changed on update. Validation is the same as the spreadsheet import.

Scope: parts:write

external_id
Your own part code (SKU), 1–64 characters. URL-encode it.
curl -X PUT 'https://autobaza.hr/api/v1/parts/A-1001' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…' \
  -H 'Content-Type: application/json' \
  -d '{"title":"Alternator Golf 5 1.9 TDI","category":"alternator","price":80,"condition":"used_good","donor_ref":"D-33","location":"A-12-3"}'
  • 200 Updated. `{ data: Part, warnings[] }`
  • 201 Created. `{ data: Part, warnings[] }`
  • 400 Malformed body or unknown field.
  • 409 The part is sold and can no longer be changed.
  • 422 Validation failed; `error.fields` names each problem.

delete/api/v1/parts/{external_id}

Delete a part

Only a part that never appeared in an order. Otherwise PUT `{"status":"paused"}`.

Scope: parts:write

external_id
Your own part code (SKU), 1–64 characters. URL-encode it.
curl -X DELETE 'https://autobaza.hr/api/v1/parts/A-1001' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…'
  • 204 Deleted.
  • 404 Not found.
  • 409 The part was ordered.

get/api/v1/donor-vehicles

List donor vehicles

Scope: parts:read

limit
Page size, 1–100 (default 100).
cursor
The `next_cursor` of the previous page.
curl -X GET 'https://autobaza.hr/api/v1/donor-vehicles' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…'
  • 200 `{ data: DonorVehicle[], next_cursor }`

post/api/v1/donor-vehicles

Create or update a donor vehicle

Idempotent on `internal_ref`, then `vin`. One of them is required.

Scope: vehicles:write

curl -X POST 'https://autobaza.hr/api/v1/donor-vehicles' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…' \
  -H 'Content-Type: application/json' \
  -d '{"internal_ref":"D-33","vin":"WVWZZZ1KZ6W000001","make":"Volkswagen","model":"Golf","year":2006}'
  • 200 Updated.
  • 201 Created.
  • 422 Unknown make.

get/api/v1/orders

List orders

Includes the buyer’s name, contact and address. Grant `orders:read` only to systems that need it.

Scope: orders:read

status
pending, confirmed, shipped, delivered, cancelled or refunded.
created_since
ISO 8601.
limit
Page size, 1–100 (default 100).
cursor
The `next_cursor` of the previous page.
curl -X GET 'https://autobaza.hr/api/v1/orders' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…'
  • 200 `{ data: Order[], next_cursor }`. Items carry your `external_id`.

get/api/v1/orders/{id}

Get an order

Scope: orders:read

id
Order id (UUID).
curl -X GET 'https://autobaza.hr/api/v1/orders/<order-id>' \
  -H 'Authorization: Bearer abk_XXXXXXXX_…'
  • 200 `{ data: Order }`
  • 404 Not found.