The API.

Put our designs in your own shop. Your customers choose a design and their sizes on your site; the API makes its plans, cut list, drawings and 3D files, for you to give them or build from.

Getting started

  1. Take Business, €50.00$50.00£45.00 a month.
  2. Make a key on your account page. It is shown once: keep it on your server, never in a web page.
  3. Send it with every request in an X-API-Key header, to https://aicarpenter.eu/api/v1.

Tokens

Business comes with 2000 tokens a month for the API: up to 200 designs, each with one kind of file. What you order is paid from them:

Ask any design's price, and your tokens left, before you order. Tokens start again each month; unused ones don't carry over. An order whose design could not be made gives its tokens back.

Endpoints

Examples

A design's price, and your tokens left:

curl -H "X-API-Key: aic_…" \
  https://aicarpenter.eu/api/v1/designs/kitchen_cabinet/price

{"id": "kitchen_cabinet",
 "tokens": {"as_is": 0, "with_sizes": 0, "per_kind_of_file": 10},
 "tokens_left": 2000}

An order at your customer's width (the names and limits of each size come from GET /designs/{id}):

curl -X POST -H "X-API-Key: aic_…" \
  -H "content-type: application/json" \
  -d '{"design": "kitchen_cabinet", "numbers": {"width": 600}}' \
  https://aicarpenter.eu/api/v1/orders

Its plans, from the order's id:

curl -H "X-API-Key: aic_…" -o plans.pdf \
  https://aicarpenter.eu/api/v1/orders/<order id>/files/plans.pdf

Good to know