Open Inventory docs
API referenceOrganizationsAdminOrganizationsId

Update any organization as a deployment superadmin

The API runs on your own Open Inventory instance. Session-authenticated requests require a session on that instance.

PATCH
/admin/organizations/{id}

Authorization

superadminSession
cookieauthjs.session-token<token>

Auth.js browser session cookie for an account whose email is listed in the deployment's SUPERADMIN_EMAILS environment variable. HTTPS deployments use the secure-prefixed cookie variant.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
Properties1 <= properties
name?string
Length1 <= length <= 160
slug?string
Match^[a-z0-9]+(?:-[a-z0-9]+)*$
Length1 <= length <= 48
allowNegativeStock?boolean

Response Body

Organization updated

application/json
  1. response
organization*
Example Request
curl -X PATCH 'https://inventory.example.com/api/v1/admin/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "organization": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "name": "string",    "slug": "string",    "isReadOnly": true,    "allowNegativeStock": true  }}