Errors

View as Markdown

Errors always have the same body: { "status_code", "error", "code", "message", "details" }. Branch on code, which is stable; message explains how to fix the problem.

The error object

Every error response has this shape. Each endpoint lists the errors it can return.

  • status_codeinteger

    HTTP status code, repeated in the body.

  • errorstring

    Short label matching the HTTP status.

  • codestring

    Stable machine-readable error code in snake_case. Branch on this, never on message.

  • messagestring

    What went wrong and how to fix it, written to be shown to a person.

  • detailsobjectOptional

    Extra structured context when it helps, for example the list of invalid fields. When a refusal is fixed in the 3DAPI dashboard (billing, store, compliance or plan), fix_url links to the page that fixes it.

Example
{
  "status_code": 404,
  "error": "Not Found",
  "code": "product_not_found",
  "message": "Product prd_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu was not found.",
  "details": {}
}

HTTP status codes

StatusMeaning
200 OK

It worked.

201 Created

It worked and created something; the body is the new object.

202 Accepted

Accepted for processing; the work happens afterwards and the body is empty.

204 No Content
400 Bad Request

The request is malformed: a bad parameter, cursor or expand path.

401 Unauthorized

The API key is missing or not valid.

402 Payment Required

A payment was needed and failed, or the balance is too low.

403 Forbidden

The key lacks a scope, or the account must change something first.

404 Not Found

The object does not exist, or belongs to another account.

409 Conflict

The object is in a state that does not allow this right now.

422 Unprocessable Entity

The body is well formed but breaks a rule; details says which.

429 Too Many Requests

Too many requests; slow down and retry.

503 Service Unavailable

The service is unavailable; retry with backoff.

Codes worth handling

Branch on code, never on message. These come up across many endpoints; the rest are listed on the endpoint that returns them.

validation_failed

A field is missing or has the wrong type or value. details lists the fields.

missing_scope

The API key does not carry the scope this endpoint needs.

invalid_cursor

A pagination cursor was edited or is not from this list.

invalid_expand

An expand[] path is not offered by this endpoint.

idempotency_key_reused

The same Idempotency-Key was sent with a different body.

plan_limit_reached

Your plan limit is reached. details.fix_url points at upgrading.

payment_failed

The charge to your saved card failed; nothing was created.

insufficient_balance

The wallet balance does not cover the purchase.

Fixes in the dashboard

Extra structured context when it helps, for example the list of invalid fields. When a refusal is fixed in the 3DAPI dashboard (billing, store, compliance or plan), fix_url links to the page that fixes it.

Retries and rate limits

A 4xx other than 429 will fail again until the request changes: read code and fix the request. A 429 or 503 is temporary: wait and retry with exponential backoff, and send the same Idempotency-Key when retrying a write.

Every endpoint except the health check can answer 429 with code rate_limited; wait for the number of seconds in the Retry-After header. The limits are in Rate limits.

Every error code

Each code with what it means, the statuses it comes with and the endpoints that return it. The OpenAPI document lists them per response in x-error-codes.

CodeMeaningStatusReturned by
account_blacklisted

The account may no longer use the API. Contact support.

40392 endpoints
account_service_unavailable

Sign-in details cannot be changed right now. Try again later.

503change_integrator_password, request_integrator_email_change
actor_not_allowed

The endpoint is for another kind of account (designer or integrator).

40393 endpoints
already_approved

Your integrator account is already approved, so there is nothing to submit.

409create_approval_request
ambiguous_credentials

Both an API key and a session were sent. Send one.

401102 endpoints
amount_out_of_range

The amount is outside $1.00 to $100,000.00.

422start_top_up, update_wallet_settings
api_key_not_found

You have no active API key with this id.

404revoke_api_key
api_request_not_found

You have no logged API request with this id.

404get_api_request
approval_in_review

Your approval request is in review. Quoting and uploads resume once it is reviewed.

409create_quote, create_approval_request
approval_request_not_found

You have no approval request with this id.

404get_approval_request
attachment_not_found

An attachment you asked to keep is not one of the product's attachments.

404, 422create_product, update_product, get_attachment
auto_top_up_needs_card

This is your only card and auto top-up is on. Turn auto top-up off first.

409remove_card
billing_details_not_found

You have not added billing details yet.

404get_billing_details
billing_details_required

Add billing details before this step.

409start_card_setup, start_top_up
cannot_publish

Something blocks publishing; details.blockers lists what.

409publish_product
card_not_found

No saved card with this id.

404make_card_default, remove_card
card_payments_unavailable

Card payments are not available right now. Nothing was created; try again later.

503create_integrator_order, start_card_setup, complete_card_setup, remove_card, start_top_up
card_removal_failed

The payment processor refused to remove the card. Try again later.

503remove_card
card_setup_not_found

No card setup with this id was started from your account.

404complete_card_setup
category_not_found

The category is unknown or inactive. List them with list_categories.

404, 422create_product, update_product, create_variant, update_variant, get_category
combination_slots_mismatch

A design names a color combination with the wrong number of slots.

422create_product, add_design, update_design
compliance_blocked

Your account cannot order yet: business billing details are missing, or an EU responsible person is needed to sell to EU or UK customers from outside the EU and UK. details.requirements lists what, details.fix_url where to fix it.

403create_integrator_order
compliance_document_not_found

You have no compliance document with this id.

404delete_compliance_document
country_not_eu_or_uk

The country is not an EU member state or the United Kingdom.

422set_eu_responsible_person
credential_not_allowed

The endpoint needs another kind of credential, usually a signed-in dashboard session instead of an API key.

40394 endpoints
currency_not_supported

The price is not in usd; prices are in US cents only.

422create_product, create_variant, update_variant, create_integrator_order
current_password_incorrect

The current password is not correct.

422change_integrator_password
custom_files_not_enabled

An order line sends a custom file, but custom files are not turned on for your account. Ask contact@dapi.digital to turn them on.

403create_order
custom_label_not_found

The custom label you asked to keep is not the product's.

422create_product, update_product
daily_quote_limit_reached

The daily quote limit for accounts not yet approved is reached. It resets at midnight UTC.

429create_quote
design_belongs_to_stock

The design belongs to a stock, not a product; change it through the stock.

409update_design, delete_design
design_in_use

A variant still uses this design. Remove it from the variants first.

409delete_design
design_not_found

You have no design with this id.

404get_design, update_design, delete_design
design_not_in_product

A variant names a design that is not part of this product.

422create_product, create_variant, update_variant
duplicate_design_key

Two designs in the request use the same key.

422create_product
duplicate_image

The same upload is listed twice.

422create_extra, update_extra
duplicate_item

The same product or stock is listed twice.

422review_qc_ticket, create_qc_ticket, create_stock_purchase
email_not_sent

The confirmation email could not be sent. Try again later.

503request_integrator_email_change
email_taken

An account with this email already exists.

409create_integrator_account, request_integrator_email_change
email_unchanged

The address is the one you already sign in with.

400request_integrator_email_change
eu_responsible_person_not_found

You have no active EU responsible person.

404remove_eu_responsible_person
event_not_found

No event with this id in the last 30 days.

404get_event, get_event_deliveries, resend_event
event_type_not_subscribed

The endpoint does not receive this event type.

409resend_event
extra_not_approved

The extra is pending review or was rejected. Only extras 3DAPI approved and priced can be used.

4227 endpoints
extra_not_found

The extra is unknown or not one of yours. List yours with list_extras.

404, 4229 endpoints
file_too_large

The file is larger than the upload purpose allows.

422create_upload
file_type_not_allowed

The file type or extension is not allowed for the upload purpose.

422create_upload
image_not_found

An image you asked to keep is not one of the product's images.

422create_product, update_product
import_issue_not_found

You have no import issue with this id.

404get_import_issue
insufficient_balance

The wallet balance does not cover the purchase and there is no saved card.

402, 422create_integrator_order, create_stock_purchase, create_withdrawal
invalid_api_key

The API key is unknown or inactive.

401102 endpoints
invalid_discount_code

The discount code is unknown.

400create_order
invalid_expand

An expand[] path is not offered by this endpoint.

40048 endpoints
invalid_file

The uploaded file is not what its name and type say (for example not a real .3mf or .stl).

422create_order
invalid_period

from is not before to, or the period is too long.

400get_integrator_analytics
invalid_session

The dashboard session expired or is not valid. Sign in again.

401102 endpoints
invoice_or_payment_link_required

A withdrawal needs an invoice or a payment link.

400create_withdrawal
key_limit_reached

You already have 10 active keys. Revoke one first.

409create_api_key
material_in_use

A variant still uses a material you removed.

422update_design
material_not_allowed

A material is unknown or not allowed here. List the available ones with list_materials.

422create_product, create_variant, update_variant, create_integrator_order
material_not_found

A material is not in the catalog. List them with list_materials.

404, 4228 endpoints
material_slots_mismatch

The slots sent are not the slots the quote's file prints with.

422create_integrator_order
missing_credentials

No API key or session was sent.

401102 endpoints
missing_scope

The API key does not carry a scope this endpoint needs.

40392 endpoints
no_saved_card

Add a card before this step.

409start_top_up
not_a_conversation

The ticket is not a question, so it takes no messages.

409send_qc_message
not_a_quality_check

The ticket is not a quality check.

409review_qc_ticket
not_awaiting_review

The ticket is closed, or a product on it is not waiting for your review.

409review_qc_ticket
not_enough_ready_quotes

You have fewer eligible quotes than the files the review needs.

422create_approval_request
not_your_turn

It is not your turn in the conversation; wait for the answer.

409send_qc_message
option_in_use

A variant still uses an option value you removed.

422update_product
option_mismatch

A variant's options do not match the product's options.

422create_product, create_variant, update_variant
order_item_not_found

An item is not on this order.

404create_qc_ticket
order_not_cancellable

The order cannot be cancelled: it is already cancelled, or production started. Contact support to stop it.

409cancel_order, cancel_integrator_order
order_not_eligible

Issues can only be reported on completed orders.

409create_qc_ticket
order_not_found

You have no order with this id.

404cancel_order, get_order, get_integrator_order, cancel_integrator_order, create_qc_ticket
payment_failed

The card was declined, or the charge failed. Nothing was created.

402create_order, create_integrator_order
payout_details_not_found

You have not added payout details yet.

404get_payout_details
photo_not_on_item

A refusal points at a photo that is not one of that product's current photos.

422review_qc_ticket
plan_limit_reached

Your plan limit is reached. details.fix_url points at upgrading.

403create_product, publish_product, create_stock, create_stock_purchase, set_stock_restock
price_below_minimum

The price is below the minimum for this variant; details.minimum says how much.

422create_product, create_variant, update_variant
product_not_found

You have no product with this id.

4049 endpoints
production_unavailable

Production is paused, so orders cannot be placed right now. Try again later.

409create_order, create_integrator_order
purpose_not_allowed

The upload purpose is not available to your kind of account.

403create_upload
qc_item_not_found

A product is not on this QC ticket.

404review_qc_ticket
qc_ticket_not_found

You have no QC ticket with this id.

404review_qc_ticket, send_qc_message, get_qc_ticket
quantity_exceeds_ordered

The report asks for more units than were ordered.

422create_qc_ticket
quote_not_approved

Your integrator account is not approved yet, so quotes cannot be ordered.

422create_integrator_order
quote_not_eligible

A quote cannot go in the approval request: unknown, listed twice, still being priced, failed, already submitted, approved or rejected (details.reason).

422create_approval_request
quote_not_found

You have no quote with this id.

404get_quote, create_integrator_order, estimate_integrator_order_shipping
quote_not_ready

The quote is still processing or failed, so it cannot be ordered yet.

422create_integrator_order, estimate_integrator_order_shipping
quote_rejected

The file was rejected in review, so the quote cannot be ordered.

422create_integrator_order, estimate_integrator_order_shipping
rate_limited

Too many requests. Wait for the seconds in Retry-After.

429110 endpoints
reference_in_use

You already have an order with this reference that is not cancelled; details.order is that order. Nothing was placed or charged.

409create_order
region_not_available

The region is not one this stock is produced in.

422create_stock_purchase, set_stock_restock
region_not_found

None of your stocks is produced in this region.

404get_region
sales_price_below_production

A unit sales price is below the minimum: the production price plus its share of the card fee. details.minimum says how much.

422create_integrator_order
same_password

The new password is the current one.

400change_integrator_password
scope_not_allowed

A scope is unknown or not allowed for your kind of account.

422create_api_key
shipping_destination_not_served

3DAPI does not deliver to the country: Russia, Belarus, Iran and Syria are refused.

422create_order, create_integrator_order, estimate_integrator_order_shipping, get_shipping_quote
shipping_zone_not_found

No active shipping zone serves the country.

404get_shipping_quote
signup_unavailable

Sign-up is not available right now. Nothing was kept; try again later.

503create_integrator_account, resend_integrator_confirmation
sku_already_used

The SKU is already used by another of your variants.

409create_product, create_variant, update_variant
slot_count_mismatch

Multicolor combinations have different numbers of slots.

422create_stock, add_stock_design
slug_taken

The slug is already used by another of your products.

409create_product, update_product
stock_batch_not_found

The batch is not one of this stock's batches.

404list_stock_batch_usage, get_stock_batch
stock_not_approved

The stock is not approved yet, so it cannot be used or bought.

409, 422create_product, create_variant, update_variant, create_stock_purchase
stock_not_found

You have no stock with this id.

404, 42211 endpoints
suggestions_unavailable

Suggested materials were asked for on a quote that has none.

422create_integrator_order
tax_form_required

A tax form is missing: a W-9 for a US business; outside the US, EU and UK a W-8BEN (person or sole trader) or W-8BEN-E (company). details.accepted lists the forms that satisfy it.

422save_billing_details
ticket_closed

The question is closed.

409send_qc_message
too_many_buckets

The period and granularity give too many buckets. Narrow the period.

400get_integrator_analytics
too_many_primary_images

More than one image is marked primary.

422create_product, update_product, create_stock, update_stock
too_many_variants

A product can have up to 200 variants.

422create_product, create_variant
unknown_attachment

An attachment is sent as one to keep, but there is none yet. Send it as an upload.

422create_stock, update_stock
unknown_design_key

A variant names a design key that is not in the request.

422create_product
unknown_image

An image is sent as one to keep, but there is none yet. Send it as an upload.

422create_stock, update_stock, create_extra, update_extra
unknown_requirement

The compliance requirement does not apply to this product.

422upload_compliance_document
unknown_upload

The upload id is unknown.

42211 endpoints
upload_already_used

The upload was already used by another quote. Start a new upload.

42211 endpoints
upload_expired

The upload expired (uploads last 24 hours). Start a new one.

42211 endpoints
upload_limit_reached

You used the 25 uploads of this onboarding round. Submit your files for review next.

409create_quote
upload_missing

The file was never sent to the upload's upload_url.

42211 endpoints
upload_purpose_mismatch

The upload was started for another purpose.

42211 endpoints
validation_failed

A field is missing or has the wrong type or value. details.errors lists the fields.

40064 endpoints
variant_managed_by_channel

The variant was imported from a sales channel that owns its SKU and price.

409update_variant
variant_needs_design_or_stock

A variant needs at least one design or stock.

422create_product, create_variant, update_variant
variant_not_found

You have no variant with this id.

404update_variant, delete_variant
variant_not_orderable

The variant is unknown, inactive, or its product is not approved.

422create_order
vat_number_invalid

VIES did not confirm the business buyer's EU VAT number. Nothing was created.

422create_integrator_order
weak_password

The password is too weak.

400create_integrator_account, change_integrator_password
webhook_endpoint_disabled

The endpoint is disabled. Enable it first.

409resend_event
webhook_endpoint_limit_reached

You already have 10 endpoints.

409create_webhook_endpoint
webhook_endpoint_not_found

You have no webhook endpoint with this id.

404update_webhook_endpoint, delete_webhook_endpoint, rotate_webhook_endpoint_secret, send_test_webhook_event, list_webhook_endpoint_deliveries, resend_event
webhook_url_not_allowed

The URL is not a public https address.

422create_webhook_endpoint, update_webhook_endpoint
withdrawal_cooldown

The cooldown since your last withdrawal has not ended.

409create_withdrawal
withdrawal_not_found

No withdrawal request with this id.

404cancel_withdrawal
withdrawal_not_pending

The withdrawal is no longer pending.

409cancel_withdrawal
withdrawal_pending

A withdrawal request is already pending.

409create_withdrawal