Customer Endpoint
Customers
Customer management with support for multiple addresses.
Overview
| Operation | Method | Endpoint | Scope |
|---|---|---|---|
| Export | GET | /xpanel/xoport/export/json/customers | customers:read |
| Import | POST | /xpanel/xoport/import/json/customers | customers:write |
| Update | PUT | /xpanel/xoport/import/json/customers | customers:write |
| Delete | DELETE | /xpanel/xoport/delete/json/customers/{ID} | customers:delete |
Export (GET)
Query Parameters
| Parameter | Type | Description |
|---|---|---|
customers_id | int list | Customer IDs, multiple values separated by commas |
customers_group_id | int list | Customer group(s) |
language_id | int list | Account language(s) |
email | string | Email address, exact value; multiple values as a comma-separated list |
lastname | string | Last name, exact value |
company | string | Company, exact value |
customers_id_extern | string | Customer number in the inventory management system, exact value |
email_prefix, lastname_prefix, company_prefix | string | Start of the value, e.g., ?lastname_prefix=Mül |
purchased_without_account | 0/1 | 0 = customer accounts, 1 = guest orders |
last_modified | point in time | Account changed on or after the given point in time |
ordered_since | point in time | New 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, order | string | List sorting |
limit, offset, page | int | Pagination |
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.
/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_addresscustomers_firstname,customers_lastnamecustomers_telephone,customers_faxcustomers_group_id- Customer groupaddresses[]- 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 markedvalidexclude canceled orders and quotes; without an order, the values are 0 ornullrespectively. Strictly typed integrations must know the field.
Address Fields
entry_company,entry_firstname,entry_lastnameentry_street_address,entry_postcode,entry_cityentry_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.
| Endpoint | Description |
|---|---|
GET /customers_baskets | All 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, andpositions[]. - For each item:
products_id,uprid(variant ID),products_model,products_ean,quantityandfinal_priceas text,basket_type,date_added, andattributes[]with the selected attributes.
Filters
customer_idandsince(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, orG; multiple entries as a comma-separated list; an unknown type returns HTTP 400.new:{datum}and{von}:return HTTP 400INVALID_RANGE;customer_idandsincealongside a path ID return HTTP 400FILTER_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"
}]
}]
}'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 warningADDRESS_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_defaultor_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"forPOSTandPUT. The export value can be returned unchanged, even with?_strict=true. If the field is missing,nullor empty, the lock remains unchanged. Any other value results in the warningINVALID_FIELD_VALUE; the field is skipped and the rest of the record is written. 1works 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_subscribersrejects the address (NEWSLETTER_LOCKEDfor clients withcustomers:read, otherwiseNOT_SUBSCRIBABLE). The unsubscription counts as an objection to advertising and remains in place even after0(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[]reportsNEWSLETTER_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. 0only 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),1also unsubscribes. Unlike via the API, an empty cell and any other value lift the lock there.
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
| Field | Type | Default | Description |
|---|---|---|---|
category_id | int | – | Category ID; 0 = top level – together with subcategories=1, the discount applies to the entire product range |
value | decimal | Required | Percentage value; decimal comma allowed. Values > 100 are capped at 100; values ≤ 0 are skipped |
subcategories | 0/1 | 1 | Discount also applies to subcategories |
qpb | 0/1 | 0 | Discount also applies to tiered pricing |
option | 0/1 | 0 | Discount also applies to attribute surcharges |
special | 0/1 | 0 | Discount also applies to special offers |
Replace-on-present semantics
discountspresent 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) andcustomers_group_idare now writable in the JSON import;customers_group_idis validated against existing customer groups.- PUT can now address the customer even without an email address via
customers_idorcustomers_id_extern(pure discount/master data maintenance).customers_id_externmust 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.