Hivebuy External API (v2)

Sections

Theme switcher

Create an address

Header Parameters

Authorizationstring

Path Parameters

companyIdstring Required

Company ID. Must be one of the IDs returned by GET /api/v2/companies/.

Body Parameters

namestring

Label for the address, e.g. "Bag End".

streetstring Required
houseNumberstring Required
addressSupplementstring | null

Second address line.

postalCodestring Required
citystring Required
countrystring
isDefaultboolean

Whether this is the company default address.

defaultDeliveryboolean

Setting this to true moves the flag: the previous holder is cleared and the call returns 200/201. Unsetting the last one is a 400.

defaultInvoiceboolean

Setting this to true moves the flag: the previous holder is cleared and the call returns 200/201. Unsetting the last one is a 400.

typestring

personal and manual are rejected with 400 on create and update: they are per-user records, and a machine caller cannot own one. Existing rows of those types stay readable.

Enum values:
companybillingshippingoffice

Response

201
Object

Created. The body is the read shape, with relations nested.

Response Attributes

idstring
namestring

Label for the address, e.g. "Bag End".

streetstring Required
houseNumberstring Required
addressSupplementstring | null

Second address line.

postalCodestring Required
citystring Required
countrystring
isDefaultboolean

Whether this is the company default address.

defaultDeliveryboolean

Setting this to true moves the flag: the previous holder is cleared and the call returns 200/201. Unsetting the last one is a 400.

defaultInvoiceboolean

Setting this to true moves the flag: the previous holder is cleared and the call returns 200/201. Unsetting the last one is a 400.

typestring

All six types are readable. Only company, billing, shipping and office can be written, see the write payload.

Enum values:
companybillingshippingpersonalofficemanual
createdAtstring

When the row was created.

readOnly
updatedAtstring

When the row itself last changed.

readOnly
deletedstring | null

null on a live row; the timestamp of the soft delete otherwise. Read-only everywhere.

readOnly
400
Object

Validation failed. attr names the field, in snake_case.

Response Attributes

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

401
Object

Missing, invalid, or expired API key, or a session credential was used instead of an API key.

Response Attributes

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

403
Object

Authenticated but not entitled: the key's user is not an active member of this company, the External API feature (or the resource's own feature) is not enabled for it, the key lacks the scope this verb needs, or a browser session was used.

Response Attributes

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

429
Object

Rate limit exceeded (60 requests per minute per API key). Retry after the number of seconds given in the message.

Response Attributes

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

POST

/

Select
1

Response