-
Notifications
You must be signed in to change notification settings - Fork 0
REST API Documentation
Cody Shearer edited this page Nov 7, 2020
·
7 revisions
- Url: /cart
- Input
{
"Barcodes": ["11111111", "1111111111111"],
"barcodeType": ["ean8", "ean13"],
"quantities": [1, 2],
"session": "abc",
"businessID": "1"
}
- Output
{
"Total":"9.99",
"subtotal":"8.90",
"tax": "1.09"
}
- Takes barcodes and quantities as input and returns total and subtotal
- Url: /info
- Input
{
"email":"abc@def.com",
"phone":"5557891234",
"businessID":"1"
}
- Output
{
"Message": "success"
}
{
"message":"failure"
}
- Url: /event
- Input
{
"Session": "15386831681",
"type":"customerScannedItem",
"barcode":"abc",
"businessID":"1"
}
{
"Session":"15386831681",
"type":"customerAddedItemToCart",
"barcode":"abc",
"businessID":"1"
}
{
"Session":"15386831681",
"type":"customerRemovedItemToCart",
"barcode":"abc",
"businessID":"1"
}
- Output
{
"Message": "success"
}
{
"Message": "failure"
}
- Url: /ping
- Input ""
- Output "pong"
- Url: /product
- Input
{
"barcode":"abc",
"name":"chip",
"price":"5.99",
"description":"good ole chips",
"businessID":"1"
}
- Output
{
"Message": "success"
}
{
"Message": "failure"
}
- Url: /lookup
- Input
{
"barcode": "1111111111111" ,
"barcodeType": "ean13",
"businessID":"1"
}
- Output
{
"barcode":"abc",
"name":"chip",
"price":"5.99",
"description":"good ole chips",
"businessID":"1"
}
- Url: /search
- Input
{
"query": "jeff"
}
- Output
{
"match": [
{
"barcode":"abc",
"barcodeType": "ean13"
"name": "jeff’s chip",
"price":"5.99",
"description":"good ole chips",
"businessID":"1"
},
… (<= 20 matching products returned)
]
}
- Url: /login
- Input:
{
"username": "employee1",
"password": "mystrongpassword"
}
- Output:
{
"message": "success",
"token": "ads2ghaFK9TDasADFbjk"
}
{
"message":"failure"
}
- Url: /businessCarts
- Input:
{
"token": "ads2ghaFK9TDasADFbjk"
}
- Output
{
""
}
- Url: /cartVerify
- Input:
{
"token": "ads2ghaFK9TDasADFbjk"
}
- Output:
{
"cartNumbers": [35, 34, 33, 32],
"cartTime": [1602699192112, 1602699192111, 1602699192109, 1602699192105]
}
- Home
- Personal Logs
- Milestones
- Project Description
- Team Organization
- Personas
- User Stories
- Design
- Requirements
- Architecture
- Ethical, Legal, and Security Considerations
- Beta Release