Salt la conținut
Documentație

Caută în documentație

    English

    Întrebări și citări

    Urmărește un răspuns până la pasajul pe care se bazează.

    Pe această pagină

    Alege colecția

    Alege sales pentru materiale de vânzări sau contracts pentru documentele contractuale. Cu all cauți în ambele colecții, în limitele accesului tău. Câmpul language stabilește limba răspunsului: răspunsul, title și passage vin în limba aleasă.

    curl

    curl -X POST "$RDC_BASE_URL/ai/v1/conversations" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "question": "What payment term did we agree with Hanul Ozana?",
      "scope": "all",
      "language": "en",
      "operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
      "expectedRevision": 0,
      "conversationId": "review-1042"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/conversations`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "question": "What payment term did we agree with Hanul Ozana?",
        "scope": "all",
        "language": "en",
        "operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
        "expectedRevision": 0,
        "conversationId": "review-1042"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/ai/v1/conversations',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'question': 'What payment term did we agree with Hanul Ozana?',
            'scope': 'all',
            'language': 'en',
            'operationId': '86c4fe37-99d4-4bfc-a8f1-347afc902a56',
            'expectedRevision': 0,
            'conversationId': 'review-1042',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "question": "What payment term did we agree with Hanul Ozana?",
      "scope": "all",
      "language": "en",
      "operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
      "expectedRevision": 0,
      "conversationId": "review-1042"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/conversations');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/conversations");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "question": "What payment term did we agree with Hanul Ozana?",
      "scope": "all",
      "language": "en",
      "operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
      "expectedRevision": 0,
      "conversationId": "review-1042"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Răspuns 202

    {
      "operationId": "86c4fe37-99d4-4bfc-a8f1-347afc902a56",
      "status": "accepted",
      "aggregateRevision": 1
    }

    curl

    curl "$RDC_BASE_URL/ai/v1/conversations/review-1042" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/ai/v1/conversations/review-1042`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/ai/v1/conversations/review-1042',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/ai/v1/conversations/review-1042');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/ai/v1/conversations/review-1042");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Răspuns 200

    {
      "id": "review-1042",
      "revision": 1,
      "status": "answered",
      "answer": "Hanul Ozana pays by bank transfer at the end of the month after delivery. [1] Clause 6.2 of the contract sets the last day of the month after delivery as the due date. [2] On orders delivered in parts, the period starts with the last delivery. [3]",
      "citations": [
        {
          "id": "account",
          "system": "CRM",
          "title": "Hanul Ozana account notes",
          "owner": "Andrei Pop",
          "changed": "2026-11-17T15:40:00Z",
          "path": "/sales/hanul-ozana",
          "scope": "sales",
          "passage": "Hanul Ozana pays by bank transfer at the end of the month after delivery.",
          "number": 1,
          "canRead": true
        },
        {
          "id": "contract",
          "system": "DMS",
          "title": "Payment terms",
          "owner": "Ioana Marin",
          "changed": "2026-09-03T10:30:00Z",
          "path": "/contracts/payment",
          "scope": "contracts",
          "passage": "Clause 6.2 of the contract sets the last day of the month after delivery as the due date.",
          "number": 2,
          "canRead": true
        },
        {
          "id": "annex",
          "system": "DMS",
          "title": "Payment annex",
          "owner": "Ana Rusu",
          "changed": "2026-10-21T13:10:00Z",
          "path": "/contracts/payment-annex",
          "scope": "contracts",
          "passage": "On orders delivered in parts, the period starts with the last delivery.",
          "number": 3,
          "canRead": true
        }
      ],
      "hiddenCount": 0
    }

    Verifică pasajul

    Asociază fiecare număr din paranteze drepte cu citations[].number. Când verifici răspunsul, verifică titlul, responsabilul, calea, data modificării și pasajul citat. Distribuie răspunsul doar persoanelor care pot citi documentele citate.