Customerscustomers
/api/v1/imports/customersUpsert: re-sending the same external_id updates the existing row.
Endpoints
- validatePOST /api/v1/imports/customers/validate
- importPOST /api/v1/imports/customers
- feedGET /api/v1/imports/customers/records
- read_backGET /api/v1/imports/customers/records/{external_id}
A new row must carry
name
Fields(16)
external_idstringsource primary key → ExternalReference
namestringrequiredPIIcustomer_typeenumOne of:
individualcorporateemailemailPIIphonephonePIIlegal_namestringtax_numbertax_numbertax_officestringaddress_linestringPIIaddress_districtstringPIIaddress_citystringPIIaddress_statestringPIIaddress_zipstringPIIpreferred_currencycurrencycodestringnotesstringPIIfree text; imported as a customer note
Reading it back
Once the agency works the record (confirms it, numbers the tickets, invoices it) this is what GET /api/v1/imports/{entity}/records/{external_id} answers, and what every webhook delivers. detail carries what only the agency can add after your push.
{
"entity": "customers",
"external_id": "CUSTOMER-1001",
"source_system": "crm",
"type": "Customer",
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"created_at": "2026-03-14T09:30:00Z",
"updated_at": "2026-03-15T11:05:00Z",
"invoices": [
{
"id": "4b8e1f60-7c2d-4e9a-b3f5-0a6d2c9e8b71",
"number": "LYD2026000000117",
"status": "issued",
"currency": "EUR",
"total": "1250.0",
"balance": "1250.0"
}
]
}Request · dry run, every field
curl -X POST 'https://YOUR-CELL.lydira.com/api/v1/imports/customers/validate' \
-H 'Authorization: Bearer sek_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 8f14e45f-ea2c-4f33-9a3b-6d0c1b7e5a90' \
-d '{
"source_system": "crm",
"rows": [
{
"external_id": "CUSTOMER-1001",
"name": "Ada Lovelace",
"customer_type": "individual",
"email": "ada@example.com",
"phone": "+905551112233",
"legal_name": "Lovelace Seyahat A.Ş.",
"tax_number": "1234567890",
"tax_office": "Beşiktaş",
"address_line": "Nispetiye Cad. No:12",
"address_district": "Beşiktaş",
"address_city": "İstanbul",
"address_state": "",
"address_zip": "34340",
"preferred_currency": "EUR",
"code": "AC-1001",
"notes": "Imported from the source system."
}
]
}'{
"import": {
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"entity": "customers",
"source_system": "crm",
"status": "ready",
"company_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"stats": {
"total": 1,
"will_create": 1,
"will_update": 0,
"created": 0,
"updated": 0,
"skipped": 0,
"invalid": 0,
"failed": 0,
"not_selected": 0
},
"error": null,
"created_at": "2026-03-14T09:30:00Z",
"links": {
"self": "/api/v1/imports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"rows": "/api/v1/imports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18/rows"
},
"mode": "validate",
"async": false,
"on_conflict": "skip",
"pricing": "apply_rules"
},
"ignored_fields": [],
"results": [
{
"row": 1,
"external_id": "CUSTOMER-1001",
"status": "will_create"
}
]
}