https://github.com/defuj/belajar_flutter
https://github.com/defuj/belajar_flutter
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/defuj/belajar_flutter
- Owner: defuj
- Created: 2025-03-24T06:19:00.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-05-01T13:25:24.000Z (9 months ago)
- Last Synced: 2025-07-12T19:00:22.971Z (7 months ago)
- Language: C++
- Size: 271 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# belajar_flutter
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
## API Documentation for Sender
### LIST STATUS SHIFTMENT
- **Method**: GET
- **Endpoint**: `/shipment-status`
- **Header**: `Content-Type: application/json`
- **Response Success**
```json
{
"status": true,
"data": [
{
"id": "ID",
"status": "IN PROCESS",
},
{
"id": "ID",
"status": "ON DELIVERY",
},
{
"id": "ID",
"status": "ARRIVED",
},
{
"id": "ID",
"status": "FINISHED",
}
]
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Item not found"
}
```
### LIST SHIFTMENT
- **Method**: GET
- **Endpoint**: `/shipment-list`
- **Header**: `Content-Type: application/json`
- **Response Success**
```json
{
"status": true,
"data": [
{
"id": "ID",
"status": "IN PROCESS",
"item": "Tas Kucing",
"expedition": "JNE",
},
{
"id": "ID",
"status": "ON DELIVERY",
"item": "Kandang Marmut Besi",
"expedition": "SiCepat",
},
{
"id": "ID",
"status": "ARRIVED",
"item": "Pakaian Kucing",
"expedition": "J&T",
},
]
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Item not found"
}
```
### Create Shiftment
- **Method**: POST
- **Endpoint**: `/shipment`
- **Header**: `Content-Type: application/json`
- **Body**:
```json
{
"item": "Kandang Marmut Besi",
"expedition": "SiCepat",
"status": "IN PROCESS",
}
```
- **Response Success**
```json
{
"status": true,
"message": "Shiftment created successfully"
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Failed to create shiftment"
}
```
### Update Shiftment Status
- **Method**: PUT
- **Endpoint**: `/shipment/:ID`
- **Header**: `Content-Type: application/json`
- **Parameter**:
- `ID`: ID of the item to update
- **Body**:
```json
{
"status": "ON DELIVERY",
}
```
- **Response Success**
```json
{
"status": true,
"message": "Shiftment updated successfully"
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Failed to update shiftment"
}
```
### Delete Shiftment
- **Method**: DELETE
- **Endpoint**: `/shipment/:ID`
- **Header**: `Content-Type: application/json`
- **Parameter**:
- `ID`: ID of the item to delete
- **Response Success**
```json
{
"status": true,
"message": "Shiftment deleted successfully"
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Failed to delete shiftment"
}
```
### Add History
- **Method**: POST
- **Endpoint**: `/shipment/:ID/history`
- **Header**: `Content-Type: form-data`
- **Parameter**:
- `ID`: ID of the item to add history for
- **Body**:
```json
{
"description": "Pesanan Diterima",
"time": "2023-10-01T12:00:00Z",
"image": "File"
}
```
- **Response Success**
```json
{
"status": true,
"message": "History added successfully"
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Failed to add history"
}
```
## API Documentation for Receiver/Client
### SEARCH BY ID
- **Method**: GET
- **Endpoint**: `/shipment/:ID`
- **Header**: `Content-Type: application/json`
- **Parameter**:
- `ID`: ID of the item to search for
- **Response Success**
```json
{
"status": true,
"data": {
"id": "ID",
"status": "ON DELIVERY",
"item": "Kandang Marmut Besi",
"expedition": "SiCepat",
"history": [
{
"description": "Pesanan Diterima",
"time": "2023-10-01T12:00:00Z",
"image": "https://example.com/image1.jpg"
},
{
"description": "Dalam perjalanan ke lokasi tujuan",
"time": "2023-10-01T12:00:00Z"
},
{
"description": "Dalam Proses Sortir",
"time": "2023-10-01T12:00:00Z"
}
{
"description": "Tiba di Gudang",
"time": "2023-10-01T12:00:00Z",
},
{
"description": "Diambil Kurir",
"time": "2023-10-02T12:00:00Z"
},
{
"description": "Dalam Pengemasan",
"time": "2023-10-03T12:00:00Z"
}
]
}
}
```
- **Response Failed**
```json
{
"status": false,
"message": "Item not found"
}
```