Quickstart

View as Markdown

The 3DAPI API lets sellers manage everything they do on the platform, and lets integrators build on top of it.

This guide takes you from no key to a first response. It takes about five minutes.

The base URL

Every path in this API starts with /v2. The examples read the API base URL from DAPI_API_URL and your key from DAPI_API_KEY, so you can paste them as they are.

Shell
export DAPI_API_URL="<the API base URL>"
export DAPI_API_KEY="<your API key>"

All requests and responses are JSON over HTTPS.

Get an API key

Create a key on the API keys page of your dashboard and give it only the scopes your integration needs. Keep it on your server: anyone holding the key can act for your account.

Read Authentication and scopes for what each scope allows.

Make your first request

Retrieve the current actor answers with who the key belongs to and the scopes it carries. It is the quickest way to check that a key works.

GET/v2/me
curl "https://public-api.dapi.digital/v2/me" \
  -H "x-api-key: $DAPI_API_KEY"
Response
{
  "object": "actor",
  "user_id": "44444444-4444-4444-8444-444444444444",
  "kind": "designer",
  "authenticated_with": "api_key",
  "scopes": [
    "order"
  ],
  "effective_scopes": [
    "orders:read",
    "orders:write"
  ],
  "approval": null
}

A 401 means the key is missing or wrong. Anything else follows the shape described in Errors.

Conventions

  • Ids are opaque strings with a type prefix, for example prd_ for products and var_ for variants. Store and compare them; never parse them.
  • Money is { "amount": 5000, "currency": "usd" }: amount is an integer in the smallest currency unit (cents), so 5000 is $50.00. There are no decimal amounts anywhere in the API.
  • Field names are snake_case. Every object has an object field naming its type. Timestamps are ISO 8601 in UTC.
  • Missing values are null; fields are never left out. The only exception is a field that appears only when requested with expand[], which says so.

Next steps

  • Products: create what you sell, with its designs and variants.
  • Orders: follow orders from every channel, or place your own.
  • Webhooks: hear about changes instead of polling for them.