---
title: "Create or update an end customer (no order)"
method: POST
path: "/v1/partner/customers"
tags: ["Partner Provisioning"]
---

# Create or update an end customer (no order)

`POST /v1/partner/customers`

## Request

- Base URL: `https://developers.servera.co.uk`
- URL: `https://developers.servera.co.uk/v1/partner/customers`
- Auth: HTTP bearer

Create an end customer, or update its requisites, WITHOUT placing an order —
for pushing customer details to Servera before (or independently of) a purchase.

- Email not in Servera → a new account is created (owned by you, verification email
  sent) → `customer_created: true`.
- Email exists and you own it → its requisites are updated → `customer_created: false`.
- Email exists but you don't own it → adopted + updated when `link_if_exists: true`,
  else `409 customer_exists_not_owned`.

Naturally idempotent: the email identifies the account, so a retry updates the same
customer rather than creating a duplicate. Returns the customer with `customer_id`
(use it on later `/partner/orders`) and its `services`.

## Request body

- PartnerCustomerUpsertBody
  - `customer` PartnerCustomer, required
    - `email` string, required: End-customer email (used to create/identify the account).
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `company_name` string, nullable
    - `company_number` string, nullable: Company registration code.
    - `tax_id` string, nullable: VAT / tax id, e.g. LT100000000000.
    - `phone` string, nullable
    - `country` string, nullable: ISO country code, e.g. LT.
    - `language` string, nullable: Preferred language, e.g. lt or en.
    - `vat_validated` boolean, nullable: Set true if YOU (the partner) already validated this VAT number via VIES at registration. Servera then records the validation so the invoice applies 0% reverse charge for a valid intra-EU B2B customer (e.g. an LV company billed by the LT company). Send ONLY when the VIES check actually returned valid.
    - `vat_validated_name` string, nullable: Company name returned by VIES for that VAT number (optional; stored with the validation).
  - `link_if_exists` boolean: If a customer with this email already exists in Servera but is not yet owned by this partner, adopt it and update its requisites instead of returning 409.
  - `send_emails` boolean: Send the verification email when a NEW account is created.

## Response `200`

Successful Response

- PartnerCustomerInfo
  - `customer_id` integer, required
  - `email` string, nullable
  - `company_name` string, nullable
  - `name` string, nullable
  - `country` string, nullable
  - `language` string, nullable
  - `email_verified` boolean, nullable
  - `created_at` string, nullable
  - `customer_created` boolean, nullable: Only set by POST /partner/customers: true if a new account was created, false if an existing one was updated/reused.
  - `services` PartnerServiceInfo[]
    - `id` integer, required
    - `product_id` integer, required
    - `product_name` string, nullable
    - `status` 'pending' | 'active' | 'suspended' | 'cancelled' | 'terminated' | 'completed', required
    - `billing_cycle` string, nullable
    - `recurring_amount` number, nullable: Recurring fee per cycle. null for one-time products (they have no recurring charge).
    - `next_due_date` string, nullable: Next billing date (end of the paid period). null for one-time products and for services not yet anchored.
    - `registration_date` string, nullable
    - `order_id` integer, nullable: Id of the order that created this service.
    - `order_number` string, nullable: Order number (ORD-…) that created this service — use with order_item_index to link a service to its order line.
    - `order_item_index` integer, nullable: 0-based position of this service's item within its order, stable across calls, so N services from quantity:N can be told apart.

## Other responses

- `401`: Unauthorized — missing or invalid API key
- `403`: Forbidden — error is insufficient_scope (needs the partner:provision scope) or no_products_assigned
- `409`: Conflict — error is customer_exists_not_owned (retry with link_if_exists=true, or an admin links via /admin/customers/partner-link)
- `422`: Validation Error

---

[API](https://skmtc.dev/servera/apis/servera-developers-api.md) · [All operations](https://skmtc.dev/servera/apis/servera-developers-api/llms.txt) · [OpenAPI document](https://skmtc.dev/servera/apis/servera-developers-api/revisions/a196f94eee59?raw)
