CircuitHub

Shipping addresses

Save delivery addresses for a workspace.

Shipping addresses belong to a workspace. They describe where boards are delivered and are separate from the billing address.

List shipping addresses

GET /v1/shipping-addresses

Select a saved address by its ID.

circuithub shipping-address list --workspace acme-electronics

Output:

ID    RECIPIENT   CITY    COUNTRY
6101  Alex Smith  Boston  US
curl -X GET -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  "https://api.circuithub.com/v1/shipping-addresses?workspace=acme-electronics"

Response: 200 OK

{
  "shippingAddresses": [
    {
      "id": 6101,
      "name": "Alex Smith",
      "company": "Acme Electronics",
      "street1": "100 Main Street",
      "street2": null,
      "street3": null,
      "city": "Boston",
      "state": "MA",
      "zip": "02110",
      "countryCode": "US",
      "phoneNumber": "+16175550100"
    }
  ]
}

Address fields

FieldTypeDescription
idintegerServer-assigned saved address ID; not a create input
namestringRecipient name
companystring or nullRecipient company
street1stringStreet address
street2 / street3string or nullAdditional address lines
citystringCity
statestring or nullState or region; required where the destination needs one
zipstring or nullPostal code; required where the destination needs one
countryCodestringTwo-letter country code, for example US
phoneNumberstringContact telephone number, including country code

The workspace query parameter is required on every address-book operation. Older saved addresses may have null contact or address fields; complete them before requesting shipping options. Address validation does not guarantee delivery availability.

Get a shipping address

GET /v1/shipping-addresses/:addressId

Read one address in the workspace’s address book.

circuithub shipping-address show 6101 --workspace acme-electronics

Output:

ID:        6101
Recipient: Alex Smith
Address:   100 Main Street, Boston, MA 02110, US
curl -X GET -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  "https://api.circuithub.com/v1/shipping-addresses/6101?workspace=acme-electronics"

Response: 200 OK

{
  "id": 6101,
  "name": "Alex Smith",
  "company": "Acme Electronics",
  "street1": "100 Main Street",
  "street2": null,
  "street3": null,
  "city": "Boston",
  "state": "MA",
  "zip": "02110",
  "countryCode": "US",
  "phoneNumber": "+16175550100"
}

Add a shipping address

POST /v1/shipping-addresses

Save a delivery address. Use the API body below as address.json. Keep the returned ID for shipping options and order preview.

circuithub shipping-address create --workspace acme-electronics --file address.json

Output:

Created shipping address: 6101
curl -X POST -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Alex Smith",
  "company": "Acme Electronics",
  "street1": "100 Main Street",
  "street2": null,
  "street3": null,
  "city": "Boston",
  "state": "MA",
  "zip": "02110",
  "countryCode": "US",
  "phoneNumber": "+16175550100"
}' \
  "https://api.circuithub.com/v1/shipping-addresses?workspace=acme-electronics"

Response: 201 Created

{
  "id": 6101,
  "name": "Alex Smith",
  "company": "Acme Electronics",
  "street1": "100 Main Street",
  "street2": null,
  "street3": null,
  "city": "Boston",
  "state": "MA",
  "zip": "02110",
  "countryCode": "US",
  "phoneNumber": "+16175550100"
}

Replace a shipping address

PUT /v1/shipping-addresses/:addressId

Send the full address. Replacement creates a new address record and removes the old one from this address book, matching the Portal. Existing orders retain the old address. Use the new ID and request fresh shipping options and a new preview.

circuithub shipping-address replace 6101 --workspace acme-electronics --file address.json

Output:

Replaced shipping address: 6101
New address ID:            6102
curl -X PUT -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Alex Smith",
  "company": "Acme Electronics",
  "street1": "200 Main Street",
  "street2": null,
  "street3": null,
  "city": "Boston",
  "state": "MA",
  "zip": "02110",
  "countryCode": "US",
  "phoneNumber": "+16175550100"
}' \
  "https://api.circuithub.com/v1/shipping-addresses/6101?workspace=acme-electronics"

Response: 200 OK

{
  "id": 6102,
  "name": "Alex Smith",
  "company": "Acme Electronics",
  "street1": "200 Main Street",
  "street2": null,
  "street3": null,
  "city": "Boston",
  "state": "MA",
  "zip": "02110",
  "countryCode": "US",
  "phoneNumber": "+16175550100"
}

Remove a shipping address

DELETE /v1/shipping-addresses/:addressId

Remove an address from the workspace’s address book. This does not change an existing order’s delivery address.

circuithub shipping-address remove 6101 --workspace acme-electronics

Output:

Removed shipping address: 6101
curl -X DELETE -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  "https://api.circuithub.com/v1/shipping-addresses/6101?workspace=acme-electronics"

Response: 204 No Content

No response body.

Errors

Errors: 400 VALIDATION_ERROR for incomplete or invalid fields, and 404 NOT_FOUND when the address is not in the selected workspace.

On this page