Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt

Use this file to discover all available pages before exploring further.

API to send invoice by invoice id
POST https://services.leadconnectorhq.com/invoices/{invoiceId}/send

Autorizacion

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

Path parameters

invoiceId
string
default:"6578278e879ad2646715ba9c"
required
Invoice Id

Body

altId
string
default:"6578278e879ad2646715ba9c"
required
account Id / company Id based on altType
altType
string
default:"account"
required
Alt Type Posibles valores: ‘account’
userId
string
default:"6578278e879ad2646715ba9c"
required
Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this account. This account will serve as the primary channel for all future communications and updates.
action
string
required
Posibles valores: ‘sms_and_email’, ‘send_manually’, ‘email’, ‘sms’
liveMode
boolean
required
sentFrom
object
sender details for invoice, valid only if invoice is not sent manually
autoPayment
object
auto-payment configuration

Respuestas

invoice
object
required
smsData
object
required
emailData
object
required
{
  "invoice": {
    "_id": "6578278e879ad2646715ba9c",
    "status": "draft",
    "liveMode": false,
    "amountPaid": 0,
    "altId": "6578278e879ad2646715ba9c",
    "altType": "account",
    "name": "New Invoice",
    "businessDetails": {
      "name": "Alex",
      "address": {
        "addressLine1": "9931 Beechwood",
        "city": "St. Houston",
        "state": "TX",
        "countryCode": "USA",
        "postalCode": "559-6993"
      },
      "phoneNo": "+1-214-559-6993",
      "website": "www.example.com"
    },
    "invoiceNumber": "19",
    "currency": "USD",
    "contactDetails": {
      "id": "c6tZZU0rJBf30ZXx9Gli",
      "phoneNo": "+1-214-559-6993",
      "email": "alex@example.com",
      "customFields": [],
      "name": "Alex",
      "address": {
        "countryCode": "US"
      }
    },
    "issueDate": "2023-01-01",
    "dueDate": "2023-01-01",
    "discount": {
      "type": "percentage",
      "value": 0
    },
  // truncado: 24 lineas mas
}
{}
{}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/send' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "altId": "6578278e879ad2646715ba9c",
  "altType": "account",
  "userId": "6578278e879ad2646715ba9c",
  "action": "sms_and_email",
  "liveMode": true
}'