General Information
...
Service | API | Method |
---|---|---|
multitenant | /product | POST |
Data Model: Groups
Workflow:
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|---|---|---|---|---|
code | Body | YES | String | The length is between 4 - 5 | Product code |
name | Body | YES | String | N/A | Product name |
description | Body | NO | String | N/A | Product description |
Output
...
Valid Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"result": true,
"data": [
{
"name": "Fadi2",
"code": "FADI2",
"description": "Some",
"scope": {
"acl": {}
},
"packages": [],
"_id": "5d6fedabbed68d11b6f54636"
}
]
} |
Invalid Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"result":false,
"errors":{
"codes":[460],
"details":[
{
"code":460,
"message":"Unable to find products"
}
]
}
} |
Error Codes
Code | Description |
---|---|
468 | Product already exists |
469 | Unable to add the product record |
474 | Missing required field: either id or code |
Example (CURL)
...
Request
Code Block | ||||
---|---|---|---|---|
| ||||
> CURL -X GET http://127.0.0.1:4004/product -d {
"code": "silver",
"name": "Silver",
"description": "product description"
} |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"result": true,
"data": [
{
}
]
} |