General Information
...
Service | API | Method | Data Model | Workflow |
---|---|---|---|---|
multitenant | /product/package | PUT |
Data Model:
...
Products | N/A |
Input
...
Type: application/json
Name | Source | Mandatory | Type | Special Format | Description |
---|---|---|---|---|---|
id | Query | YES | String | N/A | The product id |
code | Query | YES | String | The Length is 4 - 5 | The product code |
name | Body | YES | String | N/A | The product name |
description | Body | NO | String | N/A | The product description |
_TTL | Body | YESNO | String | '6', '12', '24', '48', '72', '96', '120', '144', '168' | |
tags | Body | NO | Array | Array of strings | |
acl | Body | NO | Object | Product | Package ACL |
Output
...
Response
SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response
Valid Response
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ result: true, data: 'product package %package_code% updated successfully' } |
Invalid Response
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "result":false, "errors":{ "codes":[460], "details":[ { "code":460, "message":"Unable to find products" } ] } } |
Code | Description | |
---|---|---|
461 | Unable to find package | |
437 | Unable to get the environment records400 | Business logic required data are missing |
460 | Unable to find products | |
467 | Package already exists | |
473 | Missing required fields | |
461 | Unable to | update product recordfind package |
500 | This record is locked. You cannot modify or delete it |
Example (CURL)
Request
Code Block | ||||
---|---|---|---|---|
| ||||
> CURL -X PUT http://127.0.0.1:4004/product?id=%product_id% -d {
"code": "UPDATE",
"name": "Some Update",
"description": "package updated description",
"_TTL": "12",
"acl": {}
} |
Response
...
language | js |
---|---|
title | List Products API response |
...
602 | Model error: + %model_error% |