https://github.com/ulbora/ulboraproductservice
A product micro service
https://github.com/ulbora/ulboraproductservice
Last synced: about 1 month ago
JSON representation
A product micro service
- Host: GitHub
- URL: https://github.com/ulbora/ulboraproductservice
- Owner: Ulbora
- License: agpl-3.0
- Created: 2017-04-30T23:26:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-09T18:03:40.000Z (about 8 years ago)
- Last Synced: 2025-10-06T23:33:47.468Z (9 months ago)
- Language: JavaScript
- Size: 79.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ulbora Product Service
==============
A Product Micro Service
## Headers
Content-Type: application/json (for POST and PUT)
Authorization: Bearer atToken
clientId: clientId (example 33477)
## Add Product
```
POST:
URL: http://localhost:3005/rs/product/add
Example Request
{
"clientId":"clientId",
"productName":"Cap",
"brand":"Nike",
"mfnId":1,
"model":"123_Cap",
"description":"A black Cap",
"overview":"111djfjoiqjldktrtryrtyrytrsflkdfjdskdsoidsljdsjdsljdlsjfljsdlfjdlsfdsjfdslfkdsjffld",
"specifications":"111djfjoiqjldktrtryrtyrytrsflkdfjdskdsoidsljdsjdsljdlsjfljsdlfjdlsfdsjfdslfkdsjff"
}
```
```
Example Response
{
"success": true,
"id": 176,
"clientId": "403",
"message": ""
}
```
## Update Product
```
PUT:
URL: http://localhost:3005/rs/product/update
Example Request
{
"id":176,
"clientId":"403",
"productName":"Hat",
"brand":"Nike",
"mfnId":1,
"model":"123_Hat",
"description":"A black Cap",
"overview":"111djfjoiqjldktrtryrtyrytrsflkdfjdskdsoidsljdsjdsljdlsjfljsdlfjdlsfdsjfdslfkdsjffld",
"specifications":"111djfjoiqjldktrtryrtyrytrsflkdfjdskdsoidsljdsjdsljdlsjfljsdlfjdlsfdsjfdslfkdsjff"
}
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Get Product
```
GET:
URL: http://localhost:3005/rs/product/get/176/403
```
```
Example Response
{
"id": 176,
"productName": "Hat",
"brand": "Nike",
"mfnId": 1,
"model": "123_Hat",
"description": "A black Cap",
"overview": {
"type": "Buffer",
"data": [
49,
49,
49,
100
]
},
"specifications": {
"type": "Buffer",
"data": [
49,
49,
49,
102
]
},
"clientId": 403
}
```
## Delete Product
```
DELETE:
URL: http://localhost:3005/rs/product/delete/176/403
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Add Product Details
```
POST:
URL: http://localhost:3005/rs/details/add
Example Request
{
"sku":"00100212457",
"price":8.56,
"productId":177,
"clientId":403
}
```
```
Example Response
{
"success": true,
"id": 176,
"clientId": "403",
"message": ""
}
```
## Update Product Details
```
PUT:
URL: http://localhost:3005/rs/details/update
Example Request
{
"id": 197,
"sku":"00100212458",
"price":10.56,
"clientId":403
}
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Get Product Details
```
GET:
URL: http://localhost:3005/rs/details/get/197/403
```
```
Example Response
{
"id": 197,
"sku": "00100212458",
"price": 10.56,
"productId": 177,
"clientId": 403
}
```
## Get Product Details by Product ID
```
POST:
URL: http://localhost:3005/rs/details/getByProduct
Example Request
{
"productId":177,
"clientId":403
}
```
```
Example Response
[
{
"id": 196,
"sku": "00100212457",
"price": 8.56,
"productId": 177,
"clientId": 403
},
{
"id": 197,
"sku": "00100212458",
"price": 10.56,
"productId": 177,
"clientId": 403
}
]
```
## Get Product Details by partial SKU
```
POST:
URL: http://localhost:3005/rs/details/getBySku
Example Request
{
"sku":"001002%",
"clientId":403
}
```
```
Example Response
[
{
"productDetailsId": 196,
"productName": "Cap",
"brand": "Nike",
"model": "123_Cap",
"description": "A black Cap",
"sku": "00100212457",
"price": 8.56,
"productId": 177
},
{
"productDetailsId": 197,
"productName": "Cap",
"brand": "Nike",
"model": "123_Cap",
"description": "A black Cap",
"sku": "00100212458",
"price": 10.56,
"productId": 177
}
]
```
## Get Product Details by Bar Code
```
POST:
URL: http://localhost:3005/rs/details/getByBarCode
Example Request
{
"barCodeType":"upc",
"barCode": "15555fff555115",
"clientId":403
}
```
```
Example Response
{
"productDetailsId": 196,
"sku": "00100212457",
"productId": 177,
"clientId": 403
}
```
## Delete Product Details
```
DELETE:
URL: http://localhost:3005/rs/details/delete/197/403
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Add Product Details Bar Code
```
POST:
URL: http://localhost:3005/rs/barcode/add
Example Request
{
"type": "upc",
"code": "15555fff555112",
"productDetailsId":196,
"clientId":403
}
```
```
Example Response
{
"success": true,
"id": 86,
"message": ""
}
```
## Update Product Details Bar Code
```
PUT:
URL: http://localhost:3005/rs/barcode/update
Example Request
{
"id":86,
"type": "upc",
"code": "15555fff555115",
"clientId":403
}
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Get Product Details Bar Code
```
GET:
URL: http://localhost:3005/rs/barcode/get/86/403
```
```
Example Response
{
"id": 86,
"type": "upc",
"code": "15555fff555115",
"productDetailsId": 196,
"clientId": 403
}
```
## Get Product Details Bar Code By Details ID
```
POST:
URL: http://localhost:3005/rs/barcode/getByDetails
Example Request
{
"productDetailsId": 196,
"clientId":403
}
```
```
Example Response
[
{
"id": 85,
"type": "upc",
"code": "15555fff555111",
"productDetailsId": 196,
"clientId": 403
},
{
"id": 86,
"type": "upc",
"code": "15555fff555115",
"productDetailsId": 196,
"clientId": 403
}
]
```
## Delete Product Details Bar Code
```
DELETE:
URL: http://localhost:3005/rs/barcode/delete/86/403
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Add Product Details Options
```
POST:
URL: http://localhost:3005/rs/options/add
Example Request
{
"optionName": "color",
"optionValue": "blue",
"productDetailsId":196,
"clientId":403
}
```
```
Example Response
{
"success": true,
"id": 88,
"message": ""
}
```
## Update Product Details Options
```
PUT:
URL: http://localhost:3005/rs/options/update
Example Request
{
"id":88,
"optionName": "weight",
"optionValue": "5.5",
"clientId":403
}
```
```
Example Response
{
"success": true,
"message": ""
}
```
## Get Product Details Options
```
GET:
URL: http://localhost:3005/rs/barcode/get/86/403
```
```
Example Response
{
"id": 86,
"type": "upc",
"code": "15555fff555115",
"productDetailsId": 196,
"clientId": 403
}
```
## Get Product Details Options By Details ID
```
POST:
URL: http://localhost:3005/rs/options/getByDetails
Example Request
{
"productDetailsId": 196,
"clientId":403
}
```
```
Example Response
[
{
"id": 88,
"optionName": "weight",
"optionValue": "5.5",
"productDetailsId": 196,
"clientId": 403
}
]
```
## Search Product Details Options By Option
```
POST:
URL: http://localhost:3005/rs/options/searchByOption
Example Request
{
"productDetailsId": 196,
"clientId":403,
"optionName": "%weight%"
}
```
```
Example Response
{
"id": 88,
"optionName": "weight",
"optionValue": "5.5",
"productDetailsId": 196,
"clientId": 403
}
```
## Delete Product Details Options
```
DELETE:
URL: http://localhost:3005/rs/options/delete/88/403
```
```
Example Response
{
"success": true,
"message": ""
}
```