API to update template late fees configuration by template id
PATCH https://services.leadconnectorhq.com/invoices/template/{templateId}/late-fees-configuration
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
templateId
string
default:"6578278e879ad2646715ba9c"
required
Template Id
Body
altId
string
default:"6578278e879ad2646715ba9c"
required
account Id / company Id based on altType
altType
string
default:"account"
required
Alt Type Posibles valores: ‘account’
Respuestas
200 - Successful response
_id
string
default:"6578278e879ad2646715ba9c"
required
Template Id
altId
string
default:"6578278e879ad2646715ba9c"
required
Account Id or Agency Id
Posibles valores: ‘account’
name
string
default:"New Template"
required
Name of the Template
currency
string
default:"USD"
required
Currency
prefix for invoice number
total
number
default:"999"
required
Total Amount
createdAt
string
default:"2023-12-12T09:27:42.355Z"
required
created at
updatedAt
string
default:"2023-12-12T09:27:42.355Z"
required
updated at
{
"_id": "6578278e879ad2646715ba9c",
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Template",
"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"
},
"currency": "USD",
"discount": {
"type": "percentage",
"value": 0
},
"items": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"invoiceNumberPrefix": "INV-",
"total": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
422 - Unprocessable Entity
Ejemplo
curl -X PATCH 'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
const response = await fetch('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);