API Reference

Company

The company record holds the organisation's name, contact details, and billing details.

Retrieve the company returns the record your account is linked to. Update the company writes to the record your account owns, creating it if needed, and links your account to it. For the first administrator, whose record is created during first-run setup, these are the same record. An administrator whose account is not linked to a record receives an empty object until they save one.

Reading or changing the company record returns 402 while the installation's licence is restricted, as it is once a licence expires.

Administrator access. Every endpoint on this page requires an administrator account.

The company object

Attributes

  • id integer

    Unique identifier of the company record.

  • company_name string

    The company's name.

  • company_email nullable string

    The company's contact email address.

  • website nullable string

    The company's website.

  • company_size nullable string

    The company's size band.

  • industry nullable string

    The company's industry.

  • country nullable string

    The company's country.

  • city nullable string

    The company's city.

  • state nullable string

    The company's state or region.

  • billing_name nullable string

    Name to bill.

  • billing_address nullable string

    Billing address.

  • billing_country nullable string

    Billing country.

  • billing_city nullable string

    Billing city.

  • billing_state nullable string

    Billing state or region.

  • billing_postal_code nullable string

    Billing postal code.

  • vat_number nullable string

    VAT number.

  • team_members nullable array of objects

    Team member list stored with the record, or null when none is stored.

  • created_at string

    When the record was created, as an HTTP date such as Tue, 01 Sep 2026 09:30:00 GMT.

  • updated_at string

    When the record was last changed, as an HTTP date.

The company object
{
  "id": 1,
  "company_name": "Contoso Ltd",
  "company_email": "info@example.com",
  "website": "https://www.example.com",
  "company_size": "201-500",
  "industry": "Manufacturing",
  "country": "United Kingdom",
  "city": "London",
  "state": null,
  "billing_name": "Contoso Ltd",
  "billing_address": "1 Example Way",
  "billing_country": "United Kingdom",
  "billing_city": "London",
  "billing_state": null,
  "billing_postal_code": "EC1A 1BB",
  "vat_number": "GB123456789",
  "team_members": null,
  "created_at": "Tue, 01 Sep 2026 09:30:00 GMT",
  "updated_at": "Fri, 11 Sep 2026 08:30:00 GMT"
}

Retrieve the company

GET /api/admin/company

Returns the company record your account is linked to, or an empty object in data when there is none.

Authentication
Bearer token How it works
Permission
Requires an administrator account.

Parameters

No parameters.

Returns

Returns the company object in data, or an empty object.

Errors

  • 403 The caller is not an administrator.
Request
curl "$VDF_BASE_URL/api/admin/company" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "success": true,
  "data": {
    "id": 1,
    "company_name": "Contoso Ltd",
    "company_email": "info@example.com",
    "website": "https://www.example.com",
    "company_size": "201-500",
    "industry": "Manufacturing",
    "country": "United Kingdom",
    "city": "London",
    "state": null,
    "billing_name": "Contoso Ltd",
    "billing_address": "1 Example Way",
    "billing_country": "United Kingdom",
    "billing_city": "London",
    "billing_state": null,
    "billing_postal_code": "EC1A 1BB",
    "vat_number": "GB123456789",
    "team_members": null,
    "created_at": "Tue, 01 Sep 2026 09:30:00 GMT",
    "updated_at": "Fri, 11 Sep 2026 08:30:00 GMT"
  }
}

Update the company

PUT /api/admin/company

Creates or updates the company record owned by your account.

Saves company and billing details on the record your account owns, creating it if needed, and links your account to that record.

Only the fields you send are changed. Omitted fields, null values, and empty strings keep their current values, so a field can't be cleared through this endpoint. Text values are trimmed. company.name is required on every request.

Authentication
Bearer token How it works
Permission
Requires an administrator account.

Body parameters application/json

  • company object Required

    Company details.

    Show child parameters Hide child parameters
    • name string Required

      The company's name.

    • email string

      The company's contact email address.

    • website string

      The company's website.

    • company_size string

      The company's size band, such as 201-500.

    • industry string

      The company's industry.

    • country string

      The company's country.

    • city string

      The company's city.

    • state string

      The company's state or region.

  • billing object

    Billing details.

    Show child parameters Hide child parameters
    • name string

      Name to bill.

    • address string

      Billing address.

    • country string

      Billing country.

    • city string

      Billing city.

    • state string

      Billing state or region.

    • postalCode string

      Billing postal code.

    • vatNumber string

      VAT number.

Returns

Returns the saved company object in data.

Errors

  • 403 The caller is not an administrator.
  • 500 company.name is missing or blank, or the record could not be saved.
Request
curl -X PUT "$VDF_BASE_URL/api/admin/company" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "company": {
      "name": "Contoso Ltd",
      "email": "info@example.com",
      "industry": "Manufacturing"
    },
    "billing": {
      "address": "1 Example Way",
      "postalCode": "EC1A 1BB",
      "vatNumber": "GB123456789"
    }
  }'
Response 200
{
  "success": true,
  "message": "Company details updated successfully",
  "data": {
    "id": 1,
    "company_name": "Contoso Ltd",
    "company_email": "info@example.com",
    "website": "https://www.example.com",
    "company_size": "201-500",
    "industry": "Manufacturing",
    "country": "United Kingdom",
    "city": "London",
    "state": null,
    "billing_name": "Contoso Ltd",
    "billing_address": "1 Example Way",
    "billing_country": "United Kingdom",
    "billing_city": "London",
    "billing_state": null,
    "billing_postal_code": "EC1A 1BB",
    "vat_number": "GB123456789",
    "team_members": null,
    "created_at": "Tue, 01 Sep 2026 09:30:00 GMT",
    "updated_at": "Fri, 11 Sep 2026 08:30:00 GMT"
  }
}