/api/customers/enable
for enable customers
/api/customers/disable
for disable customers
{
"key": "Loremipsumdolorsitametconsecteturadipiscingelitlaoreet",
"owner_code": "netstorming",
"customers": [
{
"code": "test01"
},
{
"code": "testKO"
}
]
}
Request parameters:
Key | Compulsory | Value type | Max length | Notes |
---|---|---|---|---|
key | yes | varchar | API Key provided by Netstorming | |
owner_code | yes | varchar | 3-12 alphanumeric chars | Owner the requested customers belongs to |
customers | yes | list of objects | see below: Customer parameters | List of customers data to be updated |
Request.customer parameters:
Key | Compulsory | Value type | Max length | Notes |
---|---|---|---|---|
code | yes (no if foreign_code provided) | varchar | 3-12 alphanumeric chars | Customer code in Netstorming sytstem |
foreign_code | yes (no if code provided) | varchar | Foreign code |
{
"results": {
"test01": true,
"testKO": false,
}
}
Response parameters:
Key | Compulsory | Value type | Notes |
---|---|---|---|
results | yes | list of objects | one object for each customer, holding the insert results (more deails below) |
errors | yes | list of objects | one object for each error, if any (more deails below) |
Response.results parameters:
Key | Compulsory | Value type | Notes |
---|---|---|---|
code | yes | string | Echo-value of the dry_run parameter in request |
customer | yes | bool | Result of insert operation of customer. true = ok, false = failed |
user | yes | bool | Result of insert operation of user. true = ok, false = failed. Always be false if customer = false |
Response.errors parameters:
Key | Compulsory | Value type | Notes |
---|---|---|---|
line/index | yes | int | Index of item that generates the error |
errors | yes | list of strings | Human-readable validation errors on the requested data |
You can find an example here