Versions Compared

Key

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

General Information

...

ServiceAPIMethod
multitenant/productPOST


Data Model: GroupsProducts

Workflow:

Input

...

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

Product description

...

Code Block
languagejs
titleValid Response Sample
{
    "result": true,
    "data": [
        {
            "name": "Fadi2",
            "code": "FADI2",
            "description": "Some Description",
            "scope": {
                "acl": {}
            },
            "packages": [],
            "_id": "5d6fedabbed68d11b6f54636"
        }
    ]
}

...


Code
Description
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)

...

Request

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

...