CircuitHub

Orders

Create and manage manufacturing orders for your PCB projects.

An order represents a manufacturing request in CircuitHub — placing PCBs for fabrication and assembly based on your project revisions. Each order belongs to a project and tracks production through to completion.

Get shipping options

POST /v1/quotes/:quoteId/offers/:offerId/shipping-options

Request services for the selected offer and delivery address. An empty list means no service is available for this selection. Option IDs identify available services, not saved shipping quotations; prices are recalculated at preview and submission.

circuithub order shipping-options --quote 50001 --offer 880002 --shipping-address 6101 --workspace acme-electronics

Output:

ID          SERVICE     SHIPPING
ups_ground  UPS Ground  $25.00
curl -X POST -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "shippingAddressId": 6101
}' \
  "https://api.circuithub.com/v1/quotes/50001/offers/880002/shipping-options"

Response: 200 OK

{
  "quoteId": 50001,
  "offerId": 880002,
  "shippingAddressId": 6101,
  "currency": "USD",
  "shippingOptions": [
    {
      "id": "ups_ground",
      "label": "UPS Ground",
      "amount": "25.00"
    }
  ]
}

Request and response fields

FieldTypeDescription
shippingAddressIdintegerRequired request field. Saved address available to the quote’s workspace
shippingOptions[].idstringOpaque service option ID to use in preview
shippingOptions[].labelstringService display name
shippingOptions[].amountstringShipping charge before tax, as a decimal string
currencystringUSD

Request options again after changing the offer or address. Manufacturing ship dates are dispatch dates, not delivery dates. Shipping charges do not include tax or international import duties.

A quote, offer or address that is not the workspace's is 404 NOT_FOUND; an address missing details needed for shipping is 400 VALIDATION_ERROR. If shipping rates cannot be fetched, the request fails with 503 SHIPPING_UNAVAILABLE; request options again later.

Preview an order

POST /v1/orders/preview

Calculate the complete price without saving a checkout, creating an order or taking payment. Use the API body as order-selection.json. The workspace query parameter is required; every selection must belong to or be usable by that workspace.

circuithub order preview --workspace acme-electronics --file order-selection.json

Output:

Manufacturing: $774.45
Shipping:      $25.00
Tax:           $49.97
Order total:   $849.42
Due now:       $849.42
Due later:     $0.00
Orderable:     yes
curl -X POST -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quoteId": 50001,
  "offerId": 880002,
  "shippingAddressId": 6101,
  "shippingOptionId": "ups_ground",
  "paymentMethodId": "card_abc123"
}' \
  "https://api.circuithub.com/v1/orders/preview?workspace=acme-electronics"

Response: 200 OK

{
  "quoteId": 50001,
  "offerId": 880002,
  "shippingAddressId": 6101,
  "shippingOptionId": "ups_ground",
  "paymentMethodId": "card_abc123",
  "currency": "USD",
  "orderable": true,
  "blockers": [],
  "price": {
    "manufacturingSubtotal": "1180.00",
    "discounts": [
      {
        "type": "grid_proto",
        "code": null,
        "label": "Grid Proto",
        "amount": "319.50"
      },
      {
        "type": "account",
        "code": null,
        "label": "Your pricing",
        "amount": "86.05"
      }
    ],
    "manufacturingTotal": "774.45",
    "shipping": "25.00",
    "tax": "49.97",
    "total": "849.42"
  },
  "payment": {
    "amountDueNow": "849.42",
    "amountDueLater": "0.00",
    "terms": null
  },
  "taxStatus": "calculated",
  "quoteExpiresAt": "2026-11-03T11:00:00Z"
}

Request body

FieldTypeDescription
quoteId / offerIdintegerRequired. An offer belonging to this quote
shippingAddressIdintegerRequired. Saved delivery address
shippingOptionIdstringRequired. Option returned for this offer and address
paymentMethodIdstringRequired. Available workspace payment method

Preview fields

FieldTypeDescription
currencystringCurrency for all amounts; USD
orderablebooleanWhether this selection can currently be submitted
blockersarrayReasons it cannot be ordered; objects with code and message
price.manufacturingSubtotalstring or nullManufacturing price before discounts; null if historical detail was not recorded
price.discountsarray or nullPositive savings, already reflected in manufacturingTotal
price.manufacturingTotalstringManufacturing price after discounts
price.shippingstringShipping charge before tax
price.taxstring or nullCalculated tax; null when unavailable, never substituted with zero
price.totalstring or nullManufacturing total + shipping + tax; null when tax is unavailable
payment.amountDueNow / payment.amountDueLaterstring or nullAmounts payable now and later under the selected method; null when a complete price cannot be calculated
payment.termsstring or nullApproved payment terms when applicable
taxStatusstringcalculated or unavailable; a calculated zero tax is valid
quoteExpiresAtstringOriginal quote expiry; preview does not extend it

All amounts are decimal strings. Discounts are already deducted from manufacturingTotal; do not deduct them again. For a valid preview, amountDueNow + amountDueLater = total. The example pays in full by card. Approved terms may instead show zero due now and the full total due later; the server decides from the account and selected method. Credit limits are not a discount.

If tax calculation is unavailable, return orderable: false, taxStatus: "unavailable", a TAX_UNAVAILABLE blocker, and null tax, total and payment amounts. Resolve it before ordering. International duties may be payable separately and are not included in this total.

A net terms method without enough available credit for the total gives a PAYMENT_METHOD_UNAVAILABLE blocker. A selection that is not the workspace's, or a payment method it does not list, is 404 NOT_FOUND.

A preview does not reserve stock, fix shipping prices or hold credit. There is no preview ID to save. Review a fresh preview after changing any selection or billing details.

Place an order

POST /v1/orders

Submit the same selections you previewed, with the reviewed total. Use the API body as order.json. This operation creates a manufacturing order and may charge the selected method. Read the returned order ID and payment status.

circuithub order create --workspace acme-electronics --file order.json

Output:

Order:   8001
Status:  in-progress
Payment: Paid
curl -X POST -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "quoteId": 50001,
  "offerId": 880002,
  "shippingAddressId": 6101,
  "shippingOptionId": "ups_ground",
  "paymentMethodId": "card_abc123",
  "expectedTotal": "849.42",
  "poNumber": "PO-2026-042"
}' \
  "https://api.circuithub.com/v1/orders?workspace=acme-electronics"

Response: 201 Created

{
  "id": 8001,
  "urn": "acme-electronics/00001f41",
  "name": "ORD-8001",
  "status": "in-progress",
  "quantity": 10,
  "createdAt": "2026-11-03T10:05:00Z",
  "updatedAt": "2026-11-03T10:05:00Z",
  "quotedShippingDate": "2026-11-06T00:00:00Z",
  "estimatedShippingDate": null,
  "shippedDate": null,
  "trackingNumber": null,
  "shippingService": "UPS Ground",
  "value": 774.45,
  "paymentStatus": "Paid",
  "poNumber": "PO-2026-042",
  "projectId": 12345,
  "projectName": "Power Supply Board",
  "revisionId": 99001,
  "revisionNumber": 3
}

Request body

The five selection fields are the same as the preview request.

FieldTypeDescription
expectedTotalstringRequired. Exact decimal total reviewed in the preview, in the quote currency
poNumberstringOptional. Your purchase order reference; not a duplicate-request key

CircuitHub validates the quote, address, shipping service, billing details, payment method and stock again. It recalculates the total and refuses a mismatch before attempting payment. An equal total is a price check, not a guarantee that every component of the preview is unchanged.

The response uses the existing order representation below. Its value is the existing stored order value, not the new preview’s all-in total or amount due. The read API does not return a saved copy of the preview. Keep your reviewed calculation if you need it; invoices and payments are separate billing records.

Submission errors and retries

HTTP statusCodeAction
400VALIDATION_ERRORCorrect the supplied selections or expected total
409TOTAL_CHANGEDReview a new preview and submit its total
404NOT_FOUNDA selection is not the workspace's; use IDs it lists
409ORDER_NOT_ORDERABLEResolve stock, billing, shipping or payment eligibility blockers. A quote that has already been ordered is refused this way, and the message names its order
410QUOTE_EXPIREDRequest a fresh quote, shipping options and preview
422PAYMENT_FAILEDReview the payment failure; check for an existing order before trying again
503TAX_UNAVAILABLEWait for tax calculation to recover and preview again
503SHIPPING_UNAVAILABLEWait for shipping rates to recover, then request shipping options and a preview again

Do not automatically retry order submission after a timeout, connection loss or server error. An order or payment may already exist. List the workspace’s recent orders and inspect likely matches. A PO number is not unique; if the result is uncertain, contact CircuitHub before resubmitting. Submissions are not idempotent and charging is not exactly-once. Two submissions of the same quote at the same moment are not prevented from both taking payment, so submit an order once and wait for the outcome.

List orders

GET /v1/orders

circuithub order list --workspace acme-electronics

Output:

ID      Status        Date          Qty   Payment   Project
8001    in-progress   2025-03-01    10    Paid      Power Supply Board
8002    completed     2025-02-28    25    Paid      Sensor Module
curl -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  "https://api.circuithub.com/v1/orders?workspace=acme-electronics"

Response:

{
  "orders": [
    {
      "id": 8001,
      "urn": "acme-electronics/00001f41",
      "name": "ORD-8001",
      "status": "in-progress",
      "quantity": 10,
      "createdAt": "2025-03-01T14:00:00Z",
      "updatedAt": "2025-03-02T11:00:00Z",
      "quotedShippingDate": "2025-03-15T00:00:00Z",
      "estimatedShippingDate": "2025-03-14T00:00:00Z",
      "shippedDate": null,
      "trackingNumber": null,
      "shippingService": null,
      "value": 790.50,
      "paymentStatus": "Paid",
      "poNumber": "PO-2025-042",
      "projectId": 12345,
      "projectName": "Power Supply Board",
      "revisionId": 99001,
      "revisionNumber": 3
    }
  ]
}

Query parameters

ParameterTypeDescription
workspacestringRequired. Workspace slug

Response fields

FieldTypeDescription
idintegerOrder ID
urnstringOrder URN
namestringOrder name/number
statusstringin-progress, hold, completed or canceled
quantityintegerNumber of boards ordered
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp
quotedShippingDatestringQuoted shipping date, ISO 8601
estimatedShippingDatestring | nullEstimated shipping date, ISO 8601
shippedDatestring | nullActual ship date, ISO 8601
trackingNumberstring | nullShipment tracking number
shippingServicestring | nullShipping carrier/service
valuenumberExisting stored order value in USD; not the preview’s all-in total
paymentStatusstringUnpaid, Paid or PartiallyPaid; separate from manufacturing status
poNumberstringPurchase order number
projectIdintegerProject this order belongs to
projectNamestringProject name
revisionIdintegerProject revision used for this order
revisionNumberintegerHuman-readable revision number

Get an order

GET /v1/orders/:orderId

circuithub order show 8001 --workspace acme-electronics

Output:

Order:    8001
URN:      acme-electronics/00001f41
Name:     ORD-8001
Status:   in-progress
Quantity: 10
Value:    $790.50
Payment:  Paid
PO:       PO-2025-042

Project:  Power Supply Board (ID: 12345, rev 3)

Created:  2025-03-01T14:00:00Z
Quoted:   2025-03-15T00:00:00Z
curl -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  https://api.circuithub.com/v1/orders/8001

Response:

{
  "id": 8001,
  "urn": "acme-electronics/00001f41",
  "name": "ORD-8001",
  "status": "in-progress",
  "quantity": 10,
  "createdAt": "2025-03-01T14:00:00Z",
  "updatedAt": "2025-03-02T11:00:00Z",
  "quotedShippingDate": "2025-03-15T00:00:00Z",
  "estimatedShippingDate": "2025-03-14T00:00:00Z",
  "shippedDate": null,
  "trackingNumber": null,
  "shippingService": null,
  "value": 790.50,
  "paymentStatus": "Paid",
  "poNumber": "PO-2025-042",
  "projectId": 12345,
  "projectName": "Power Supply Board",
  "revisionId": 99001,
  "revisionNumber": 3
}

On this page