curl --request PUT \
--url https://dev.seqhq.io/api/invoices/{invoice}/line-items/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Ferraris",
"description": "Red",
"quantity": "2",
"rate": "20000.10",
"taxRate": "0.2",
"servicePeriodStart": "2022-10-20T00:00:00Z",
"servicePeriodEnd": "2022-10-24T00:00:00Z",
"servicePeriod": {
"startDate": "2022-10-20",
"endDate": "2022-10-24"
},
"groupId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"rateDisplay": "ABSOLUTE",
"externalIds": [
{
"key": "Xero",
"value": "123"
}
],
"revenueClassification": "EARNED",
"creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"revenueRecognitionMethod": "STRAIGHT_LINE"
}
'{
"id": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"title": "Ferraris",
"description": "Red",
"quantity": "2",
"rate": "20000.10",
"taxRate": "0.2",
"servicePeriodStart": "2022-10-20T00:00:00Z",
"servicePeriodEnd": "2022-10-24T00:00:00Z",
"servicePeriod": {
"startDate": "2022-10-20",
"endDate": "2022-10-24"
},
"index": 2,
"groupId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"netTotal": "51.20",
"totalTax": "2.50",
"grossTotal": "101.23",
"priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"rateDisplay": "ABSOLUTE",
"externalIds": [
{
"key": "Xero",
"value": "123"
}
],
"revenueClassification": "EARNED",
"creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
"revenueRecognitionMethod": "USAGE"
}Update a line item on an invoice
curl --request PUT \
--url https://dev.seqhq.io/api/invoices/{invoice}/line-items/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Ferraris",
"description": "Red",
"quantity": "2",
"rate": "20000.10",
"taxRate": "0.2",
"servicePeriodStart": "2022-10-20T00:00:00Z",
"servicePeriodEnd": "2022-10-24T00:00:00Z",
"servicePeriod": {
"startDate": "2022-10-20",
"endDate": "2022-10-24"
},
"groupId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"rateDisplay": "ABSOLUTE",
"externalIds": [
{
"key": "Xero",
"value": "123"
}
],
"revenueClassification": "EARNED",
"creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"revenueRecognitionMethod": "STRAIGHT_LINE"
}
'{
"id": "af60cab3-812d-4250-a051-0fb7133a00c7",
"invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"title": "Ferraris",
"description": "Red",
"quantity": "2",
"rate": "20000.10",
"taxRate": "0.2",
"servicePeriodStart": "2022-10-20T00:00:00Z",
"servicePeriodEnd": "2022-10-24T00:00:00Z",
"servicePeriod": {
"startDate": "2022-10-20",
"endDate": "2022-10-24"
},
"index": 2,
"groupId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"netTotal": "51.20",
"totalTax": "2.50",
"grossTotal": "101.23",
"priceId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"rateDisplay": "ABSOLUTE",
"externalIds": [
{
"key": "Xero",
"value": "123"
}
],
"revenueClassification": "EARNED",
"creditGrantId": "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
"productId": "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
"revenueRecognitionMethod": "USAGE"
}Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
2024-07-30 Item Title
"Ferraris"
Quantity
"2"
Price per Item
"20000.10"
Tax Rate
"0.2"
IDs in external integrations
Show child attributes
[{ "key": "Xero", "value": "123" }]Item Description
"Red"
Start of the service period (the time period in which the service was provided)
"2022-10-20T00:00:00Z"
End of the service period (the time period in which the service was provided)
"2022-10-24T00:00:00Z"
Service Period
Show child attributes
{
"startDate": "2022-10-20",
"endDate": "2022-10-24"
}Line Item Group ID
"cd11218d-fa00-4faa-8684-a43113d076a8"
Price ID
"fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
Determines whether rate is displayed as an absolute value or percentage
ABSOLUTE, PERCENTAGE "ABSOLUTE"
Revenue classification
PREPAYMENT, EARNED, BURNDOWN "EARNED"
Credit Grant ID
"fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
Revenue recognition method
STRAIGHT_LINE, USAGE, MILESTONE, POINT_IN_TIME "STRAIGHT_LINE"
OK
Line Item ID
"af60cab3-812d-4250-a051-0fb7133a00c7"
Invoice ID
"cd11218d-fa00-4faa-8684-a43113d076a8"
Item Title
"Ferraris"
Quantity
"2"
Price per Item
"20000.10"
Tax Rate
"0.2"
Index (for maintaining order)
2
Net total, in decimal format of the Invoice's currency
"51.20"
Total tax, in decimal format of the Invoice's currency
"2.50"
Gross total, in decimal format of the Invoice's currency
"101.23"
Determines whether rate is displayed as an absolute value or percentage
ABSOLUTE, PERCENTAGE "ABSOLUTE"
IDs in external integrations
Show child attributes
[{ "key": "Xero", "value": "123" }]Item Description
"Red"
Start of the service period (the time period in which the service was provided)
"2022-10-20T00:00:00Z"
End of the service period (the time period in which the service was provided)
"2022-10-24T00:00:00Z"
Service Period
Show child attributes
{
"startDate": "2022-10-20",
"endDate": "2022-10-24"
}Line Item Group ID
"cd11218d-fa00-4faa-8684-a43113d076a8"
Price ID
"fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
Revenue classification
PREPAYMENT, EARNED, BURNDOWN "EARNED"
Credit Grant ID
"fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
Product ID
"dd55bf30-3b97-4644-a9fc-b15e0f59a110"
Revenue recognition method
STRAIGHT_LINE, USAGE, MILESTONE, POINT_IN_TIME "STRAIGHT_LINE"