Frs for Add Vendors
Frs for Add Vendors
1. Introduction
This document outlines the functional requirements for the supplier Management
System, designed to streamline the process of adding, managing, and viewing
supplier details. The system will provide functionalities for entering personal and
company details, managing balance and credit information, and categorising
suppliers based on their role as buyers or suppliers.
2. Scope
The scope of this document covers the user interface and functionalities related to
adding and managing supplier information. This includes data input fields, dropdown
menus, buttons, and other interactive elements as shown in the provided design
sketch.
3. Functional Requirements
3.1 supplier Management Interface
Module Name: Add supplier
Purpose: To allow users to add new suppliers by entering their personal and company
information, and manage existing supplier records.
3.2 Personal Details Section
Fields:
Name: A text field to input the supplier's name.
Email: A text field to input the supplier's email address.
Phone: A text field to input the supplier's phone number.
Manage Person Details: I this option he should be able to add more person details.
3.3 Balance and Credit Information
Fields:
Balance: A numeric field to display the current balance associated with the
supplier.
Credit: A numeric field to display the credit amount available to the supplier.
Radio Buttons:
Buyer: To categorize the supplier as a buyer.
Supplier: To categorize the supplier as a supplier.
Both: To categorize the supplier as both buyer and supplier.
3.4 Company Information Section
Fields:
Company Name: A text field to input the name of the supplier's company.
Address: A text field to input the company's address.
Email ID: A text field to input the company's email address.
4. Non-Functional Requirements
Usability: The interface should be user-friendly and intuitive, with clear labels
for each input field and action button.
Performance: The system should respond promptly to user actions, with a maximum
load time of 2 seconds for any operation.
Security: Sensitive information, such as balance and credit details, should be
stored securely with appropriate access controls.
Scalability: The system should be capable of handling a large number of suppliers
without degradation in performance.
6. Glossary
PO: Purchase Order
GST: Goods and Services Tax
7. Revision History
Version
Date
Description
Author
1.0
03/09/2024
Initial Draft
Vishal Ojha
API DOCUMENT FOR THE ADD suppliers PAGE
Method :POST
API Endpoint : /api/delete-_supplier
Caller : UI/User
Request Body:
{
"delete_supplier": {
"supplier_name": "NESTBOTICS"
}
}
Response Body:
{
"status": 200,
"message": "Supplier Deleted Successfully",
"data": {
"deleted_supplier": "PRD "
}
}
This API allows the user to submit personal information for a supplier such as
Name, Email and Phone Number . The data is captured through a form on the frontend
and submitted to the backend API.
Method :POST
API Endpoint : /api/add-supplier
Caller : UI/User
Request Body :
This request body is in JSON Format , containing the supplier’s Personal details
captured from fields . Each Key represents the data entered by the user in the
form.
Request Payload:
{
"add_supplier": {
"salutation": "Mr.",
"first_name": "Rishabh"l,
"last_name": "kk"l,
"phone": "1234567890",
"email": "rishabh@example.com”,
"designation": "Manager",
"gst_number": "GST123456”,
"gst_type": "Regular" ,
“supplier_name”:”xyz”,
“supplier_email”:”xzt@gail.com”,
“supplier_display_name”:”xyz”,
“payment_method” :”xyz”,
“discount”:00,
“currency”:”rupee”,
}
}
Response Payload:
{
"status": 200,
"message": "supplier Added Successfully",
"data": {
"supplier_name": "PRD " }
}
Incase of error
{
"status": 500,
"message": "Internal Server Error",
"data": {
"supplier_name": "Error Adding Supplier " }
}
This Component will fetch the balance and credit data from the backend API and
Update the values Dynamically in the Frontend. The Values will replace the Dummy
value ( 0.00) .
Method : GET
API Endpoint : /api/get-balance-credit
Response:
The API returns the balance and Credit amounts in JSON Format, Which are then set
in the components state.
Response Payload:
{
"Balance": 15000,
"Credit": 1000
}
Request Payload:
{
"balance_credit": {
"supplier_name": 244343
}
}
This API retrieves the list of orders from the database. The retrieved data
is then displayed in the user interface in a tabular format.
Method : GET
API Endpoint : api/supplier-order-information
Caller : UI/User
Request:
{
"order_history": {
"supplier_name": "PRD"
}
}
Response Payload:
{
"status": "success",
"message": "History Orders retrieved successfully",
"data": [
{
"supplier_name": "prd",
"order_history": [
{
"Order ID": 112223,
"Date": "04/09/2024",
"Total Amount": 60000,
"Location": "Noida"
},
{
"Order ID": 2333,
"Date": "04/08/2024",
"Total Amount": 56565,
"Location": "Delhi"
},
{
"Order ID": 4543,
"Date": "24/08/2024",
"Total Amount": 56565,
"Location": "Noida"
}
],
"supplier_info": {
"supplier_Id": 12345,
"contact_person_name": "ABC",
"contact_email": "ABC@example.com",
"contact_phone": "1234567890",
"gst_number": "GSTIN12345678",
"supplier_contact": 12135565,
"supplier_address_1": "vihar colony",
"supplier_address_2": "Delhi",
“supplier_address_1”: “meerut”,
supplier_address_2:supplierInfo.SUPPLIER_ADDRESS_2,
"supplier_address": "XTY",
"supplier_email_details": "snjbs@gmail.com"
}
}
]
}
POST /api/supplier-sku-mapping
This endpoint allows the mapping of a SKU to a specific supplier.
REQUEST:
{
"supplier_name": "ABC Supplies",
"user_name": "karan",
"data": [
{
"sku_id": "SKU001"
},
{
"sku_id": "SKU002"
}
]
}
RESPONSE:
{
"status": "success",
"message": "SKU mappings for the supplier have been successfully saved",
"supplier_id": "SUP123",
"mapped_skus": [
{
"sku_id": "SKU001"
},
{
"sku_id": "SKU002"
}
]
}
{
"status": "error",
"message": "Error in Adding the item vendor mapping.",
"supplier_id": "SUP123",
"sku_mappings": []
}
⦁
API for Fetch supplier/supplier info
This API allows users to retrieve the contact person and supplier form details
Method: GET
API Endpoint: /api/get-supplier/{supplier_id}
Caller: UI/User
Response Payload as successful:
{
"status": 200,
"message": "supplier Details Retrieved Successfully",
"data": { "salutation": "Mr.",
"first_name": "Rishabh"l,
"last_name": "kk"l,
"phone": "1234567890",
"email": "rishabh@example.com”,
"designation": "Manager",
"gst_number": "GST123456”,
"gst_type": "Regular" ,
“supplier_name”:”xyz”,
“supplier_email”:”xzt@gail.com”,
“supplier_display_name”:”xyz”,
“payment_method” :”xyz”,
“discount”:00,
“currency”:”rupee”,}}
Response Payload as an Error:
{
"status": 400,
"message": "supplier Not Found",
"data": {
"supplier_id": "{supplier_id}",
"error": "No supplier found with the given ID"
}
}
Method: GET
API Endpoint: /api/get-delivery-address/{supplier_id}
Caller: UI/User
Response Payload as successful:{
"status": 200,
"message": "Delivery Addresses Retrieved Successfully",
"data": [
{
"supplier_id": "supplier_id",
"delivery_address_name": "delivery_address_name",
"address_lane1": "456 Delivery St",
"address_lane2": "Suite 200",
"pincode": "987654",
"city": “muradnahgars",
"state": "Uttar Pradesh",
"country": "India"
}
]
}
Response Payloads
1. Success Response for Update:
{
"status": 200,
"message": "Delivery Address Updated Successfully",
"data": {
"delivery_address_id": "123456"
}
}
Error Response
{
"status": 500,
"message": "Internal Server Error",
"data": {
"delivery_address_name": "Error in Adding/Updating Delivery Address"
}
}
Method: GET
API Endpoint: /api/get-billing-address/{supplier_id}
Caller: UI/User
Response Payload as successful:
{
"status": 200,
"message": "Billing Addresses Retrieved Successfully",
"data": {
"supplier_id": "{supplier_id}",
"billing_address_name": "{billing_address_name}",
"address_line1": "321 Updated St",
"address_line2": "Apt 5A",
"pincode": "987654",
"city": “muradnagar",
"state": "Uttar Pradesh",
"country": "India"
}
}
Response Payload as an Error (Not Found):
{
"status": 404,
"message": "Billing Address Not Found",
"data": {
"error": "No billing address found with the given supplier id"
}
}
Response Payload for Internal Server Error:
{
"status": 500,
"message": "Internal Server Error",
"data": {
"error": "Internal Server Error"
}
}
Body Payload
{
"billing_address_name": "billing_address_name",
"address_line1": "321 Updated St",
"address_line2": "Apt 5A",
"pincode": "987654",
"city": "Muradnagar",
"state": "Uttar Pradesh",
"country": "India"
}
Error Response (Duplicate)
{
"status": 409,
"message": "Duplicate Entry",
"data": {
"error": "Billing address for this supplier already exists"
}
}
Method : PUT
API Endpoint : api/edit-supplier
Request Payload:
{
"update_supplier": {
"salutation": "Mr.",
"first_name": "Rishabh"l,
"last_name": "kk"l,
"phone": "1234567890",
"email": "rishabh@example.com”,
"designation": "Manager",
"gst_number": "GST123456”,
"gst_type": "Regular" ,
“supplier_name”:”xyz”,
“supplier_email”:”xzt@gail.com”,
“supplier_display_name”:”xyz”,
“payment_method” :”xyz”,
“discount”:00,
“currency”:”rupee”,
}
}
Response Payload:
{
"status": 200,
"message": "supplier Updated Successfully",
"data": {
"supplier_name": "PRD"
}
}
Method: POST
API Endpoint: /api/add-edit-supplier-details
Caller: UI/User
Method: POST
API Endpoint: /api/add-edit-contact-details
Caller: UI/User
Request Body:
{
"supplier_id": "12345",
"contact_details": {
"salutation": "Mr.",
"first_name": "Rishabh",
"last_name": "kumar",
"phone": "987xxxx10",
"email": "rishabh@example.com",
"designation": “xyz"
}
}
Method: GET
API Endpoint: /api/get-orders/{customer_id}/
Caller: UI/User