> For the complete documentation index, see [llms.txt](https://docs.energyweb.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
