---
title: 'Enable or disable customers'
url: 'https://documentation.netstorming.net/customers-handling-api/customer-enable-disable'
markdown: 'https://documentation.netstorming.net/customers-handling-api/customer-enable-disable.md'
date: '2026-11-10'
description: 'URI: /api/customers/enable for enable customers /api/customers/disable for disable customers REQUEST: { "key": "Loremipsumdolorsitametconsecteturadipiscingelitlaoreet", "owner_code": "netstorming", "customers": [ { "code": "test01" }, { "code": "testKO" } ] }…'
taxonomy:
  category:
    - docs
---

# Enable or disable customers

[](#)  [ Customers Handling API ](https://documentation.netstorming.net/customers-handling-api)      Enable or disable customers    

##### URI:

`/api/customers/enable` for enable customers

`/api/customers/disable` for disable customers

##### REQUEST:

```
{
  "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 |

##### RESPONSE:

```
{
  "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 |

##### Examples

You can find an example [here](https://documentation.netstorming.net/examples/customers-insert-examples)

 [ ](https://documentation.netstorming.net/customers-handling-api/set-foreign-code) [](https://documentation.netstorming.net/customers-handling-api/customer-import-via-csv-file)

---

## Navigation

- Parent: [Customers Handling API](https://documentation.netstorming.net/customers-handling-api.md)
- Previous: [Set foreign code](https://documentation.netstorming.net/customers-handling-api/set-foreign-code.md)
- Next: [Customers import via CSV file](https://documentation.netstorming.net/customers-handling-api/customer-import-via-csv-file.md)
