Organizations

Tenant management — create, configure, manage org-level settings and tax-authority integrations.

10 endpoints·Scopes: organizations:read, organizations:write
GET/api/organizations#

List organizations

scope · organizations:read

Lists organizations the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.

Scope: organizations:read
Endpoint: GET /api/organizations

Example request

curl "https://guliel.com/api/organizations?page=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • pagereq
    integer
  • limitreq
    integer
  • searchreq
    string

Response (200/201)

  • organizationsreq
    array<object>
    • idreq
      string
    • namereq
      string
    • countryreq
      string
    • registrationNumberreq
      string
    • addressreq
      string | null
    • iconreq
      string | null
    • countrySpecificDatareq
      object | null
    • users
      array<object>
      • idreq
        string
      • rolereq
        string
      • userIdreq
        string
      • userreq
        object
        • idreq
          string
        • namereq
          string | null
        • emailreq
          string
    • _count
      object
      • customersreq
        integer
      • invoicesreq
        integer
    • createdAtreq
      string
    • updatedAtreq
      string
  • paginationreq
    object
    • pagereq
      integer
    • limitreq
      integer
    • totalreq
      integer
    • totalPagesreq
      integer

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/organizations#

Create an organization

scope · organizations:write

Creates a new organization in the target organization. Returns the created record on success.

Scope: organizations:write
Endpoint: POST /api/organizations

Example request

curl -X POST "https://guliel.com/api/organizations" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "Sample",
  "country": "ISRAEL",
  "registrationNumber": "string"
}'

Request body

  • namereq
    string
  • countryreq
    enum<39>
    ISRAEL · SINGAPORE · USA · GERMANY · NETHERLANDS · SWEDEN · AUSTRIA · FINLAND · DENMARK · SPAIN · SLOVAKIA · IRELAND · +27 more
  • registrationNumberreq
    string
  • address
    string
  • icon
    string
  • countrySpecificData
    object

Response (200/201)

  • idreq
    string
  • namereq
    string
  • countryreq
    string
  • registrationNumberreq
    string
  • addressreq
    string | null
  • iconreq
    string | null
  • countrySpecificDatareq
    object | null
  • users
    array<object>
    • idreq
      string
    • rolereq
      string
    • userIdreq
      string
    • userreq
      object
      • idreq
        string
      • namereq
        string | null
      • emailreq
        string
  • _count
    object
    • customersreq
      integer
    • invoicesreq
      integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/organizations/{id}#

Delete an organization

scope · organizations:write

Deletes the organization. Some endpoints hard-delete the row, others soft-revoke (set revokedAt). Check the response shape.

Scope: organizations:write
Endpoint: DELETE /api/organizations/{id}

Example request

curl -X DELETE "https://guliel.com/api/organizations/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/organizations/{id}#

Get an organization

scope · organizations:read

Fetches a single organization by id. Returns 404 if the organization isn't in the caller's accessible organizations.

Scope: organizations:read
Endpoint: GET /api/organizations/{id}

Example request

curl "https://guliel.com/api/organizations/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • idreq
    string
  • namereq
    string
  • countryreq
    string
  • registrationNumberreq
    string
  • addressreq
    string | null
  • iconreq
    string | null
  • countrySpecificDatareq
    object | null
  • users
    array<object>
    • idreq
      string
    • userIdreq
      string
    • rolereq
      string
    • userreq
      object
      • idreq
        string
      • namereq
        string | null
      • emailreq
        string
  • _count
    object
    • customersreq
      integer
    • invoicesreq
      integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
PATCH/api/organizations/{id}#

Update an organization

scope · organizations:write

Updates an existing organization. Only the fields present in the request body are changed; omitted fields stay as-is.

Scope: organizations:write
Endpoint: PATCH /api/organizations/{id}

Example request

curl -X PATCH "https://guliel.com/api/organizations/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string
  • registrationNumber
    string
  • address
    string | null
  • icon
    string | null
  • countrySpecificData
    object

Response (200/201)

  • idreq
    string
  • namereq
    string
  • countryreq
    string
  • registrationNumberreq
    string
  • addressreq
    string | null
  • iconreq
    string | null
  • countrySpecificDatareq
    object | null
  • users
    array<object>
    • idreq
      string
    • userIdreq
      string
    • rolereq
      string
    • userreq
      object
      • idreq
        string
      • namereq
        string | null
      • emailreq
        string
  • _count
    object
    • customersreq
      integer
    • invoicesreq
      integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
PUT/api/organizations/{id}#

Update an organization

scope · organizations:write

Replaces an existing organization. All required fields must be supplied — omitted fields revert to their schema defaults.

Scope: organizations:write
Endpoint: PUT /api/organizations/{id}

Example request

curl -X PUT "https://guliel.com/api/organizations/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string
  • name
    string
  • registrationNumber
    string
  • address
    string | null
  • icon
    string | null
  • countrySpecificData
    object

Response (200/201)

  • idreq
    string
  • namereq
    string
  • countryreq
    string
  • registrationNumberreq
    string
  • addressreq
    string | null
  • iconreq
    string | null
  • countrySpecificDatareq
    object | null
  • users
    array<object>
    • idreq
      string
    • userIdreq
      string
    • rolereq
      string
    • userreq
      object
      • idreq
        string
      • namereq
        string | null
      • emailreq
        string
  • _count
    object
    • customersreq
      integer
    • invoicesreq
      integer
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/organizations/{id}/icon#

Detach icon from an organization

scope · organizations:writerole · MANAGER+

Removes the association without deleting the underlying record.

Scope: organizations:write
Min role: MANAGER or higher
Endpoint: DELETE /api/organizations/{id}/icon

Example request

curl -X DELETE "https://guliel.com/api/organizations/abc123/icon?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/organizations/{id}/icon#

List icon for an organization

scope · organizations:read

Returns every icon row associated with the given organization.

Scope: organizations:read
Endpoint: GET /api/organizations/{id}/icon

Example request

curl "https://guliel.com/api/organizations/abc123/icon?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

JSON object. The exact response shape is being progressively documented — call the endpoint with a real access token to see the live structure, or check the type definitions exposed by the official client libraries.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/organizations/{id}/icon#

Attach icon to an organization

scope · organizations:writerole · MANAGER+

Creates a new icon attached to the given organization.

Scope: organizations:write
Min role: MANAGER or higher
Endpoint: POST /api/organizations/{id}/icon

Example request

curl -X POST "https://guliel.com/api/organizations/abc123/icon" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string

Response (200/201)

  • successreq
    boolean
  • iconreq
    stringSame-origin URL where the freshly-uploaded icon can be fetched.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/user/organizations#

List organizations for an user

scope · organizations:read

Returns every organizations row associated with the given user.

Scope: organizations:read
Endpoint: GET /api/user/organizations

Example request

curl "https://guliel.com/api/user/organizations" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Response (200/201)

Array of object:
  • idreq
    string
  • namereq
    string
  • countryreq
    string
  • iconreq
    string | null
  • registrationNumberreq
    string
  • addressreq
    string | null
  • countrySpecificDatareq
    object | null
  • rolereq
    stringCaller's role in this org — MANAGER | CONTRIBUTOR | VIEWER.

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal