Dailys
Docs

User

This section describes the API for accessing the authorised user's details. This will be the user which the API will identify as authenticated.

Show

This API route will return the user's data, which includes the personal information as well as the settings that the user has selected for the application.

This data also includes a listing of all of the assigned permissions that the user has, a long with the currently assigned roles that the user has.

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

URI

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

Response

{
  "id": 1,
  "name": "Acme User",
  "email": "[email protected]",
  "format_timezone": "Pacific/Auckland",
  "format_date": "YYYY-MM-DD",
  "format_time": "HH:MM",
  "format_week": "Monday",
  "owner": true,
  "created_at": "2000-01-01 00:00:00",
  "updated_at": "2000-01-01 00:00:00",
  "position": null,
  "department": null,
  "bio": null,
  "phone": null,
  "email_2": null,
  "projects_count": 1,
  "times_count": 0,
  "expenses_count": 0,
  "permissions": [
    {
      "id": 1,
      "name": "organisation.show",
      "description": "Access a single organisation."
    }
  ],
  "current": true,
  "roles": []
}

Update

This API route will allow you to update your profile details, which includes your personal 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/user

Parameters

Parameter Type Description
name string The full name for your account details.
email email A valid email address that will be used as the primary contact, i.e. company email.
email_2 email A valid email address that can be used for contact information, i.e. personal email.
phone string The contact phone number for the user.
position string The position or job title that the user holds within the organisation.
department string The department within the organisation that the user works in.
bio string The personal biography for the user.
format_timezone timezone The timezone preference for the user.
format_date format The date format preference for the user.
format_time format The time format preference for the user.
format_week week The day of the week that the user considers to be the start of week.

Request

{
  "name": "Another Acme Name"
}

Response

{
  "success": true,
  "user": {
    "id": 1,
    "name": "Another Acme Name",
    "email": "[email protected]",
    "format_timezone": "Pacific/Auckland",
    "format_date": "YYYY-MM-DD",
    "format_time": "HH:MM",
    "format_week": "Monday",
    "owner": true,
    "created_at": "2000-01-01 00:00:00",
    "updated_at": "2000-01-01 00:00:00",
    "position": null,
    "department": null,
    "bio": null,
    "phone": null,
    "email_2": null,
    "projects_count": 1,
    "times_count": 0,
    "expenses_count": 0,
    "permissions": [
      {
        "id": 1,
        "name": "organisation.show",
        "description": "Access a single organisation."
      }
    ],
    "current": true,
    "roles": []
  }
}