{info} Mengolah data kehilangan dan temuan.
https://public-api.delcom.org/api/v1
/lost-founds
Content-Type
: application/x-www-form-urlencoded
Authorization
: Bearer <token>
title
as string
description
as string
status
as lost | found
{
"success": true,
"message": "Berhasil menambahkan data",
"data": {
"lost_found_id": 1
}
}
/lost-founds/:id/cover
Content-Type
: multipart/form-data
Authorization
: Bearer <token>
cover
as file
{
"success": true,
"message": "Berhasil mengubah cover"
}
/lost-founds/:id
Content-Type
: application/x-www-form-urlencoded
Authorization
: Bearer <token>
title
as string
description
as string
status
as lost | found
is_completed
as 1 | 0
1
as true
0
as false
{
"success": true,
"message": "Berhasil mengubah data"
}
/lost-founds
is_completed
as 1 | 0
1
as true
0
as false
is_me
as 1
1
as retrieve all data created
status
as lost | found
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"lost_founds": [
{
"id": 8,
"user_id": 1,
"title": "Update judul 2",
"description": "Update deskripsi 2",
"status": "found",
"is_completed": 0,
"cover": "img/lost-founds/cover/1_1709106579.png",
"created_at": "2024-02-28T07:49:32.000000Z",
"updated_at": "2024-02-28T07:49:39.000000Z",
"author": {
"name": "Delcom Testing",
"photo": null
}
},
{
"id": 9,
"user_id": 1,
"title": "Testing Title 2",
"description": "Testing Deskripsi 2",
"status": "found",
"is_completed": 0,
"cover": null,
"created_at": "2024-02-28T07:50:37.000000Z",
"updated_at": "2024-02-28T07:50:37.000000Z",
"author": {
"name": "Delcom Testing",
"photo": null
}
}
]
}
}
/lost-founds/:id
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"lost_found": {
"id": 9,
"user_id": 1,
"title": "Testing Title 2",
"description": "Testing Deskripsi 2",
"status": "found",
"is_completed": 0,
"cover": null,
"created_at": "2024-02-28T07:50:37.000000Z",
"updated_at": "2024-02-28T07:50:37.000000Z",
"author": {
"name": "Delcom Testing",
"photo": null
}
}
}
}
/lost-founds/:id
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil menghapus data"
}
/lost-founds/stats/daily
end_date
as timestamp
, example: 2024-10-05 22:00:00
total_data
as number
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"stats_losts": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 0,
"06-10-2024": 1,
"07-10-2024": 0
},
"stats_losts_completed": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 0,
"06-10-2024": 0,
"07-10-2024": 0
},
"stats_losts_process": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 0,
"06-10-2024": 1,
"07-10-2024": 0
},
"stats_founds": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 0,
"06-10-2024": 1,
"07-10-2024": 0
},
"stats_founds_completed": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 0,
"06-10-2024": 0,
"07-10-2024": 0
},
"stats_founds_process": {
"01-10-2024": 0,
"02-10-2024": 0,
"03-10-2024": 0,
"04-10-2024": 0,
"05-10-2024": 0,
"06-10-2024": 1,
"07-10-2024": 0
}
}
}
/lost-founds/stats/monthly
end_date
as timestamp
, example: 2024-10-05 22:00:00
total_data
as number
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"stats_losts": {
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 1
},
"stats_losts_completed": {
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 0
},
"stats_losts_process": {
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 1
},
"stats_founds": {
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 1
},
"stats_founds_completed": {
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 0
},
"stats_founds_process": {
"06-2024": 0,
"07-2024": 0,
"08-2024": 0,
"09-2024": 0,
"10-2024": 1
}
}
}