Appearance
Form Servisi API Dökümantasyonu (v3)
Sürücülere atanmış iş formlarının (dağıtım formları) yönetimi bu servis üzerinden yapılır. Formlar üzerinden yük ekleme, teslim etme, sipariş atama gibi operasyonlar gerçekleştirilebilir.
Base URL: /v3/clients/:client_id/forms
Enum Referansları
Form Status (status)
| Değer | Açıklama |
|---|---|
created | Oluşturuldu |
active | Aktif |
cancelled | İptal edildi |
completed | Tamamlandı |
Form Action Type (action_type)
| Değer | Açıklama |
|---|---|
add-load | Yük ekleme |
deliver-load | Yük teslim etme |
not-delivered-load | Teslim edilemedi |
1. Create Form (Form Oluştur)
- URL:
POST / - Auth: ClientSecret + User
- Idempotency: IdempotencyKey gerekli
- Request Body:json
{ "title": "Dağıtım Formu #1 (opsiyonel)", "user_id": "uuid (sürücü ID, default: null)", "vehicle_id": "uuid (opsiyonel)", "start_time": "08:00 (opsiyonel)", "end_time": "18:00 (opsiyonel)", "allow_out_time_delivery": false } - Response:
success: true, data: { client_form_id: "uuid", ... }
2. List Forms (Formları Listele)
- URL:
GET / - Auth: ClientSecret + User
- Query Params:
page[index]: Sayfa indexi (default: 0)page[size]: Sayfa boyutu (default: 20)search: Arama metnifilter[status]: Form durumu filtresifilter[user_id]: Sürücü filtresifilter[transfer_center_id]: Transfer merkezi filtresifilter[branch_id]: Şube filtresifilter[vehicle_id]: Araç filtresifilter[start_time],filter[end_time]: Zaman aralığı filtresifilter[allow_out_time_delivery]: Saat dışı teslimat filtresisort[id],sort[type]: Sıralama
3. Form Details (Form Detayı)
- URL:
GET /:client_form_id - Auth: ClientSecret + User
4. Update Form (Form Güncelle)
- URL:
PUT /:client_form_id - Auth: ClientSecret + User
- Request Body: (tüm alanlar opsiyonel)json
{ "title": "Güncel başlık", "vehicle_id": "uuid", "user_id": "uuid (opsiyonel)", "status": "active | completed | cancelled", "start_time": "09:00", "end_time": "17:00", "allow_out_time_delivery": true }
5. Delete Form (Form Sil)
- URL:
DELETE /:client_form_id - Auth: ClientSecret + User
6. Print Form (Form Yazdır)
Formun yazdırılabilir çıktısını döner. Auth gerektirmez.
- URL:
GET /:client_form_id/print-form
Form Actions (Form Aksiyonları)
Forma yük ve sipariş ekleme/çıkarma/teslim etme işlemleri.
Base URL: /v3/clients/:client_id/forms/:client_form_id
7. Add Load (Yük Ekle)
Forma barkod numarası ile yük ekler.
- URL:
POST /add-load - Auth: ClientSecret + User
- Idempotency: IdempotencyKey gerekli
- Request Body:json
{ "load_no": "YUK-001 (zorunlu)" }
8. Deliver Load (Tekli Yük Teslim Et)
Formdaki bir yükü teslim edildi olarak işaretler.
- URL:
POST /deliver-load - Auth: ClientSecret + User
- Idempotency: IdempotencyKey gerekli
- Request Body:json
{ "load_no": "YUK-001 (zorunlu)" }
9. Deliver Loads (Toplu Yük Teslim Et)
Formdaki birden fazla yükü toplu olarak teslim edildi olarak işaretler.
- URL:
POST /deliver-loads - Auth: ClientSecret + User
- Idempotency: IdempotencyKey gerekli
- Request Body:json
{ "loads": ["YUK-001", "YUK-002"] }
10. List Loads (Formdaki Yükleri Listele)
- URL:
GET /loads - Auth: ClientSecret + User
- Query Params:
page[index],page[size]: Sayfalamasearch: Aramafilter[action_type]:add-load/deliver-load/not-delivered-load(tekli veya dizi)sort[id],sort[type]
11. Delete Load (Formdaki Yükü Kaldır)
- URL:
DELETE /loads/:order_load_id - Auth: ClientSecret + User
12. List Orders (Formdaki Siparişleri Listele)
- URL:
GET /orders - Auth: ClientSecret + User
- Query Params:
page[index],page[size]: Sayfalamasearch: Aramafilter[action_type]:add-load/deliver-load/not-delivered-load(tekli veya dizi)sort[id],sort[type]
13. Add Orders (Forma Sipariş Ekle)
Forma sipariş ID'leri ile toplu sipariş ekler.
- URL:
POST /add-orders - Auth: ClientSecret + User
- Idempotency: IdempotencyKey gerekli
- Request Body:json
{ "order_ids": ["uuid-1", "uuid-2"] }
14. Remove Orders (Formdan Sipariş Kaldır)
Formdan sipariş ID'leri ile toplu sipariş çıkarır.
- URL:
POST /remove-orders - Auth: ClientSecret + User
- Idempotency: IdempotencyKey gerekli
- Request Body:json
{ "order_ids": ["uuid-1", "uuid-2"] }
