Create class/location

POST/api/v1/accounting-dimensions

Create a new accounting dimension.

Operation ID: create_dimension_api_v1_accounting_dimensions_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

dimension_typestringrequired

Either 'class' or 'location'.

One of: class, location

namestringrequired
codestring
parent_idstring

Optional parent dimension (for sub-classes/locations).

Responses

201Successful Response

idstringrequired
business_idstringrequired
dimension_typestringrequired
namestringrequired
codestring
parent_idstring
is_activebooleanrequired
created_atstring · date-timerequired
updated_atstring · date-timerequired

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject