Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

General Information

...

ServiceAPIMethodData ModelWorkflow
multitenant/productPOST

...

...

N/A

Input

...

Type: application/json
NameSourceMandatoryTypeSpecial FormatDescription
codeBodyYESStringThe length is between 4 - 5Product code
nameBodyYESStringN/AProduct name
descriptionBodyNOStringN/A

Product description

scopeBodyNOObject
Product Scope

Output

...

Valid Response

Code Block
languagejs
titleValid Response Sample
{
    "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



Unable to add the product record
Code
Description
400

Business logic required data are missing

468

Product already exists

469

474

Missing required field: either id or code

602
Model error: + %model_error%


Example (CURL)

...

Code Block
languagebash
titleCalling List Products API
 > CURL -X POST http://127.0.0.1:40044000/multitenant/product -d {
    "code": "silver",
    "name": "Silver",
    "description": "product description"
}

...