Skip to main content
List documents for a account
GET https://services.leadconnectorhq.com/proposals/document

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Query parameters

locationId
string
default:"hTlkh7t8gujsahgg93"
required
Account Id
status
string
default:"draft"
Document status, pass as comma separated values
paymentStatus
string
default:"paid"
Payment status, pass as comma separated values
limit
number
default:"10"
Limit to fetch number of records
skip
number
default:"0"
Skip number of records
query
string
default:"document"
Search string
dateFrom
string
default:"2025-02-03T18:30:00.000Z"
Date start from (ISO 8601), dateFrom & DateTo must be provided together
dateTo
string
default:"2025-02-14T18:29:59.999Z"
Date to (ISO 8601), dateFrom & DateTo must be provided together

Respuestas

documents
object[]
required
List of documents
total
number
default:"10"
required
Total records available
whiteLabelBaseUrl
number
default:"https://example.com"
WhiteLabel url for document
whiteLabelBaseUrlForInvoice
number
default:"https://example.com"
WhiteLabel url for invoice
{
  "documents": [
    {
      "locationId": "hTlkh7t8gujsahgg93",
      "documentId": "hTlkh7t8gujsahgg93",
      "_id": "67ac9a51106ee8311e911XXXX",
      "name": "Document Name",
      "type": "proposal",
      "deleted": false,
      "isExpired": false,
      "documentRevision": 1,
      "fillableFields": [
        {}
      ],
      "locale": "en-US",
      "status": "draft",
      "paymentStatus": "paid",
      "recipients": [
        {
          "id": "u240JcS0E5qE0ziHnwMm",
          "email": "jim@gmail.com",
          "imageUrl": "",
          "contactName": "Jim Anton",
          "firstName": "Jim",
          "lastName": "Anton",
          "role": "signer",
          "hasCompleted": true,
          "signingOrder": 1,
          "imgUrl": "base64 image url",
          "ip": "123.123.123.123"
        }
      ],
      "links": [
        {}
      ],
      "updatedAt": "2025-02-03T18:30:00.000Z",
      "createdAt": "2025-02-14T18:29:59.999Z"
    }
  ],
  // truncado: 4 lineas mas
}
statusCode
number
default:"400"
message
string
default:"Bad Request"
{
  "statusCode": 400,
  "message": "Bad Request"
}

Ejemplo

curl -X GET 'https://services.leadconnectorhq.com/proposals/document' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/proposals/document', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
  },
});
const data = await response.json();
import os, requests
response = requests.request(
    'GET',
    'https://services.leadconnectorhq.com/proposals/document',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/proposals/document');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
    ],
]);
$data = json_decode(curl_exec($ch), true);