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-electronicsOutput:
ID RECIPIENT CITY COUNTRY
6101 Alex Smith Boston UScurl -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
| Field | Type | Description |
|---|---|---|
id | integer | Server-assigned saved address ID; not a create input |
name | string | Recipient name |
company | string or null | Recipient company |
street1 | string | Street address |
street2 / street3 | string or null | Additional address lines |
city | string | City |
state | string or null | State or region; required where the destination needs one |
zip | string or null | Postal code; required where the destination needs one |
countryCode | string | Two-letter country code, for example US |
phoneNumber | string | Contact 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-electronicsOutput:
ID: 6101
Recipient: Alex Smith
Address: 100 Main Street, Boston, MA 02110, UScurl -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.jsonOutput:
Created shipping address: 6101curl -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.jsonOutput:
Replaced shipping address: 6101
New address ID: 6102curl -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-electronicsOutput:
Removed shipping address: 6101curl -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.