> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.rabot.energy/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Data / Delivery Stage

> How to work with customer data in the Rabot Partner API

The Partner API allows you to access customer data stored in the RABOT platform. Depending on the partnership scope and agreed data privacy policies, your API client will have a certain access scope assigned (see [Scopes](/guides/authentication#scopes)), which control the visibility of customer and contract information.

### Sales Affilliate partners

For a sales partnership, you should use the `/orders` endpoints to track processing of orders instead of the `/customers` endpoints. See [Check order status](/guides/orders#check-order-status).

### 3rd Party \[E.g. HEMS] Integration partners

If your application is enabling customers of RABOT Energy or RABOT Whitelabel partners to link their accounts to your application and to allow your application to access their data on the RABOT platform, the `/customers` endpoints will only list those customers that successfully approved the data access through the [customer linking process](/guides/customer_linking).

### Whitelabel partners

As a whitelabel partner, you will automatically see all customers in the API that you have acquired and that successfully ordered an energy supply contract, either through the web funnel or the API (see [create new order](/api-reference/orders/create_order) endpoint). For your customers, you will have access according to the partnership agreement - either `role:finance-reporting`, `role:customer-support` or `role:application` scope.

If you don't have the `role:application` scope by default, you can use the [customer linking process](/guides/customer_linking) to request opt-in from customers, granting full data access to your application.

## Delivery Stage

Once an order has successfully cleared the change process, the contract will be in a `PendingDelivery` state until the start of delivery. This start delivery date is available in the orders DTO in the field [actualDateOfDelivery](/api-reference/orders/list_orders#response-data-orders-items-actual-date-of-delivery-one-of-0) once we have received the communication from the DSO.

<Info>
  At this state, you will see the customer returned in the GET /customers endpoint response as they transition to Customer status.
</Info>

As delivery begins, the data retrievable via the /contracts endpoint and the relevant subpaths will populate as per the customer's delivery location setup, e.g. Actual Consumption values (if TAF7 enabled).

Please refer to our [Contract Data, Documents & Metrics](/guides/contracts) for more information.

## Customer List

You can get a list of all customers visible to your application, according to the restrictions above using the [list customers](/api-reference/customers/list_customers) endpoint. See [paging](/guides/pagination) to learn how to work with large data sets.

```cURL example request theme={null}
curl -L "https://api.rabot-charge.de/partner/v1/customers?limit=75&offset=0" \
-H "Authorization: ••••••"
```

```json example response expandable theme={null}
{
    "count": 3,
    "hasMoreItems": false,
    "data": [
        {
            "customerNumber": "41219866",
            "externalIdentifier": null,
            "firstName": "Carla",
            "lastName": "Ertl",
            "businessName": null,
            "emailAddress": "test_carla42@rabot-charge.de",
            "relations": [
                "Owner"
            ]
        },
        {
            "customerNumber": "74048277",
            "externalIdentifier": null,
            "firstName": "Max",
            "lastName": "Mustermann",
            "businessName": null,
            "emailAddress": "max@mustermann.de",
            "relations": [
                "Owner"
            ]
        },
        {
            "customerNumber": "46491184",
            "externalIdentifier": "test-1",
            "firstName": "Alexa",
            "lastName": "Weigel",
            "businessName": null,
            "emailAddress": "test_alexa44@rabot-charge.de",
            "relations": [
                "Owner",
                "Linked"
            ]
        }
    ],
    "isSuccess": true,
    "message": null,
    "error": null
}
```

The `relations` attributes in the customer records help you to understand the relationship and access level you have for the respective customer:

| Relation    | Description                                                                                                       |
| ----------- | ----------------------------------------------------------------------------------------------------------------- |
| `Affiliate` | A customer acquired by you in a Sales Partnership model                                                           |
| `Owner`     | A customer acquired by you in a Whitelabel Partnership model                                                      |
| `Linked`    | A customer that has granted you full data access through the [customer linking process](/guides/customer_linking) |

## Creating new customers

New customers will be created automatically when they submit an order via the web funnel, or when you submit new customer details via the [create new order](/api-reference/orders/create_order) call.

## Questions or Concerns?

Feel free to speak with our [Integration Management Team](mailto:j.ohara@rabot.energy) or alternatively, ask our built-in AI assistant, Rabotini 🤖 (several languages supported).
