363 lines
7.0 KiB
HTTP

### create row
POST http://localhost:9001/api/vehicle
Content-Type: application/json
Authorization: {{auth-token}}
{
"data": {
"number": "KA01HD6677",
"owner": "gowthaman"
},
"uniqueIdentifier": ""
}
### create row
POST http://localhost:9001/api/vendor/po
Content-Type: application/json
Authorization: {{auth-token}}
{
"data": {
"name": "arsalan",
"rating": 5
}
}
### create row, with autogenerated identifier
POST http://localhost:9001/api/log
Content-Type: application/json
Authorization: {{auth-token}}
{
"data": {
"user": "gowthaman",
"action": "logout"
}
}
### create row, with autogenerated identifier
POST http://localhost:9001/api/purchaseOrder
Content-Type: application/json
Authorization: {{auth-token}}
{
"vendor" : "arslan",
"products": ["chairs", "tables"]
}
### get row
GET http://localhost:9001/api/log/log-0000000001
Authorization: Bearer {{auth-token}}
### get row
GET http://localhost:9001/api/vehicle/KA01HD6667
Authorization: Bearer {{auth-token}}
### query row
POST http://localhost:9001/api/vehicle/query
Content-Type: application/json
Authorization: {{set-auth-token}}
{
"sql": "select sys_pk, tenant_id, deleted_on, deleted_by, deleted, version, created_at, modified_at, created_by, modified_by, data, tags, comments, unique_identifier, entity_name from data_model where data ->> 'number' = :number",
"params": {
"number": "KA03HD6064"
}
}
### update field
PATCH http://localhost:9001/api/vehicle/KA01HD6667
Content-Type: application/json
Authorization: {{auth-token}}
{
"key": "ownerName",
"value": "Gowthaman Basuvaraj"
}
### upate a row
PUT http://localhost:9001/api/vehicle/KA01HD6667
Content-Type: application/json
Authorization: {{auth-token}}
{
"number": "KA03HD6064",
"ownerName": "Gowthaman Basuvaraj",
"address": "Sathyamangalam"
}
### delete a row
DELETE http://localhost:9001/api/vehicle/KA01HD6667
Authorization: {{auth-token}}
### get po for id
GET http://localhost:9001/api/vendor/product
Authorization: {{auth-token}}
### get product for id
GET http://localhost:9001/api/vendor/product/7
Authorization: {{auth-token}}
### get row
GET http://localhost:9001/api/vendor/product/7
Authorization: Bearer {{auth-token}}
### create product
POST http://localhost:9001/api/vendor/product
Content-Type: application/json
Authorization: {{auth-token}}
{
"name": "Shirt",
"description": "Black Shirt",
"hsnCode": "BSM1XL"
}
### update field
PATCH http://localhost:9001/api/vendor/product/11
Content-Type: application/json
Authorization: {{auth-token}}
### upate a row
PUT http://localhost:9001/api/vendor/product/11
Content-Type: application/json
Authorization: {{auth-token}}
### delete a row
DELETE http://localhost:9001/api/vendor/product/2
Authorization: {{auth-token}}
### create vendor
POST http://localhost:9001/api/vendor/
Content-Type: application/json
Authorization: {{auth-token}}
{
"name": "arsalan",
"msme": "1234",
"hsnCode": "1234",
"gstNumber": "GST123",
"address": "Bangalore",
"rating": 2,
"contacts": [
{
"name": "contact1",
"email": "abc@cyz.com",
"mobile": "01234567890"
}
]
}
### create batch vendor
POST http://localhost:9001/api/vendor/batch
Content-Type: application/json
Authorization: {{auth-token}}
[
{
"name": "john",
"description": "5678",
"hsnCode": "5678",
"gstNumber": "GST567",
"address": "Mumbai",
"rating": 4,
"contacts": [
{
"name": "contact1",
"email": "xyz@abc.com",
"phone": "9876543210"
}
]
},
{
"name": "emma",
"description": "7890",
"hsnCode": "7890",
"gstNumber": "GST789",
"address": "Delhi",
"rating": 3,
"contacts": [
{
"name": "contact2",
"email": "def@uvw.com",
"phone": "8765432109"
}
]
},
{
"name": "alex",
"description": "2345",
"hsnCode": "2345",
"gstNumber": "GST234",
"address": "Chennai",
"rating": 5,
"contacts": [
{
"name": "contact3",
"email": "ghi@rst.com",
"phone": "7654321098"
}
]
}
]
### GET ALL VENDORS
POST http://localhost:9001/api/vendor/getAll
Content-Type: application/json
Authorization: {{auth-token}}
{
"common": {
"sortAsc": true
},
"vendorFilters": {
"nameLike": "a"
}
}
### create batch pos
POST http://localhost:9001/api/vendor/po/batch
Content-Type: application/json
Authorization: {{auth-token}}
[
{
"products": [
{
"productId": "1232",
"productName": "chair",
"unitPrice": 34.2,
"quantity": 10,
"description": "wooden chair"
}
],
"referenceQuotation": "12323",
"totalAmount": 342,
"poNum": "1",
"poDate": "2024-01-10",
"validTill": "2024-02-10",
"tnc": ["tnc1", "tnc2"]
},
{
"products": [
{
"productId": "5678",
"productName": "table",
"unitPrice": 45.5,
"quantity": 5,
"description": "glass table"
}
],
"referenceQuotation": "56789",
"totalAmount": 227.5,
"poNum": "2",
"poDate": "2024-10-25",
"validTill": "2024-10-25",
"tnc": ["tnc3", "tnc4"]
},
{
"products": [
{
"productId": "91011",
"productName": "lamp",
"unitPrice": 15.75,
"quantity": 20,
"description": "floor lamp"
}
],
"referenceQuotation": "9101112",
"totalAmount": 315,
"poNum": "3",
"poDate": "2024-10-25",
"validTill": "2024-12-25",
"tnc": ["tnc5", "tnc6"]
}
]
### GET ALL POS
POST http://localhost:9001/api/vendor/po/getAll
Content-Type: application/json
Authorization: {{auth-token}}
{
"common" : {},
"poFilters": {}
}
### CREATE QUOTES
POST http://localhost:9001/api/vendor/quote/batch
Content-Type: application/json
Authorization: {{auth-token}}
[
{
"products": [
{
"productId": "1232",
"productName": "chair",
"unitPrice": 34.2,
"quantity": 10,
"description": "wooden chair"
}
],
"reqForQuoteNum": "12323",
"totalAmount": 342,
"quoteNum": "1",
"quoteDate": "2024-10-24",
"validTill": "2024-11-24",
"tnc": ["tnc1", "tnc2"]
},
{
"products": [
{
"productId": "5678",
"productName": "table",
"unitPrice": 45.5,
"quantity": 5,
"description": "glass table"
}
],
"reqForQuoteNum": "56789",
"totalAmount": 227.5,
"quoteNum": "2",
"quoteDate": "2024-10-25",
"validTill": "2024-11-25",
"tnc": ["tnc3", "tnc4"]
},
{
"products": [
{
"productId": "91011",
"productName": "lamp",
"unitPrice": 15.75,
"quantity": 20,
"description": "floor lamp"
}
],
"reqForQuoteNum": "9101112",
"totalAmount": 315,
"quoteNum": "3",
"quoteDate": "2024-10-25",
"validTill": "2024-12-25",
"tnc": ["tnc5", "tnc6"]
}
]
### GET ALL QUOTES
POST http://localhost:9001/api/vendor/quote/getAll
Content-Type: application/json
Authorization: {{auth-token}}
{
"common" : {},
"quoteFilters": {}
}