{"openapi":"3.1.0","info":{"title":"AuraVMS API","description":"RFQ software and vendor management API for small businesses. Create RFQs, manage suppliers, compare quotes with L1/L2/L3 ranking, and place purchase orders.","version":"1.0.0","contact":{"email":"dhrumil@auravms.com"}},"servers":[{"url":"https://api.auravms.com","description":"Production"},{"url":"http://localhost:8000","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key with avms_ prefix. Create at Settings > API Keys in the AuraVMS app."}}},"paths":{"/api/create-supplier/":{"post":{"tags":["Supplier Management"],"summary":"Add a new supplier to your directory.","requestBody":{"required":true,"content":{"application/json":{"example":{"company_name":"ABC Steel Co.","person_of_contact":"Jane Smith","phone_no":"555-0199","email":"contact@abcsteel.com","categories":["Raw Materials"],"remark":"Primary steel vendor"}}}},"responses":{"200":{"description":"Success"}}},"put":{"tags":["Supplier Management"],"summary":"Update an existing supplier.","requestBody":{"required":true,"content":{"application/json":{"example":{"supplier_id":"dffcd0de-e7db-443e-898f-7cfc7b970e6d","company_name":"ABC Steel Corporation","person_of_contact":"Jane Smith","phone_no":"555-0200","email":"contact@abcsteel.com","categories":["Raw Materials","Metals"],"remark":"Updated contact"}}}},"responses":{"200":{"description":"Success"}}}},"/api/get-suppliers/":{"get":{"tags":["Supplier Management"],"summary":"List all suppliers in your directory.","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search by company name or email"},{"name":"category","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by category name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"Page number (default: 1)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer"},"description":"Results per page (default: 20)"}],"responses":{"200":{"description":"Success"}}}},"/api/get-supplier-categories/":{"get":{"tags":["Supplier Management"],"summary":"Get all supplier categories in your organization.","responses":{"200":{"description":"Success"}}}},"/api/get-supplier-stats-data/":{"get":{"tags":["Supplier Management"],"summary":"Get performance statistics for all suppliers.","responses":{"200":{"description":"Success"}}}},"/api/create-rfq/":{"post":{"tags":["RFQ Lifecycle"],"summary":"Create a new RFQ and notify selected suppliers by email.","requestBody":{"required":true,"content":{"application/json":{"example":{"title":"Q3 Raw Materials","items":[{"product_name":"Steel Rods","quantity":500,"uom":"kg","specifications":"Grade A, 12mm diameter","expected_delivery_date":"2026-05-15"},{"product_name":"Copper Wire","quantity":200,"uom":"meters","specifications":"16 AWG"}],"suppliers":["supplier-uuid-1","supplier-uuid-2"],"terms_and_condition":"Net 30 payment.","payment_terms":"30 days from invoice","shipping_terms":"FOB destination"}}}},"responses":{"200":{"description":"Success"}}}},"/api/get-rfq-list/":{"get":{"tags":["RFQ Lifecycle"],"summary":"List all RFQs with status, item count, and quote count.","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Filter: \"open\" or \"closed\""},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search by RFQ title"},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer"},"description":"Results per page"}],"responses":{"200":{"description":"Success"}}}},"/api/get-rfq-items/{rfq_id}/":{"get":{"tags":["RFQ Lifecycle"],"summary":"Get RFQ details with all line items and supplier response status.","parameters":[{"name":"rfq_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ ID"}],"responses":{"200":{"description":"Success"}}}},"/api/rfq-item-data/{rfq_item_id}":{"get":{"tags":["RFQ Lifecycle"],"summary":"Get a single item with all supplier quotes and automatic L1/L2/L3 price ranking.","parameters":[{"name":"rfq_item_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ item ID"}],"responses":{"200":{"description":"Success"}}},"post":{"tags":["RFQ Lifecycle"],"summary":"Place a purchase order against a supplier quote. Supplier receives PO confirmation email.","parameters":[{"name":"rfq_item_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ item ID"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"response_id":201,"bought_quantity":500,"bought_price":45.5}}}},"responses":{"200":{"description":"Success"}}}},"/api/close-rfq/{rfq_id}/":{"post":{"tags":["RFQ Lifecycle"],"summary":"Close an RFQ. No more supplier responses will be accepted.","parameters":[{"name":"rfq_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ ID"}],"responses":{"200":{"description":"Success"}}}},"/api/send-reminders/":{"post":{"tags":["RFQ Lifecycle"],"summary":"Send reminder emails to suppliers who have not responded to an RFQ.","requestBody":{"required":true,"content":{"application/json":{"example":{"rfq_id":42,"supplier_ids":["supplier-uuid-1"]}}}},"responses":{"200":{"description":"Success"}}}},"/api/get-rfq/":{"get":{"tags":["RFQ Lifecycle"],"summary":"Get all RFQ items with quote counts across your RFQs.","parameters":[{"name":"rfq_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Filter by specific RFQ"}],"responses":{"200":{"description":"Success"}}}},"/api/get-rfq-metadata/":{"get":{"tags":["RFQ Lifecycle"],"summary":"Get RFQ metadata - terms, payment terms, shipping terms.","parameters":[{"name":"rfq_id","in":"query","required":true,"schema":{"type":"integer"},"description":"RFQ ID"}],"responses":{"200":{"description":"Success"}}}},"/api/save-rfq-draft/":{"post":{"tags":["Draft RFQs"],"summary":"Save an RFQ as a draft. Same body as create-rfq but does not send to suppliers.","requestBody":{"required":true,"content":{"application/json":{"example":{"title":"Draft - Warehouse Supplies","items":[{"product_name":"Packing Tape","quantity":200,"uom":"rolls"}],"suppliers":["supplier-uuid-1"]}}}},"responses":{"200":{"description":"Success"}}}},"/api/get-rfq-draft/{rfq_id}/":{"get":{"tags":["Draft RFQs"],"summary":"Get a saved draft RFQ.","parameters":[{"name":"rfq_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Draft RFQ ID"}],"responses":{"200":{"description":"Success"}}}},"/api/send-rfq-draft/{rfq_id}/":{"post":{"tags":["Draft RFQs"],"summary":"Convert a draft to a live RFQ and notify suppliers.","parameters":[{"name":"rfq_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Draft RFQ ID"}],"responses":{"200":{"description":"Success"}}}},"/api/delete-rfq-draft/{rfq_id}/":{"delete":{"tags":["Draft RFQs"],"summary":"Delete a draft RFQ.","parameters":[{"name":"rfq_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Draft RFQ ID"}],"responses":{"200":{"description":"Success"}}}},"/api/rfq-item/{rfq_item_id}/attachments/upload/":{"post":{"tags":["Attachments"],"summary":"Upload a file attachment to an RFQ item. Use multipart/form-data.","parameters":[{"name":"rfq_item_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ item ID"}],"responses":{"200":{"description":"Success"}}}},"/api/rfq-item/{rfq_item_id}/attachments/":{"get":{"tags":["Attachments"],"summary":"List all buyer attachments for an RFQ item.","parameters":[{"name":"rfq_item_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ item ID"}],"responses":{"200":{"description":"Success"}}}},"/api/rfq-attachment/{attachment_id}/":{"delete":{"tags":["Attachments"],"summary":"Delete an attachment.","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Attachment ID"}],"responses":{"200":{"description":"Success"}}}},"/api/rfq-attachment/{attachment_id}/download/":{"get":{"tags":["Attachments"],"summary":"Download an attachment file.","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Attachment ID"}],"responses":{"200":{"description":"Success"}}}},"/api/supplier-attachment/{attachment_id}/download/":{"get":{"tags":["Attachments"],"summary":"Download an attachment uploaded by a supplier.","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Supplier attachment ID"}],"responses":{"200":{"description":"Success"}}}},"/api/dashboard-stats/":{"get":{"tags":["Analytics & Export"],"summary":"Get procurement dashboard statistics.","responses":{"200":{"description":"Success"}}}},"/api/export-quotation-pdf/{rfq_item_id}/":{"get":{"tags":["Analytics & Export"],"summary":"Export a quote comparison as PDF with L1/L2/L3 rankings.","parameters":[{"name":"rfq_item_id","in":"path","required":true,"schema":{"type":"integer"},"description":"RFQ item ID"}],"responses":{"200":{"description":"Success"}}}},"/api/send-rfq-data-file/":{"get":{"tags":["Analytics & Export"],"summary":"Email a complete Excel export of all RFQ data (22 fields) to the authenticated user.","parameters":[{"name":"rfq_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Export data for a specific RFQ"}],"responses":{"200":{"description":"Success"}}}},"/api/get-item-uom/":{"get":{"tags":["Reference Data"],"summary":"Get available units of measurement.","responses":{"200":{"description":"Success"}}}},"/api/get-item-product/":{"get":{"tags":["Reference Data"],"summary":"Get the product catalog (previously used product names).","responses":{"200":{"description":"Success"}}}},"/api/api-keys/":{"get":{"tags":["API Key Management"],"summary":"List all API keys for your organization.","responses":{"200":{"description":"Success"}}},"post":{"tags":["API Key Management"],"summary":"Create a new API key. The raw key is returned only once - save it immediately.","requestBody":{"required":true,"content":{"application/json":{"example":{"name":"ERP Integration","expires_in_days":365}}}},"responses":{"200":{"description":"Success"}}}},"/api/api-keys/{key_id}/revoke/":{"post":{"tags":["API Key Management"],"summary":"Revoke an API key. It will immediately stop working.","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer"},"description":"API key ID"}],"responses":{"200":{"description":"Success"}}}},"/api/request-a-feature/":{"post":{"tags":["Feedback"],"summary":"Submit feedback, a feature request, or a bug report. Sends an email to the AuraVMS team.","requestBody":{"required":true,"content":{"application/json":{"example":{"subject":"Add CSV export for supplier list","message":"It would be helpful to export the supplier directory as CSV directly from the API.","category":"feature_request"}}}},"responses":{"200":{"description":"Success"}}}}}}