Lydira API
EN

Aktarım yolları

Cari, tedarikçi ve potansiyel

Rezervasyonlarınızın işaret ettiği kişi ve şirketler. Önce bunları aktarın.

Cariler, tedarikçiler ve potansiyeller rezervasyonlarınızın işaret ettiği kayıtlardır, bu yüzden önce onlar gelir. Aynısını yeniden göndermek kopya açmaz, kaydı günceller.

Bu sayfada

Şu kapsamlardan birini taşıyan anahtar erişir:importimport_issue

Müşterilercustomers

POST/api/v1/imports/customers

Upsert: aynı external_id ile tekrar gönderim mevcut satırı günceller.

Uç noktalar

  • 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}

Yeni bir satırda bulunmalı

name

Alanlar(16)
  • external_idstring

    source primary key → ExternalReference

  • namestringzorunluPII
  • customer_typeenum

    Şunlardan biri:individualcorporate

  • emailemailPII
  • phonephonePII
  • legal_namestring
  • tax_numbertax_number
  • tax_officestring
  • address_linestringPII
  • address_districtstringPII
  • address_citystringPII
  • address_statestringPII
  • address_zipstringPII
  • preferred_currencycurrency
  • codestring
  • notesstringPII

    free text; imported as a customer note

Geri okuma

Acente kaydı işledikten sonra (onaylar, biletleri numaralar, faturalar) GET /api/v1/imports/{entity}/records/{external_id} bunu döner; her webhook da aynı gövdeyi taşır. detail, gönderiminizden sonra yalnız acentenin ekleyebildiği bilgileri taşır.

GET /api/v1/imports/customers/records/CUSTOMER-1001
200
{
  "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"
    }
  ]
}

İstek · deneme, tüm alanlar

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."
    }
  ]
}'
Yanıt
200
{
  "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"
    }
  ]
}

Tedarikçilersuppliers

POST/api/v1/imports/suppliers

Upsert: aynı external_id ile tekrar gönderim mevcut satırı günceller.

Uç noktalar

  • validatePOST /api/v1/imports/suppliers/validate
  • importPOST /api/v1/imports/suppliers
  • feedGET /api/v1/imports/suppliers/records
  • read_backGET /api/v1/imports/suppliers/records/{external_id}

Yeni bir satırda bulunmalı

name

Alanlar(16)
  • external_idstring
  • namestringzorunlu
  • supplier_typeenum

    integer-backed enum — resolved against TravelSupplier.supplier_types

    Şunlardan biri:otherairlinehoteldmccruisetour_operatorinsuranceactivitytransferrailcar_rentalconsolidatorgdsvisacharteragencycateringtechnicalproductiondecorationvenuephoto_videoentertainmentsecuritystaffingbus

  • codestring
  • iata_codestring
  • emailemail
  • phonephone
  • country_codestring
  • tax_numbertax_number
  • tax_officestring
  • address_linestringPII
  • address_districtstringPII
  • address_citystringPII
  • address_statestringPII
  • address_zipstringPII
  • websitestring

Geri okuma

Acente kaydı işledikten sonra (onaylar, biletleri numaralar, faturalar) GET /api/v1/imports/{entity}/records/{external_id} bunu döner; her webhook da aynı gövdeyi taşır. detail, gönderiminizden sonra yalnız acentenin ekleyebildiği bilgileri taşır.

GET /api/v1/imports/suppliers/records/SUPPLIER-1001
200
{
  "entity": "suppliers",
  "external_id": "SUPPLIER-1001",
  "source_system": "crm",
  "type": "TravelSupplier",
  "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
  "created_at": "2026-03-14T09:30:00Z",
  "updated_at": "2026-03-15T11:05:00Z"
}

İstek · deneme, tüm alanlar

curl -X POST 'https://YOUR-CELL.lydira.com/api/v1/imports/suppliers/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": "SUPPLIER-1001",
      "name": "Ada Lovelace",
      "supplier_type": "hotel",
      "code": "AC-1001",
      "iata_code": "TK",
      "email": "ada@example.com",
      "phone": "+905551112233",
      "country_code": "TR",
      "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",
      "website": "https://example.com"
    }
  ]
}'
Yanıt
200
{
  "import": {
    "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
    "entity": "suppliers",
    "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": "SUPPLIER-1001",
      "status": "will_create"
    }
  ]
}

Müşteri adaylarıleads

POST/api/v1/imports/leads

Upsert: aynı external_id ile tekrar gönderim mevcut satırı günceller.

Uç noktalar

  • validatePOST /api/v1/imports/leads/validate
  • importPOST /api/v1/imports/leads
  • feedGET /api/v1/imports/leads/records
  • read_backGET /api/v1/imports/leads/records/{external_id}

Yeni bir satırda bulunmalı

name

Alanlar(12)
  • external_idstring
  • namestringzorunluPII
  • emailemailPII
  • phonephonePII
  • stageenum

    Şunlardan biri:inboxqualifiednurturingproposalwonlost

  • sourcetaxonomy

    Hesabınızın lead_source listesi; başlangıç değerleri:website_formreferralwalk_ininbound_emailphonesocial_mediapartnervoice_capturebusiness_cardother

  • estimated_valuemoney
  • currencycurrency
  • party_sizeinteger
  • destinationsstring
  • customer_external_idreference

    links to an imported customer

  • notesstringPII

Referanslar

  • customer_external_id → customers · eşleşme external_id, email · bulunamazsa skip

Geri okuma

Acente kaydı işledikten sonra (onaylar, biletleri numaralar, faturalar) GET /api/v1/imports/{entity}/records/{external_id} bunu döner; her webhook da aynı gövdeyi taşır. detail, gönderiminizden sonra yalnız acentenin ekleyebildiği bilgileri taşır.

GET /api/v1/imports/leads/records/LEAD-1001
200
{
  "entity": "leads",
  "external_id": "LEAD-1001",
  "source_system": "crm",
  "type": "Lead",
  "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
  "created_at": "2026-03-14T09:30:00Z",
  "updated_at": "2026-03-15T11:05:00Z",
  "currency": "EUR"
}

İstek · deneme, tüm alanlar

curl -X POST 'https://YOUR-CELL.lydira.com/api/v1/imports/leads/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": "LEAD-1001",
      "name": "Ada Lovelace",
      "email": "ada@example.com",
      "phone": "+905551112233",
      "stage": "inbox",
      "source": "website_form",
      "estimated_value": "1250.00",
      "currency": "EUR",
      "party_size": 2,
      "destinations": "Roma, Floransa",
      "customer_external_id": "CUSTOMER-1001",
      "notes": "Imported from the source system."
    }
  ]
}'
Yanıt
200
{
  "import": {
    "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
    "entity": "leads",
    "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": "LEAD-1001",
      "status": "will_create"
    }
  ]
}

Akış

  1. Deneyin. POST …/validate aynı yolu koşar ve hiçbir şey yazmaz.
  2. Gönderin. Aynı gövde, /validate olmadan. Bozuk satır tek başına düşer ve alanını söyler.
  3. Geri okuyun. GET /api/v1/imports/{entity}/records/{external_id} kendi kimliğinizle cevap verir.
  4. Dinleyin. Acente kaydı değiştirdiğinde webhook haber verir.

Kurallar →Webhook'lar →