Skip to main content

Favorites API

Content

Favorites collection:

Single Favorite

Favorites collection

Favorites index

GET /api/v0/favorites/{model}

Available models for favorites are: Project.

Request

Index behaviourDefinition
Paginated by defaultNo
SortingNo
FiltersNo
Embedded-
GET /api/v0/favorites/project HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/favorites/project HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 2,
"user_id": 1,
"favoritable": {
"id": 1,
"name": "Service Project",
"goodday_id": "1r9Gyh",
"parent_id": null,
"client_id": null,
"status_id": 1,
"status_comment": null,
"active": true,
"description": null,
"start_date": null,
"end_date": null,
"priority": 5,
"estimate": null,
"progress": null,
"billable": true,
"billing_type": null,
"price": "0.00000000",
"estimated_price": "0.00000000",
"goodday_created_at": "2021-07-08T08:40:03.000000Z",
"created_at": "2022-11-29T12:36:07.000000Z",
"updated_at": "2022-11-29T12:36:07.000000Z"
},
"created_at": "2022-11-29T14:44:07.000000Z",
"updated_at": "2022-11-29T14:44:07.000000Z"
}
]
}

Create Favorite

POST /api/v0/favorites/{model}/{model_id}

Request

ParamTypeDescriptionRequirements
--------
POST /api/v0/favorites/project/1 HTTP/1.1

Response

201 Created

POST /api/v0/favorites/project/1 HTTP/1.1
Status-code: 201

{}

Delete Favorite

DELETE /api/v0/favorites/{model}/{model_id}

Request

DELETE /api/v0/favorites/1 HTTP/1.1

Response

204 No content

POST /api/v0/favorites/project/1 HTTP/1.1
Status-code: 204