{info} Mengolah data pelelangan.
https://public-api.delcom.org/api/v1
/aucations
Content-Type
: multipart/form-data
Authorization
: Bearer <token>
cover
as file
title
as string
description
as string
start_bid
as number
closed_at
as timestamp
, example: 2024-10-05 22:00:00
{
"success": true,
"message": "Berhasil menambahkan data",
"data": {
"aucation_id": 3
}
}
/aucations/:id/cover
Content-Type
: multipart/form-data
Authorization
: Bearer <token>
cover
as file
{
"success": true,
"message": "Berhasil mengubah cover"
}
/aucations/:id
Content-Type
: application/x-www-form-urlencoded
Authorization
: Bearer <token>
title
as string
description
as string
start_bid
as number
closed_at
as timestamp
, example: 2024-10-05 22:00:00
{
"success": true,
"message": "Berhasil mengubah data"
}
/aucations
is_me
as 1
1
as retrieve all data created
is_closed
as 0 | 1
0
as retrieve all closed aucations
1
as retrieve all opened aucations
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"aucations": [
{
"id": 3,
"user_id": 2,
"title": "Keyboard Gaming RGB",
"cover": "http://127.0.0.1:8000/img/aucations/cover/2_1728119129.jpeg",
"description": "Barang masih mulus...",
"start_bid": 200000,
"closed_at": "2024-10-05 16:05:29",
"created_at": "2024-10-05T09:04:49.000000Z",
"updated_at": "2024-10-05T09:05:29.000000Z",
"author": {
"name": "Abdullah Ubaid",
"photo": "http://127.0.0.1:8000/default/img/user.png"
},
"bids": []
},
{
"id": 2,
"user_id": 1,
"title": "Oculus Quest 2",
"cover": "http://127.0.0.1:8000/img/aucations/cover/1_1728117244.jpeg",
"description": "Oculus Quest 2 second mulus",
"start_bid": 5000000,
"closed_at": "2024-10-05 22:00:00",
"created_at": "2024-10-05T08:34:04.000000Z",
"updated_at": "2024-10-05T08:34:04.000000Z",
"author": {
"name": "Abdullah Ubaid",
"photo": "http://127.0.0.1:8000/default/img/user.png"
},
"bids": [2]
}
]
}
}
/aucations/:id
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil mengambil data",
"data": {
"aucation": {
"id": 2,
"user_id": 1,
"title": "Oculus Quest 2",
"cover": "http://127.0.0.1:8000/img/aucations/cover/1_1728117244.jpeg",
"description": "Oculus Quest 2 second mulus",
"start_bid": 5000000,
"closed_at": "2024-10-05 22:00:00",
"created_at": "2024-10-05T08:34:04.000000Z",
"updated_at": "2024-10-05T08:34:04.000000Z",
"author": {
"name": "Abdullah Ubaid",
"photo": "http://127.0.0.1:8000/default/img/user.png"
},
"bids": [
{
"id": 2,
"bid": 7000000,
"created_at": "2024-10-05T08:44:12.000000Z",
"updated_at": "2024-10-05T08:44:12.000000Z"
}
],
"my_bid": {
"id": 2,
"bid": 7000000,
"created_at": "2024-10-05T08:44:12.000000Z",
"updated_at": "2024-10-05T08:44:12.000000Z"
}
}
}
}
/aucations/:id
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil menghapus data"
}
/aucations/:id/bids
Content-Type
: application/x-www-form-urlencoded
Authorization
: Bearer <token>
bid
as number
{
"success": true,
"message": "Berhasil memberikan tawaran pada lelang"
}
/aucations/:id/bids
Authorization
: Bearer <token>
{
"success": true,
"message": "Berhasil menghapus tawaran pada lelang"
}