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

# Climate customers

> Create and retrieve Neuro-Pay climate customer profiles

## Endpoints

| Method | Path                                                   | Purpose                                     |
| ------ | ------------------------------------------------------ | ------------------------------------------- |
| `POST` | `/co2-customer/create`                                 | Create or update a climate customer profile |
| `GET`  | `/co2-customer/profile/reference/{external_reference}` | Retrieve a profile by external reference    |
| `GET`  | `/co2-customer/profile/cid/{cid}`                      | Retrieve a profile by customer CID          |

## Create customer profile

`POST /co2-customer/create`

### Request body

```json theme={null}
{
  "email": "climate@example.com",
  "first_name": "Ada",
  "last_name": "Lovelace",
  "customer_type": "private",
  "accumulation_period": "monthly",
  "external_reference": [
    {
      "reference": "crm-123",
      "name": "CRM"
    }
  ]
}
```

### Common fields

| Field                 | Type            | Required | Notes                                                                       |
| --------------------- | --------------- | -------- | --------------------------------------------------------------------------- |
| `email`               | string          | yes      | Contact email for the profile                                               |
| `first_name`          | string          | no       | Used for private customers                                                  |
| `last_name`           | string          | no       | Used for private customers                                                  |
| `business_name`       | string          | no       | Used for company customers                                                  |
| `customer_type`       | string          | no       | `private` or `corporate`                                                    |
| `organization_number` | string          | no       | Organization identifier                                                     |
| `external_reference`  | string or array | no       | A comma-separated string or an array of `{reference, name}` objects         |
| `accumulation_period` | string          | no       | `default`, `direct`, `daily`, `weekly`, `monthly`, `quarterly`, or `yearly` |

If a matching profile already exists for your company, this request updates the
existing profile instead of creating a duplicate.

## Response shape

```json theme={null}
{
  "customer_id": "co2_profile_cid",
  "externalReference": [
    {
      "reference": "crm-123",
      "name": "CRM"
    }
  ],
  "first_name": "Ada",
  "last_name": "Lovelace",
  "business_name": null,
  "organization_number": null,
  "email": "climate@example.com",
  "customer_type": "private",
  "price_contract_id": 123,
  "unit_price": 1.25,
  "currency_id": "SEK",
  "unit": "Kg",
  "template_contract_id": 45,
  "accumulation_period": "monthly"
}
```

## Retrieve by external reference

`GET /co2-customer/profile/reference/{external_reference}`

Returns the same profile shape shown above.

## Retrieve by CID

`GET /co2-customer/profile/cid/{cid}`

Returns the same profile shape shown above.
