General Information
...
Service | API | Method | Data Model | Workflow |
---|---|---|---|---|
multitenant | /product | POST |
...
...
N/A |
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 | Product Scope |
Output
...
Valid Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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" } ] } |
...
Error Codes
Code | Description | ||
---|---|---|---|
400 | Business logic required data are missing | ||
468 | Product already exists | 469 | Unable to add the product record|
474 | Missing required field: either id or code | ||
602 | Model error: + %model_error% |
Example (CURL)
...
Code Block | ||||
---|---|---|---|---|
| ||||
> CURL -X POST http://127.0.0.1:40044000/multitenant/product -d { "code": "silver", "name": "Silver", "description": "product description" } |
...