Dailys
Docs

Organisation

This section describes the API for accessing the organisation's details. This will only be accessible to users with the correct permissions. If the user does not have the correct permission, then only the organisation name and owner will be exposed.

Show

This API route returns all of the organisation data, which includes the invoice template information. The owner of the organisation is also returned with the data.

This resource requires authorisation. Please read the documentation on authorisation.

URI

GET https://api.dailys.nz/api/v1/organisation

Permissions

Response

{
  "name": "Acme Company",
  "tax": 0.15,
  "email": "[email protected]",
  "phone": null,
  "fax": null,
  "tax_number": null,
  "website": null,
  "invoice_details": null,
  "invoice_theme": null,
  "brand_logo": null,
  "brand_primary": null,
  "brand_secondary": null,
  "default_timezone": "Pacific/Auckland",
  "default_increment": 15,
  "default_country": "NZ",
  "default_currency": "NZD",
  "default_rate": 15000,
  "default_date": "YYYY-MM-DD",
  "default_time": "HH:MM",
  "default_week": "Monday",
  "created_at": "2000-01-01 00:00:00",
  "updated_at": "2000-01-01 00:00:00",
  "new": 0,
  "users_count": 1,
  "roles_count": 3,
  "clients_count": 0,
  "projects_count": 1,
  "invites_count": 0,
  "categories_count": 1,
  "tasks_count": 5,
  "invoices_count": 0,
  "charges_count": 0,
  "address": {
    "street": null,
    "street_2": null,
    "suburb": null,
    "city": null,
    "state": null,
    "postal": null,
    "country": "NZ"
  },
  "postal": {
    "street": null,
    "street_2": null,
    "suburb": null,
    "city": null,
    "state": null,
    "postal": null,
    "country": "NZ"
  },
  "owner": {
    "id": 1,
    "name": "Another Acme Name",
    "email": "[email protected]",
    "current": true
  }
}

Update

This API route will allow you to update the organisation details, which includes organisation preferences for the dailys application. As this resource already exists, there are no required fields, so you can send as many or as few parameters as you would like.

This resource requires authorisation. Please read the documentation on authorisation.

URI

PUT https://api.dailys.nz/api/v1/organisation

Permissions

Parameters

Parameter Type Description
name string The full legal name of the organisation.
email email The email address for the organisation, displayed on invoices.
phone string The phone number for the organisation, displayed on invoices.
fax string The fax number for the organisation, displayed on invoices.
address address The physical address for the organisation, displayed on invoices.
postal address The postal address for the organisation, displayed on invoices.
defeault_rate integer The organisation default billing rate in cents.
defeault_currency currency The organisation default billing currency.
defeault_country country The organisation default country.
default_timezone timezone The default timezone preference for the organisation users.
default_increment increment The default time increment preference for the organisation users.
default_date format The default date format preference for the organisation users.
default_time format The default time format preference for the organisation users.
default_week week The default day of the week that the user considers to be the start of week.

Request

{
  "name": "Another Acme Company"
}

Response

{
  "success": true,
  "organisation": {
    "name": "Another Acme Company",
    "tax": 0.15,
    "email": "[email protected]",
    "phone": null,
    "fax": null,
    "tax_number": null,
    "website": null,
    "invoice_details": null,
    "invoice_theme": null,
    "brand_logo": null,
    "brand_primary": null,
    "brand_secondary": null,
    "default_timezone": "Pacific/Auckland",
    "default_increment": 15,
    "default_country": "NZ",
    "default_currency": "NZD",
    "default_rate": 15000,
    "default_date": "YYYY-MM-DD",
    "default_time": "HH:MM",
    "default_week": "Monday",
    "created_at": "2000-01-01 00:00:00",
    "updated_at": "2000-01-01 00:00:00",
    "new": 0,
    "users_count": 1,
    "roles_count": 3,
    "clients_count": 0,
    "projects_count": 1,
    "invites_count": 0,
    "categories_count": 1,
    "tasks_count": 5,
    "invoices_count": 0,
    "charges_count": 0,
    "address": {
      "street": null,
      "street_2": null,
      "suburb": null,
      "city": null,
      "state": null,
      "postal": null,
      "country": "NZ"
    },
    "postal": {
      "street": null,
      "street_2": null,
      "suburb": null,
      "city": null,
      "state": null,
      "postal": null,
      "country": "NZ"
    },
    "owner": {
      "id": 1,
      "name": "Another Acme Name",
      "email": "[email protected]",
      "current": true
    }
  }
}