Factorizer/Cluster ERP WikiCluster ERP English
Ana sayfa / API referansı

API

Quotations API (quotations)

/api/v1/quotations altındaki quotations modülünün HTTP uç noktaları: yetkiler, şemalar, durum kodları ve hata kodlarıyla 34 yol.

quotations modülü fizibilite, tasarım, ürün ağacı, maliyetlendirme, yönetim onayı, gönderme ve sonuç adımlarıyla satış tekliflerini ve teklif kalemlerini sunar. 34 uç noktanın tamamı /api/v1/quotations altındadır. İş anlamı için Quotations modülü sayfasına bakın.

Grup olguları

Öğe Değer Kaynak
Temel yol /api/v1/quotations src/cluster_erp/core/module_base.py:37-38, src/cluster_erp/modules/quotations/module.py:46
Yönlendiriciler 2 dosyada 2 yönlendirici nesnesi; Uç nokta özeti bölümünde listelenir src/cluster_erp/modules/quotations/module.py:35
Uç noktalar 34; register_routes ile bağlanan yönlendiricilerin yol dekoratörleri ve add_api_route çağrılarından sayıldı src/cluster_erp/modules/quotations/line_items/routes.py, src/cluster_erp/modules/quotations/quotes/routes.py
Kimlik doğrulama Bearer başlığı veya oturum çerezi, get_current_user ile çözülür; bkz. Kimlik doğrulama ve başlıklar src/cluster_erp/modules/auth/guards.py:85-167
Yetki koruması 34 yolun 34 tanesi require_permission bildirir src/cluster_erp/modules/auth/guards.py:205-240
Uygulama yetkilendirme kapısı bağlanan her yönlendiricide require_app("quotations") src/cluster_erp/modules/quotations/module.py:52
Hata biçimi JSON gövdesi {"error": {...}}; bkz. Hatalar src/cluster_erp/server/error_handler.py:33-46

Uç nokta özeti

Alt modül klasörü başına bir satır. Yönlendirici öneki temel yola eklenir.

Alt modül Yönlendiriciler Uç noktalar Yönlendirici kaynağı
line_items router 7 src/cluster_erp/modules/quotations/line_items/routes.py:21
quotes router 27 src/cluster_erp/modules/quotations/quotes/routes.py:37

Teklif kalemleri uç noktaları

Ret nedenleri, tüm kalemler, bir teklifin kalemleri ve kalem kayıtları.

Yöntem Yol İşleyici Yetki İstek Sorgu Yanıt Durum Kaynak
GET /api/v1/quotations/quotes/rejection-reasons list_rejection_reasons quote_line_item.read yok yok dict 200 (varsayılan) src/cluster_erp/modules/quotations/line_items/routes.py:24
GET /api/v1/quotations/quotes/line-items list_all_line_items quote_line_item.read yok quote_id, limit, offset dict 200 (varsayılan) src/cluster_erp/modules/quotations/line_items/routes.py:49
GET /api/v1/quotations/quotes/{quote_id}/line-items list_line_items quote_line_item.read yok yok list[QuoteLineItemRead] 200 (varsayılan) src/cluster_erp/modules/quotations/line_items/routes.py:80
POST /api/v1/quotations/quotes/{quote_id}/line-items create_line_item quote_line_item.create QuoteLineItemCreate yok QuoteLineItemRead 201 src/cluster_erp/modules/quotations/line_items/routes.py:95
PUT /api/v1/quotations/quotes/line-items/{item_id} update_line_item quote_line_item.update QuoteLineItemUpdate yok QuoteLineItemRead 200 (varsayılan) src/cluster_erp/modules/quotations/line_items/routes.py:112
DELETE /api/v1/quotations/quotes/line-items/{item_id} delete_line_item quote_line_item.delete yok yok yok 204 src/cluster_erp/modules/quotations/line_items/routes.py:130
POST /api/v1/quotations/quotes/line-items/bulk-delete bulk_delete_line_items quote_line_item.bulk_delete BulkDeleteRequest yok BulkDeleteResponse 200 (varsayılan) src/cluster_erp/modules/quotations/line_items/routes.py:142

Teklifler uç noktaları

Teklif kayıtları ve iş akışı eylemleri, eksiksizlik, belge akışı, değişiklik geçmişi, sürümler ve benzer projeler.

Yöntem Yol İşleyici Yetki İstek Sorgu Yanıt Durum Kaynak
GET /api/v1/quotations/quotes/ list_quotes quote.read yok search, status, rfq_id, customer_id, limit, offset dict 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:52
POST /api/v1/quotations/quotes/ create_quote quote.create QuoteCreate yok QuoteRead 201 src/cluster_erp/modules/quotations/quotes/routes.py:88
GET /api/v1/quotations/quotes/{quote_id} get_quote quote.read yok yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:100
PUT /api/v1/quotations/quotes/{quote_id} update_quote quote.update QuoteUpdate yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:114
DELETE /api/v1/quotations/quotes/{quote_id} delete_quote quote.delete yok yok yok 204 src/cluster_erp/modules/quotations/quotes/routes.py:129
POST /api/v1/quotations/quotes/bulk-delete bulk_delete_quotes quote.bulk_delete BulkDeleteRequest yok BulkDeleteResponse 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:141
POST /api/v1/quotations/quotes/{quote_id}/start-feasibility start_feasibility quote.start_feasibility QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:156
POST /api/v1/quotations/quotes/{quote_id}/mark-design-required mark_design_required quote.mark_design_required QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:169
POST /api/v1/quotations/quotes/{quote_id}/complete-feasibility complete_feasibility quote.complete_feasibility QuoteCompleteFeasibility yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:184
POST /api/v1/quotations/quotes/{quote_id}/complete-design complete_design quote.complete_design QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:197
POST /api/v1/quotations/quotes/{quote_id}/attach-bom attach_bom quote.attach_bom QuoteAttachBom yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:210
POST /api/v1/quotations/quotes/{quote_id}/attach-costing attach_costing quote.attach_costing QuoteAttachCosting yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:223
GET /api/v1/quotations/quotes/{quote_id}/mgmt-approvals list_mgmt_approvals mgmt_approval.read yok yok list[MgmtApprovalRead] 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:236
POST /api/v1/quotations/quotes/{quote_id}/schedule-mgmt-approval schedule_mgmt_approval quote.schedule_mgmt_approval QuoteScheduleMgmtApproval yok MgmtApprovalRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:251
POST /api/v1/quotations/quotes/{quote_id}/record-mgmt-decision record_mgmt_decision mgmt_approval.record_decision QuoteRecordMgmtDecision yok MgmtApprovalRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:267
POST /api/v1/quotations/quotes/{quote_id}/send send_quote quote.send QuoteSend yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:283
POST /api/v1/quotations/quotes/{quote_id}/mark-won mark_won quote.mark_won QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:301
POST /api/v1/quotations/quotes/{quote_id}/mark-lost mark_lost quote.mark_lost QuoteMarkLost yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:314
POST /api/v1/quotations/quotes/{quote_id}/revise revise_quote quote.revise QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:327
POST /api/v1/quotations/quotes/{quote_id}/feasibility-failed feasibility_failed quote.feasibility_failed QuoteFeasibilityFailed yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:340
POST /api/v1/quotations/quotes/{quote_id}/return-to-bom return_to_bom quote.return_to_bom QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:353
POST /api/v1/quotations/quotes/{quote_id}/mark-expired mark_expired quote.mark_expired QuoteActionBody \| None yok QuoteRead 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:366
GET /api/v1/quotations/quotes/{quote_id}/completeness get_completeness quote.read yok yok dict 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:384
GET /api/v1/quotations/quotes/{quote_id}/document-flow get_document_flow quote.read yok yok dict 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:399
GET /api/v1/quotations/quotes/{quote_id}/history get_change_history quote.read yok yok dict 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:412
GET /api/v1/quotations/quotes/{quote_id}/versions list_versions quote.read yok yok list[QuoteRead] 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:424
GET /api/v1/quotations/quotes/{quote_id}/similar-projects similar_projects quote.read yok yok list[SimilarProjectRead] 200 (varsayılan) src/cluster_erp/modules/quotations/quotes/routes.py:439

Hata kodları

Tablo, src/cluster_erp/modules/quotations/ altındaki kodun attığı hata kodlarını listeler. Kodlar, AppError(...) çağrıları, src/cluster_erp/core/errors.py içindeki fabrikalar (not_found, conflict, protected, permission_denied, privilege_escalation, check_version) ve HTTPException(...) için yapılan bir sözdizimi ağacı taramasıyla bulundu. 400 durumu AppError varsayılanıdır (src/cluster_erp/core/errors.py:23). Koruma hataları (401, 403), yetkilendirme kodları ve doğrulama hataları (422) her yol için geçerlidir ve Hatalar sayfasında listelenir.

Kod HTTP durumu Atıldığı yer İlk konum
CONCURRENCY_VERSION_CONFLICT 409 quotes src/cluster_erp/modules/quotations/quotes/services.py:255
QUOTE_ACTIVE_EXISTS 409 quotes src/cluster_erp/modules/quotations/quotes/services.py:1312
QUOTE_IMMUTABLE_AFTER_SENT 400 line_items, quotes src/cluster_erp/modules/quotations/line_items/services.py:266
QUOTE_INCOMPLETE 409 quotes src/cluster_erp/modules/quotations/quotes/services.py:583
QUOTE_INVALID_STATUS 400, 409 quotes src/cluster_erp/modules/quotations/quotes/services.py:474
QUOTE_MGMT_APPROVAL_REQUIRED 400 quotes src/cluster_erp/modules/quotations/quotes/services.py:505
QUOTE_NOT_APPROVED 400 quotes src/cluster_erp/modules/quotations/quotes/services.py:564
RESOURCE_NOT_FOUND 404 line_items, quotes src/cluster_erp/modules/quotations/line_items/routes.py:126
VALIDATION_ERROR 422 line_items, quotes src/cluster_erp/modules/quotations/line_items/services.py:171

Yayımlanan olaylar

Tablo, src/cluster_erp/modules/quotations/ altındaki kodun EventBus.emit çağrısına doğrudan verdiği sözleşme sınıflarını listeler; sözdizimi ağacı taramasıyla bulundu. Önce bir değişkene kurulan olaylar sayılmaz. Sözleşmeler Sözleşmeler başvurusu sayfasında anlatılır.

Sözleşme Konum sayısı İlk konum
QuoteBomAttached 1 src/cluster_erp/modules/quotations/quotes/services.py:389
QuoteCostingCompleted 1 src/cluster_erp/modules/quotations/quotes/services.py:457
QuoteCreated 2 src/cluster_erp/modules/quotations/quotes/services.py:229
QuoteExpired 1 src/cluster_erp/modules/quotations/quotes/services.py:678
QuoteFeasibilityCompleted 2 src/cluster_erp/modules/quotations/quotes/services.py:339
QuoteLost 1 src/cluster_erp/modules/quotations/quotes/services.py:656
QuoteMgmtApprovalRecorded 1 src/cluster_erp/modules/quotations/quotes/services.py:540
QuoteSent 1 src/cluster_erp/modules/quotations/quotes/services.py:607
QuoteWon 2 src/cluster_erp/modules/quotations/quotes/services.py:630
RfqDeclined 1 src/cluster_erp/modules/quotations/quotes/services.py:765

İlgili sayfalar


92f8051 numaralı commit ile 2026-11-13 tarihinde doğrulandı.

Doğrulanan commit 92f8051 · 2026-11-13