# 3. Manage your Whitelist and Blacklist

The Open Charging Network allows you to exchange OCPI messages with anybody on the network with just one single OCPI connection, regardless of the OCN Node that you or your counterpart are connected to.&#x20;

There are some cases in which you want to restrict the list of parties that can communicate with you. For this, the OCN Node provides you with a white- and blacklisting module, called OCN Rules.

*Note: This service is an optional feature that needs to be enabled in your own OCN Node or by your OCN Node Operator.*

**Example: add party to blacklist**

```
POST to URL: https://node.ocn.org/ocpi/receiver/2.2/ocnrules/blacklist

    {
        "country_code": "DE",
        "party_id": "ABC",
        "modules": ["cdrs", "locations"]
    }
```

* You can find a documentation of how you can use this service on the [HTTP API Documentation](https://shareandcharge.bitbucket.io/) under **OcnRules module.**
* See the source code for the OCN node Rules service [here](https://github.com/energywebfoundation/ocn-node/blob/master/src/main/kotlin/snc/openchargingnetwork/node/services/OcnRulesService.kt).

{% hint style="info" %}
Access the full OCN technical documentation [here](https://shareandcharge.com/wp-content/uploads/2020/11/OCN-Documentation-v1.1.pdf).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.energyweb.org/legacy-documentation/solutions-2023/open-charging-network/connect-an-ocpi-ocn-party-to-a-node/3.-manage-your-whitelist-and-blacklist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
