You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Current »
General Information
Service | API | Method | Data Model | Workflow | Group |
---|
multitenant | /product | POST | Products | N/A | Console product |
Description
Get console product
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 |
scope | Body | NO | Object | Scope Schema | Product Scope - Check the Example below |
Scope Example
"scope": {
"acl": {
"dashboard": {
"multitenant": {
"1": {
"access": false,
"get": [
{
"/product": {
"access": false
},
"group": 'Product'
}
]
},
"2.1" : {
"access": false,
"get": [
{
"/product": {
"access": false
},
"group": 'Product'
}
]
}
}
}
}
}
Output
Response
SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response
Valid Response
{
"result": true,
"data": [
{
"name": "Fadi2",
"code": "FADI2",
"description": "Some Description",
"scope": {
"acl": {
"dashboard": {
"multitenant": {
"1": {
"access": false,
"get": [
{
"/product": {
"access": false
},
"group": 'Product'
}
]
},
"2.1" : {
"access": false,
"get": [
{
"/product": {
"access": false
},
"group": 'Product'
}
]
}
}
}
}
},
"packages": [],
"_id": "5d6fedabbed68d11b6f54636"
}
]
}
Invalid Response
{
"result":false,
"errors":{
"codes":[468],
"details":[
{
"code":468,
"message":"Product already exists"
}
]
}
}
Response schema
Follow this link to check out the response JSON Schema
SOAJS Error Codes
| |
---|
400 | Business logic required data are missing |
468 | Product already exists |
602 | Model error: + %model_error% |
Add Comment