This section describes the API for accessing the organisation's invites. This will include all of the invites of the organisation that the authenticated user has access to.
This API route will return a paginated list of all of the invites that belong to the organisation.
The index endpoint can be used as a reliable form of searching, as search results are paginated, and related resources of the invite are also searched to increase the effeciveness of the search.
This resource requires authorisation. Please read the documentation on authorisation.
GET https://api.dailys.nz/api/v1/invites
Parameter | Type | Description |
---|---|---|
sortKey | string | The sort key specifies which resource attribute you want to search by. |
sortAsc | integer | The sort asc defines if sorting should be ascending, accepts: 0 or 1 . |
query | string | The search term the invite has provided, to refine results. |
page | integer | The page number requested; used for pagination. |
limit | integer | The number of resrouces per page; maximum: 100 minimum: 1 |
email
, expires_at
, default_rate
{
"current_page": 1,
"data": [
{
"id": 1,
"email": "[email protected]",
"default_rate": 15000,
"expires_at": "2000-01-01 00:00:00",
"permissions": null,
"role": {
"id": 1,
"scope": "organisations",
"name": "Administrator",
"description": "Administer the organisation and users.",
"permissions": {
...
},
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"deleted_at": null,
"deleted": false
}
}
],
"from": 1,
"last_page": 1,
"next_page_url": null,
"path": "https://api.dailys.nz/api/v1/invites",
"per_page": 100,
"prev_page_url": null,
"to": 1,
"total": 1
}
This API route will allow you to store a new invite. There are required fields, as the resource does not already exist.
When an invite is stored, an email will be sent to the invite recipient which will prompt them to join your organisation.
This resource requires authorisation. Please read the documentation on authorisation.
POST https://api.dailys.nz/api/v1/invites
Parameter | Required | Type | Description |
---|---|---|---|
email | required | string | The email address where the invite will be sent (unique). |
default_rate | required | integer | The default hourly rate of the user, in cents. Organisation currency will apply |
role_id | optional | integer | The ID of the role that the user should have when the invite has been accepted. |
permissions | optional | permissions | An array of permissions that the user should have (seperate) to roles. |
{
"email": "[email protected]",
"default_rate": 15000,
"role_id": 1
}
{
"success": true,
"invite": {
"id": 1,
"email": "[email protected]",
"default_rate": 15000,
"expires_at": "2000-01-01 00:00:00",
"permissions": null,
"role": {
"id": 1,
"scope": "organisations",
"name": "Administrator",
"description": "Administer the organisation and users.",
"permissions": {
...
},
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"deleted_at": null,
"deleted": false
}
}
}
This API route will return the invite's data, which includes the permission information as well as the settings that the invite has selected for user joining your organisation.
This resource requires authorisation. Please read the documentation on authorisation.
GET https://api.dailys.nz/api/v1/invites/:INVITE_ID
{
"id": 1,
"email": "[email protected]",
"default_rate": 15000,
"expires_at": "2000-01-01 00:00:00",
"permissions": null,
"role": {
"id": 1,
"scope": "organisations",
"name": "Administrator",
"description": "Administer the organisation and users.",
"permissions": {
...
},
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"deleted_at": null,
"deleted": false
}
}
This API route allows a user to resend the invite, generates a new expiry date for the invite. The user will be emailed the invitation again.
This resource requires authorisation. Please read the documentation on authorisation.
PUT https://api.dailys.nz/api/v1/invites/:invite_ID
{
"success": true,
"invite": {
"id": 1,
"email": "[email protected]",
"default_rate": 15000,
"expires_at": "2000-01-01 00:00:00",
"permissions": null,
"role": {
"id": 1,
"scope": "organisations",
"name": "Administrator",
"description": "Administer the organisation and users.",
"permissions": {
...
},
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"deleted_at": null,
"deleted": false
},
"organisation": {
"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": "#000000",
"brand_secondary": "#000000",
"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",
"new": false,
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"is_paid": true,
"brand_display": "both"
}
}
}
This API route will allow you to delete an invite, if the invite is deleted a user will no longer be able to accept the invite and join your organisation.
This resource requires authorisation. Please read the documentation on authorisation.
DELETE https://api.dailys.nz/api/v1/invites/:invite_ID
{
"success": true,
"invite": {
"id": 1,
"email": "[email protected]",
"default_rate": 15000,
"expires_at": "2000-01-01 00:00:00",
"permissions": null,
"role": {
"id": 1,
"scope": "organisations",
"name": "Administrator",
"description": "Administer the organisation and users.",
"permissions": {
...
},
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"deleted_at": null,
"deleted": false
},
"organisation": {
"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": "#000000",
"brand_secondary": "#000000",
"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",
"new": false,
"created_at": "2000-01-01 00:00:00",
"updated_at": "2000-01-01 00:00:00",
"is_paid": true,
"brand_display": "both"
}
}
}