Skip to content

API reference

Included with the Hobby and Professional plans. Read-only.

Authentication

Create a key under API in your dashboard and send it as a bearer token. A key reaches one workspace, yours, and there is no parameter that changes that.

curl https://api.platedock.com/api/public/v1/me \
  -H "Authorization: Bearer pd_live_…"

The key is shown once when you create it. We store a hash, so if you lose it there is no screen that can show it again: revoke it and make another.

Endpoints

Everything there is
GET /api/public/v1/meChecks the key and says which workspace it belongs to.The workspace id, name, address and plan.
GET /api/public/v1/quotes?limit=50Quotes customers have asked for, newest first.Id, status, how many files, the total, and when. Up to 200 at a time.
GET /api/public/v1/printersYour printers.Id, name, bed size and whether it is switched on.
GET /api/public/v1/materialsYour filament.Id, name, type, colour, density, price per kilogram and stock.

Money

Always minor units and an explicit currency code, never a decimal. £12.34 comes back as { "amountMinor": 1234, "currency": "GBP" }. Do the arithmetic in integers and format at the end; a float will cost you a penny somewhere and you will not find out where.

Webhooks

Add an address under API in your dashboard and we post to it when something happens: quote.created, quote.priced and quote.unpriceable.

Each delivery carries a PlateDock-Signature header in the form t=1730000000,v1=…. The signature is an HMAC-SHA256 over timestamp.body using your endpoint’s signing secret. This is the same scheme Stripe use, so if you have verified one of theirs the code is the same shape.

const [t, v1] = header.split(',').map((p) => p.split('=')[1]);
const expected = hmacSha256(secret, `${t}.${rawBody}`);

// Compare in constant time, and refuse anything older than about five minutes.
if (!timingSafeEqual(expected, v1)) reject();
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) reject();

Sign the raw body exactly as it arrived. A parsed and re-serialised copy has different whitespace and key order and will never match.

Answer with any 2xx. We do not read the response body. An endpoint that fails twenty times in a row is switched off and your dashboard says so, with what your server last said.

Rates and limits

A quotes page is at most 200. There is no published rate limit yet; if you are going to poll hard, use webhooks instead, which is what they are for.

Versions

The version is in the path. v1 is the current one, and anything already in it will keep working: a breaking change gets a new version rather than a new field meaning something different.