Customer Endpoint

Endpoint

Customers

Customer management with support for multiple addresses.


Overview

OperationMethodEndpointScope
ExportGET/xpanel/xoport/export/json/customerscustomers:read
ImportPOST/xpanel/xoport/import/json/customerscustomers:write
UpdatePUT/xpanel/xoport/import/json/customerscustomers:write
DeleteDELETE/xpanel/xoport/delete/json/customers/{ID}customers:delete

Export (GET)

Query Parameters

ParameterTypeDescription
customers_idint listCustomer IDs, multiple values separated by commas
customers_group_idint listCustomer group(s)
language_idint listAccount language(s)
emailstringEmail address, exact value; multiple values as a comma-separated list
lastnamestringLast name, exact value
companystringCompany, exact value
customers_id_externstringCustomer number in the inventory management system, exact value
email_prefix, lastname_prefix, company_prefixstringStart of the value, e.g., ?lastname_prefix=Mül
purchased_without_account0/10 = customer accounts, 1 = guest orders
last_modifiedpoint in timeAccount changed on or after the given point in time
ordered_sincepoint in timeNew in v2.122.10 Customers with at least one order on or after the given point in time (all orders, including canceled orders and quotes)
sort, orderstringList sorting
limit, offset, pageintPagination

Path forms: /customer/{id}, /customers/{von}:{bis}, /customers/{von}:, and /customers/new:{datum} (account created on or after the date). Since v2.122.10, path forms are paginated in the database, in ascending order of ID; /customers/{von}: is an open range starting from the ID (previously limited to a single customer). Alongside a path form, only ?last_modified= takes effect; other filters return HTTP 400 FILTER_NOT_APPLICABLE.

Changed in v2.122.12: The segment after /customer or /customers is an integer, a range with integer boundaries, or new:{datum} with an unencoded colon. Anything else results in HTTP 400 INVALID_RANGE: up to v2.122.11, /customer/42x returned the customer list with HTTP 200, /customer/4.2 returned customer 4, and /customers/new%3A2026-10-01 returned all customers instead of the new ones. Leading or trailing whitespace in the ID no longer counts: /customer/42%20 and /customer/42%0A are customer 42 (previously the list), just like ?customers_id=42%20. Rules: Export API, section “Path segment”.

Since v2.122.10, points in time are only accepted in fixed formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or YYYY-MM-DD HH:MM:SS, optionally with a time zone (Z or ±HH:MM; send the plus sign as %2B). Invalid values and list values such as ?email[]= return HTTP 400 INVALID_FILTER_VALUE with no data.

Since v2.122.11, a value consisting only of commas in email, lastname, company or customers_id_extern, such as a list inserted empty, results in HTTP 400 INVALID_FILTER_VALUE (“holds no value”). Previously, the filter was dropped and the entire customer base was returned. An empty element between values is still skipped; a completely empty value means “not set”.

Response Fields

  • customers_id, customers_email_address
  • customers_firstname, customers_lastname
  • customers_telephone, customers_fax
  • customers_group_id - Customer group
  • addresses[] - All of the customer's addresses
  • New in v2.122.10 order_stats - Order metrics: orders_count, orders_count_valid, first_order_date, last_order_date, first_valid_order_date, last_valid_order_date. The values marked valid exclude canceled orders and quotes; without an order, the values are 0 or null respectively. Strictly typed integrations must know the field.

Address Fields

  • entry_company, entry_firstname, entry_lastname
  • entry_street_address, entry_postcode, entry_city
  • entry_country_id, entry_zone_id

As of v2.122.1, the export no longer contains password data: customers_password, customers_password_request, customers_password_request_time, and customers_hash have been removed without replacement; in the customer record, iban and bic have also been removed.


Shopping Carts (customers_baskets)

New in v2.122.10

The shopping cart per customer, scope customers:read. This scope thus includes shopping carts and order metrics: Please review the permissions of the clients and your own privacy notice.

EndpointDescription
GET /customers_basketsAll shopping carts, paginated over the customers like /customers; stats.total counts shopping carts
GET /customers_basket/{customers_id}A customer’s shopping cart (also /customers_baskets/{customers_id})
GET /customers_baskets/{von}:{bis}Customer number range

Fields

  • Per customer: customers_id, basket_last_modified, last_activity, last_activity_source, positions_count, and positions[].
  • For each item: products_id, uprid (variant ID), products_model, products_ean, quantity and final_price as text, basket_type, date_added, and attributes[] with the selected attributes.

Filters

  • customer_id and since (shopping cart changed on or after the point in time; without a change marker, accurate to the day via the date added).
  • basket_type: N, B, F, or G; multiple entries as a comma-separated list; an unknown type returns HTTP 400.
  • new:{datum} and {von}: return HTTP 400 INVALID_RANGE; customer_id and since alongside a path ID return HTTP 400 FILTER_NOT_APPLICABLE.

An emptied shopping cart has no row and does not appear. Anyone mirroring the data should therefore run a full comparison regularly.


Import (POST/PUT)

Sample Request

curl -X POST "https://shop.de/xpanel/xoport/import/json/customers" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "customers",
    "data": [{
      "customers_email_address": "max@example.de",
      "customers_firstname": "Max",
      "customers_lastname": "Mustermann",
      "customers_group_id": 1,
      "addresses": [{
        "entry_company": "Musterfirma GmbH",
        "entry_street_address": "Musterstr. 1",
        "entry_postcode": "12345",
        "entry_city": "Musterstadt",
        "entry_country_id": 81
      }]
    }]
  }'

Partially Change Address (PUT)

Corrected in v2.122.2

To modify an existing address, use addresses[] with address_book_id. Only the values specified in the object are written: Missing or null fields remain unchanged, and "" clears a field. The country and zone change only if you include them. A new country without entry_zone_id sets the zone to 0.

curl -X PUT "https://shop.de/xpanel/xoport/import/json/customers" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "customers",
    "data": [{
      "customers_id": 42,
      "addresses": [{
        "address_book_id": 905,
        "entry_street_address": "Neue Straße 99",
        "entry_country": "AT"
      }]
    }]
  }'
Shops prior to v2.122.2: In these cases, an address update without a country would reset the country to the shop’s country (STORE_COUNTRY) and the zone to 0. For these shops, therefore, always include the country as an ISO code in entry_country or as entry_country_id.
  • If the country is unknown, warnings[] reports the warning ADDRESS_COUNTRY. During the update, the stored country remains unchanged; a new address is assigned the shop country.
  • Values that are too long are truncated to the column length based on the number of characters, with the warning ADDRESS_TRUNCATED.
  • If the object contains only _set_default or _set_billing, the default or billing address is set without changing any address fields.

Set the newsletter lock (customers_nl_lock)

New in v2.122.11

curl -X PUT "https://shop.de/xpanel/xoport/import/json/customers" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"type": "customers", "data": [{"customers_id": 42, "customers_nl_lock": 1}]}'
  • Values 0/1, true/false, or "0"/"1" for POST and PUT. The export value can be returned unchanged, even with ?_strict=true. If the field is missing, null or empty, the lock remains unchanged. Any other value results in the warning INVALID_FIELD_VALUE; the field is skipped and the rest of the record is written.
  • 1 works like saving the customer form: after the import, every subscription of the account is unsubscribed, in the shop and at the newsletter provider. As long as the lock applies, POST /newsletter_subscribers rejects the address (NEWSLETTER_LOCKED for clients with customers:read, otherwise NOT_SUBSCRIBABLE). The unsubscription counts as an objection to advertising and remains in place even after 0 (OPTED_OUT): later imports reject the address; a new subscription is only possible through confirmation by the person.
  • ⚠️ In Shop 4.9, the lock does not yet suppress promotional emails from Marketing & Automations (xoMarketing); this comes with Shop 4.10.
  • If the provider fails, the subscription remains, and warnings[] reports NEWSLETTER_UNSUBSCRIBE_FAILED; the lock is saved. Subscriptions linked to the account are unsubscribed by the next newsletter sync; for subscriptions that belong to it only via the email address, send the lock again.
  • 0 only lifts the lock and does not resubscribe anyone.
  • In the CSV Porter (column “customers newsletter lock”) and in the XML customer import (column customers_nl_lock, only with your own XSL), 1 also unsubscribes. Unlike via the API, an empty cell and any other value lift the lock there.
Changed in v2.122.11: Up to v2.122.10, the import reported customers_nl_lock as UNKNOWN_FIELD (HTTP 400 with ?_strict=true), although the export delivered the field. Anyone who now sends back an export with customers_nl_lock = 1 unsubscribes subscriptions; this cannot be undone at the provider. The unsubscriptions run within the request itself, one per address: split large batches with many locked accounts into smaller ones. If you only want to unsubscribe subscribers, you do not need the lock: DELETE /newsletter_subscribers is sufficient.

Customer Discounts (discounts[])

New in v2.57.0

Use the discounts[] field to manage the customer’s discounts (the “Discounts” field in Customer Management, table customers_discount). A discount line means: x% discount on category N.

Sample Request

curl -X PUT "https://shop.de/xpanel/xoport/import/json/customers" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "customers",
    "data": [{
      "customers_id_extern": "20050",
      "discounts": [
        {"category_id": 0, "value": 10},
        {"category_id": 22, "value": "12,5", "subcategories": 0, "special": 1}
      ]
    }]
  }'

Fields per discount line

FieldTypeDefaultDescription
category_idint–Category ID; 0 = top level – together with subcategories=1, the discount applies to the entire product range
valuedecimalRequiredPercentage value; decimal comma allowed. Values > 100 are capped at 100; values ≤ 0 are skipped
subcategories0/11Discount also applies to subcategories
qpb0/10Discount also applies to tiered pricing
option0/10Discount also applies to attribute surcharges
special0/10Discount also applies to special offers

Replace-on-present semantics

  • discounts present with entries → the customer’s entire list of discounts is replaced
  • "discounts": [] (empty) → all of the customer’s discounts are removed
  • Field missing → discounts remain unchanged (existing integrations change nothing)

The customer’s internal activation flag is automatically updated—the discounts take effect immediately in the shop. The same semantics also apply to the XML customer import (<discounts> node).

Export: The Customers export (GET) returns discounts as raw lines—round-trip capable.


WaWi Addressing

New in v2.57.0

  • customers_id_extern (WaWi customer number) and customers_group_id are now writable in the JSON import; customers_group_id is validated against existing customer groups.
  • PUT can now address the customer even without an email address via customers_id or customers_id_extern (pure discount/master data maintenance). customers_id_extern must be unique.
  • POST still requires an email address and a physical address.

Delete (DELETE)

The customer is addressed by their ID in the path: DELETE /xpanel/xoport/delete/json/customers/{ID}. Without an ID, for example with ?customers_id=, the API responds with HTTP 400 MISSING_ID.

curl -X DELETE "https://shop.de/xpanel/xoport/delete/json/customers/123" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Note: GDPR-relevant data! Please observe retention periods for orders.

Since v2.122.8, the shop anonymizes the customer’s product viewing history before deletion.