REST API

Companies API

Company settings and administration API for users, roles, locations, taxes, payment terms, price lists, modules, and company preferences.

Generated from the Celerp 2.5.0 OpenAPI schema, 21 September 2026.

POST /companies

Create Company

Create a company from the supplied request data.

Request body

FieldTypeRequiredDescription
namestringyesLegal or display name of the new company.

Responses

StatusDescriptionBody
200Returns the created company or creation result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/commercial-state

Get Subscription and Commercial State

Return the current Celerp Connect subscription and entitlement state available to the company settings pages.

Responses

StatusDescriptionBody
200Returns the requested subscription and commercial state result.object

Example

curl -X GET http://localhost:8000/companies/commercial-state \
  -H "Authorization: Bearer $TOKEN"

POST /companies/import/batch

Batch Import Company Settings

Import multiple company settings in one request.

Request body

FieldTypeRequiredDescription
recordsarray of SettingsImportRecordyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many records were created, skipped or failed, with the reason for each failure.celerp__routers__companies__BatchImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me

Get Current Company

Return current company.

Responses

StatusDescriptionBody
200Returns the requested current company result.object

Example

curl -X GET http://localhost:8000/companies/me \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me

Update Current Company

Update current company with the supplied fields.

Request body

FieldTypeRequiredDescription
namestring, optional--Updated legal or display name of the current company.
settingsobject--Company settings values to update.

Responses

StatusDescriptionBody
200Returns the updated current company or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /companies/me

Deactivate Company

Deactivate the current company. Its business records are kept, and its connectors are disconnected so they can be connected again after reactivation.

Responses

StatusDescriptionBody
200Returns the company ID and its new inactive status.object

Example

curl -X DELETE http://localhost:8000/companies/me \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/base-price-list

Get Base Price List

Return base price list.

Responses

StatusDescriptionBody
200Returns the requested base price list result.string

Example

curl -X GET http://localhost:8000/companies/me/base-price-list \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/base-price-list

Update Base Price List

Update base price list with the supplied fields.

Request body

FieldTypeRequiredDescription
namestringyesName of the price list to set as the selected company default.

Responses

StatusDescriptionBody
200Returns the updated base price list or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/base-price-list \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/business-type

Set Company Business Type

Set the company's business type. The only way settings["vertical"] changes.

Request body

FieldTypeRequiredDescription
verticalstringyesVertical

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/business-type \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/categories

Create Company Category

Create a company category from the supplied request data.

Request body

object

Responses

StatusDescriptionBody
200Returns the created company category or creation result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/categories \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

PATCH /companies/me/categories/{category_key}

Rename Company Category

Rename an item category. Items in the category move to the new name.

Parameters

NameInRequiredTypeDescription
category_keypathyesstringStable category key identifying the company category.

Request body

object

Responses

StatusDescriptionBody
200Returns `ok: true` and the number of items moved to the new category name.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/categories/:category_key \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /companies/me/categories/{category_key}

Delete Company Category

Delete an item category from the company's category list.

Parameters

NameInRequiredTypeDescription
category_keypathyesstringStable category key identifying the company category.

Responses

StatusDescriptionBody
200Returns `ok: true` when the change is saved.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X DELETE http://localhost:8000/companies/me/categories/:category_key \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/category-display-names

Get Category Display Names

Return display names keyed by category slug.

Responses

StatusDescriptionBody
200Returns the requested category display names result.object

Example

curl -X GET http://localhost:8000/companies/me/category-display-names \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/category-schema/{category}

Get Category Field Schema

Return category field schema.

Parameters

NameInRequiredTypeDescription
categorypathyesstringCategory value used to filter or identify the requested configuration.

Responses

StatusDescriptionBody
200Returns the requested category field schema result.array of object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X GET http://localhost:8000/companies/me/category-schema/:category \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/category-schema/{category}

Update Category Field Schema

Update category field schema with the supplied fields.

Parameters

NameInRequiredTypeDescription
categorypathyesstringCategory value used to filter or identify the requested configuration.

Request body

FieldTypeRequiredDescription
fieldsarray of ItemSchemaFieldyesField definitions or field updates included in the request.

Responses

StatusDescriptionBody
200Returns the updated category field schema or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/category-schema/:category \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/category-schemas

List Category Field Schemas

Return the available category field schemas.

Responses

StatusDescriptionBody
200Returns the requested category field schemas.object

Example

curl -X GET http://localhost:8000/companies/me/category-schemas \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/column-prefs

Get Column Preferences

Return column preferences.

Responses

StatusDescriptionBody
200Returns the requested column preferences result.object

Example

curl -X GET http://localhost:8000/companies/me/column-prefs \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/column-prefs

Update Column Preferences

Update saved column visibility preferences for the current user.

Request body

FieldTypeRequiredDescription
prefsobjectyesColumn visibility preference values to merge into the user's saved view.

Responses

StatusDescriptionBody
200Returns the updated column preferences or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/column-prefs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/company-category-schemas

List Company Category Schemas

Return category schemas explicitly configured by the company, excluding module-provided defaults.

Responses

StatusDescriptionBody
200Returns the requested company category schemas.object

Example

curl -X GET http://localhost:8000/companies/me/company-category-schemas \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/contact-defaults

Get Contact Defaults

Return contact defaults.

Responses

StatusDescriptionBody
200Returns the requested contact defaults result.object

Example

curl -X GET http://localhost:8000/companies/me/contact-defaults \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/contact-defaults

Update Contact Defaults

Update contact defaults with the supplied fields.

Request body

FieldTypeRequiredDescription
defaultsobjectyesDefault contact settings to save for the company.

Responses

StatusDescriptionBody
200Returns the updated contact defaults or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/contact-defaults \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/contact-tags

Get Contact Tags

Return contact tags.

Responses

StatusDescriptionBody
200Returns the requested contact tags result.array of object

Example

curl -X GET http://localhost:8000/companies/me/contact-tags \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/contact-tags

Update Contact Tags

Update contact tags with the supplied fields.

Request body

FieldTypeRequiredDescription
tagsarray of objectyesTags to assign or store for the record.

Responses

StatusDescriptionBody
200Returns the updated contact tags or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/contact-tags \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/default-price-list

Get Default Price List

Return default price list.

Responses

StatusDescriptionBody
200Returns the requested default price list result.string

Example

curl -X GET http://localhost:8000/companies/me/default-price-list \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/default-price-list

Update Default Price List

Update default price list with the supplied fields.

Request body

FieldTypeRequiredDescription
namestringyesName of the price list to set as the selected company default.

Responses

StatusDescriptionBody
200Returns the updated default price list or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/default-price-list \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/demo/reseed

Reseed Demo Inventory

Replace the demo items with a fresh set for the company's industry. Existing demo items are removed first, so switching industry does not mix two demo sets.

Responses

StatusDescriptionBody
200Returns `ok: true`, the industry used, and how many old demo items were removed.object

Example

curl -X POST http://localhost:8000/companies/me/demo/reseed \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/item-schema

Get Inventory Item Schema

Return inventory item schema.

Responses

StatusDescriptionBody
200Returns the requested inventory item schema result.array of object

Example

curl -X GET http://localhost:8000/companies/me/item-schema \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/item-schema

Update Inventory Item Schema

Update inventory item schema with the supplied fields.

Request body

FieldTypeRequiredDescription
fieldsarray of ItemSchemaFieldyesField definitions or field updates included in the request.

Responses

StatusDescriptionBody
200Returns the updated inventory item schema or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/item-schema \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/locations

List Locations

Return the available locations.

Responses

StatusDescriptionBody
200Returns the requested locations.object

Example

curl -X GET http://localhost:8000/companies/me/locations \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/locations

Create Location

Create a location from the supplied request data.

Request body

FieldTypeRequiredDescription
namestringyesHuman-readable name of the business or inventory location.
typestringyesType or category of the record.
addressobject, optional--Postal or physical address associated with the location.
is_defaultboolean--Whether this record should be the default choice for its category.

Responses

StatusDescriptionBody
200Returns the created location or creation result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/locations \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/locations/import/batch

Batch Import Locations

Import multiple locations in one request.

Request body

FieldTypeRequiredDescription
recordsarray of objectyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many locations were created, skipped or failed.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/locations/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

PATCH /companies/me/locations/{location_id}

Update Location

Update location with the supplied fields.

Parameters

NameInRequiredTypeDescription
location_idpathyesstringIdentifier of the inventory or business location.

Request body

FieldTypeRequiredDescription
namestring, optional--Updated human-readable name of the business or inventory location.
addressobject, optional--Postal or physical address associated with the location.
typestring, optional--Type or category of the record.
is_defaultboolean, optional--Whether this record should be the default choice for its category.

Responses

StatusDescriptionBody
200Returns the updated location or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/locations/:location_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /companies/me/locations/{location_id}

Delete Location

Delete a stock location.

Parameters

NameInRequiredTypeDescription
location_idpathyesstringIdentifier of the inventory or business location.

Responses

StatusDescriptionBody
200Returns `ok: true` when the change is saved.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X DELETE http://localhost:8000/companies/me/locations/:location_id \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/modules

List Modules

List installed Celerp modules with their enabled and running state.

Responses

StatusDescriptionBody
200Returns the requested modules.array of object

Example

curl -X GET http://localhost:8000/companies/me/modules \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/modules/buy

Purchase Marketplace Module

Start the purchase flow for a Celerp module and return the checkout URL. Requires company administration access.

Request body

FieldTypeRequiredDescription
slugstringyesStable module or catalog slug identifying the requested package.
kindstring--Module purchase or catalog option requested by the client.
custom_textstring, optional--Optional custom text associated with the purchase request.

Responses

StatusDescriptionBody
200Returns the checkout URL for the module.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/buy \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/modules/import

Import Module ZIP

Install a Celerp module package from an uploaded ZIP archive. The imported module remains disabled until an administrator enables it.

Responses

StatusDescriptionBody
200Returns `ok: true` and the installed module's details.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/import \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/modules/import-path

Import Module from Local Folder

Install a Celerp module from a local folder selected on the desktop installation. Requires company administration access.

Request body

FieldTypeRequiredDescription
pathstringyesLocal filesystem path selected for the supported desktop operation.

Responses

StatusDescriptionBody
200Returns `ok: true` and the installed module's details.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/import-path \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/modules/licenses

List Module Licenses

Return the marketplace module licenses currently available to this Celerp installation.

Responses

StatusDescriptionBody
200Returns the requested module licenses.object

Example

curl -X GET http://localhost:8000/companies/me/modules/licenses \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/modules/marketplace-download

Download Marketplace Module

Download and stage a marketplace module package for later installation. Requires company administration access.

Request body

FieldTypeRequiredDescription
slugstringyesStable module or catalog slug identifying the requested package.

Responses

StatusDescriptionBody
200Returns the generated file or download response.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/marketplace-download \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/modules/marketplace-install

Install Marketplace Module

Install a previously staged marketplace module package. The module remains disabled until an administrator enables it.

Request body

FieldTypeRequiredDescription
pathstringyesLocal filesystem path selected for the supported desktop operation.

Responses

StatusDescriptionBody
200Returns `ok: true` and the installed module's details.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/marketplace-install \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/modules/{module_name}/delete

Delete Module

Delete an installed non-default module that is no longer enabled or running. This removes the module package, not its separate stored business data.

Parameters

NameInRequiredTypeDescription
module_namepathyesstringInstalled module name.

Responses

StatusDescriptionBody
200Returns `ok: true` and the module name.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/:module_name/delete \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/modules/{module_name}/disable

Disable Module

Disable an installed Celerp module for the company. Requires company administration access; a restart may be required before the change takes effect.

Parameters

NameInRequiredTypeDescription
module_namepathyesstringInstalled module name.

Responses

StatusDescriptionBody
200Returns the module name, its enabled state, whether a restart is needed, and the list of enabled modules.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/:module_name/disable \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/modules/{module_name}/enable

Enable Module

Enable an installed Celerp module for the company. Requires company administration access; a restart may be required before the module becomes active.

Parameters

NameInRequiredTypeDescription
module_namepathyesstringInstalled module name.

Responses

StatusDescriptionBody
200Returns the module name, its enabled state, whether a restart is needed, and the list of enabled modules.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/:module_name/enable \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/modules/{module_name}/purge-data

Purge Module Data

Permanently delete stored data owned by a disabled Celerp module without removing the module package. Requires company administration access.

Parameters

NameInRequiredTypeDescription
module_namepathyesstringInstalled module name.

Responses

StatusDescriptionBody
200Returns `ok: true`, the module name and the data tables that were removed.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/modules/:module_name/purge-data \
  -H "Authorization: Bearer $TOKEN"

GET /companies/me/payment-terms

Get Sales Payment Terms

Return sales payment terms.

Responses

StatusDescriptionBody
200Returns the requested sales payment terms result.array of object

Example

curl -X GET http://localhost:8000/companies/me/payment-terms \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/payment-terms

Update Sales Payment Terms

Update sales payment terms with the supplied fields.

Request body

FieldTypeRequiredDescription
termsarray of objectyesPayment-term definitions to save for the company.

Responses

StatusDescriptionBody
200Returns the updated sales payment terms or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/payment-terms \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/payment-terms/import/batch

Batch Import Sales Payment Terms

Import multiple sales payment terms in one request.

Request body

FieldTypeRequiredDescription
recordsarray of SettingsImportRecordyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many payment terms were created, skipped or failed.celerp__routers__companies__BatchImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/payment-terms/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/price-lists

List Price Lists

Return the available price lists.

Responses

StatusDescriptionBody
200Returns the requested price lists.array of object

Example

curl -X GET http://localhost:8000/companies/me/price-lists \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/price-lists

Update Price Lists

Update price lists with the supplied fields.

Request body

FieldTypeRequiredDescription
price_listsarray of objectyesPrice-list definitions to save for the company.
base_price_liststring, optional--Name or identifier of the company's base price list.

Responses

StatusDescriptionBody
200Returns the updated price lists or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/price-lists \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/purchasing-payment-terms

Get Purchasing Payment Terms

Return purchasing payment terms.

Responses

StatusDescriptionBody
200Returns the requested purchasing payment terms result.array of object

Example

curl -X GET http://localhost:8000/companies/me/purchasing-payment-terms \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/purchasing-payment-terms

Update Purchasing Payment Terms

Update purchasing payment terms with the supplied fields.

Request body

FieldTypeRequiredDescription
termsarray of objectyesPayment-term definitions to save for the company.

Responses

StatusDescriptionBody
200Returns the updated purchasing payment terms or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/purchasing-payment-terms \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/purchasing-payment-terms/import/batch

Batch Import Purchasing Payment Terms

Import multiple purchasing payment terms in one request.

Request body

FieldTypeRequiredDescription
recordsarray of SettingsImportRecordyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many payment terms were created, skipped or failed.celerp__routers__companies__BatchImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/purchasing-payment-terms/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/purchasing-taxes

Get Purchasing Tax Rates

Return purchasing tax rates.

Responses

StatusDescriptionBody
200Returns the requested purchasing tax rates result.array of object

Example

curl -X GET http://localhost:8000/companies/me/purchasing-taxes \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/purchasing-taxes

Update Purchasing Tax Rates

Update purchasing tax rates with the supplied fields.

Request body

FieldTypeRequiredDescription
taxesarray of TaxRateyesTax-rate definitions to save for the company.

Responses

StatusDescriptionBody
200Returns the updated purchasing tax rates or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/purchasing-taxes \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/purchasing-taxes/import/batch

Batch Import Purchasing Tax Rates

Import multiple purchasing tax rates in one request.

Request body

FieldTypeRequiredDescription
recordsarray of SettingsImportRecordyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many tax rates were created, skipped or failed.celerp__routers__companies__BatchImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/purchasing-taxes/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/reactivate

Reactivate Company

Reactivate a previously deactivated company. Admin only.

Responses

StatusDescriptionBody
200Returns the company ID, its active status, and the connectors that need to be connected again.object

Example

curl -X POST http://localhost:8000/companies/me/reactivate \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/role-permissions

Update Role Permission

Update role permission with the supplied fields.

Request body

FieldTypeRequiredDescription
perm_keystringyesPermission key whose role assignment should be changed.
role_keystringyesRole key whose permission assignment should be changed.
grantedbooleanyesWhether the selected role should hold the selected permission.

Responses

StatusDescriptionBody
200Returns the updated role permission or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/role-permissions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/taxes

Get Sales Tax Rates

Return sales tax rates.

Responses

StatusDescriptionBody
200Returns the requested sales tax rates result.array of object

Example

curl -X GET http://localhost:8000/companies/me/taxes \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/taxes

Update Sales Tax Rates

Update sales tax rates with the supplied fields.

Request body

FieldTypeRequiredDescription
taxesarray of TaxRateyesTax-rate definitions to save for the company.

Responses

StatusDescriptionBody
200Returns the updated sales tax rates or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/taxes \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/taxes/import/batch

Batch Import Sales Tax Rates

Import multiple sales tax rates in one request. Existing tax names are skipped case-insensitively, while new names are added.

Request body

FieldTypeRequiredDescription
recordsarray of SettingsImportRecordyesList of records included in the batch request.

Responses

StatusDescriptionBody
200Returns how many tax rates were created, skipped or failed.celerp__routers__companies__BatchImportResult
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/taxes/import/batch \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/terms-conditions

Get Document Terms and Conditions

Return document terms and conditions.

Responses

StatusDescriptionBody
200Returns the requested document terms and conditions result.array of object

Example

curl -X GET http://localhost:8000/companies/me/terms-conditions \
  -H "Authorization: Bearer $TOKEN"

PATCH /companies/me/terms-conditions

Update Document Terms and Conditions

Update document terms and conditions with the supplied fields.

Request body

FieldTypeRequiredDescription
templatesarray of objectyesTerms-and-conditions templates to save for business documents.

Responses

StatusDescriptionBody
200Returns the updated document terms and conditions or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/terms-conditions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/units

List Units of Measure

Return the available units of measure.

Responses

StatusDescriptionBody
200Returns the requested units of measure.array of object

Example

curl -X GET http://localhost:8000/companies/me/units \
  -H "Authorization: Bearer $TOKEN"

PUT /companies/me/units

Replace Units of Measure

Replace the company's list of units of measure.

Request body

FieldTypeRequiredDescription
unitsarray of UnitRecordyesUnits of measure to save for the company.

Responses

StatusDescriptionBody
200Returns the updated units of measure or update result.array of object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PUT http://localhost:8000/companies/me/units \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /companies/me/users

List Company Users

Return the available company users.

Responses

StatusDescriptionBody
200Returns the requested company users.object

Example

curl -X GET http://localhost:8000/companies/me/users \
  -H "Authorization: Bearer $TOKEN"

POST /companies/me/users

Create Company User

Create a company user from the supplied request data.

Request body

FieldTypeRequiredDescription
emailstringyesEmail address associated with the user, contact, or request.
namestringyesDisplay name of the company user.
rolestring--Role assigned to the company user or contact person.
passwordstringyesPassword supplied for authentication or initial user creation.

Responses

StatusDescriptionBody
200Returns the created company user or creation result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/users \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

PATCH /companies/me/users/{user_id}

Update Company User

Update company user with the supplied fields.

Parameters

NameInRequiredTypeDescription
user_idpathyesstringIdentifier of the company user.

Request body

FieldTypeRequiredDescription
rolestring, optional--Role assigned to the company user or contact person.
is_activeboolean, optional--Whether the record or user is active.

Responses

StatusDescriptionBody
200Returns the updated company user or update result.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X PATCH http://localhost:8000/companies/me/users/:user_id \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /companies/me/users/{user_id}/installation-owner

Transfer Installation Owner

Make another active user in this company the installation owner, who manages installation-wide settings such as updates.

Parameters

NameInRequiredTypeDescription
user_idpathyesstringIdentifier of the user who becomes the installation owner.

Responses

StatusDescriptionBody
200Returns `ok: true` once the transfer is saved.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/companies/me/users/:user_id/installation-owner \
  -H "Authorization: Bearer $TOKEN"