curl --request POST \
--url https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Users",
"description": "Charges for users",
"taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610",
"revenueRecognitionMethod": "STRAIGHT_LINE",
"revenueClassification": "EARNED",
"servicePeriod": {
"start": "2022-10-20",
"endInclusive": "2022-10-24"
}
}
'import requests
url = "https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups"
payload = {
"title": "Users",
"description": "Charges for users",
"taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610",
"revenueRecognitionMethod": "STRAIGHT_LINE",
"revenueClassification": "EARNED",
"servicePeriod": {
"start": "2022-10-20",
"endInclusive": "2022-10-24"
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Users',
description: 'Charges for users',
taxCategoryId: '28227c88-6dba-455f-9b30-b9c76957e610',
revenueRecognitionMethod: 'STRAIGHT_LINE',
revenueClassification: 'EARNED',
servicePeriod: {start: '2022-10-20', endInclusive: '2022-10-24'}
})
};
fetch('https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Users',
'description' => 'Charges for users',
'taxCategoryId' => '28227c88-6dba-455f-9b30-b9c76957e610',
'revenueRecognitionMethod' => 'STRAIGHT_LINE',
'revenueClassification' => 'EARNED',
'servicePeriod' => [
'start' => '2022-10-20',
'endInclusive' => '2022-10-24'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups"
payload := strings.NewReader("{\n \"title\": \"Users\",\n \"description\": \"Charges for users\",\n \"taxCategoryId\": \"28227c88-6dba-455f-9b30-b9c76957e610\",\n \"revenueRecognitionMethod\": \"STRAIGHT_LINE\",\n \"revenueClassification\": \"EARNED\",\n \"servicePeriod\": {\n \"start\": \"2022-10-20\",\n \"endInclusive\": \"2022-10-24\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Users\",\n \"description\": \"Charges for users\",\n \"taxCategoryId\": \"28227c88-6dba-455f-9b30-b9c76957e610\",\n \"revenueRecognitionMethod\": \"STRAIGHT_LINE\",\n \"revenueClassification\": \"EARNED\",\n \"servicePeriod\": {\n \"start\": \"2022-10-20\",\n \"endInclusive\": \"2022-10-24\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Users\",\n \"description\": \"Charges for users\",\n \"taxCategoryId\": \"28227c88-6dba-455f-9b30-b9c76957e610\",\n \"revenueRecognitionMethod\": \"STRAIGHT_LINE\",\n \"revenueClassification\": \"EARNED\",\n \"servicePeriod\": {\n \"start\": \"2022-10-20\",\n \"endInclusive\": \"2022-10-24\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "941272d1-f840-4e16-b698-0cd455c81e0e",
"invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"title": "Cars",
"description": "Charges for cars",
"index": 1,
"netTotal": "200000",
"totalTax": "10",
"grossTotal": "22000",
"taxCategory": {
"id": "28227c88-6dba-455f-9b30-b9c76957e610",
"name": "VAT"
}
}This response has no body data.This response has no body data.This response has no body data.Create a new Line Item Group
Create a new Line Item Group
curl --request POST \
--url https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Users",
"description": "Charges for users",
"taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610",
"revenueRecognitionMethod": "STRAIGHT_LINE",
"revenueClassification": "EARNED",
"servicePeriod": {
"start": "2022-10-20",
"endInclusive": "2022-10-24"
}
}
'import requests
url = "https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups"
payload = {
"title": "Users",
"description": "Charges for users",
"taxCategoryId": "28227c88-6dba-455f-9b30-b9c76957e610",
"revenueRecognitionMethod": "STRAIGHT_LINE",
"revenueClassification": "EARNED",
"servicePeriod": {
"start": "2022-10-20",
"endInclusive": "2022-10-24"
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Users',
description: 'Charges for users',
taxCategoryId: '28227c88-6dba-455f-9b30-b9c76957e610',
revenueRecognitionMethod: 'STRAIGHT_LINE',
revenueClassification: 'EARNED',
servicePeriod: {start: '2022-10-20', endInclusive: '2022-10-24'}
})
};
fetch('https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Users',
'description' => 'Charges for users',
'taxCategoryId' => '28227c88-6dba-455f-9b30-b9c76957e610',
'revenueRecognitionMethod' => 'STRAIGHT_LINE',
'revenueClassification' => 'EARNED',
'servicePeriod' => [
'start' => '2022-10-20',
'endInclusive' => '2022-10-24'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups"
payload := strings.NewReader("{\n \"title\": \"Users\",\n \"description\": \"Charges for users\",\n \"taxCategoryId\": \"28227c88-6dba-455f-9b30-b9c76957e610\",\n \"revenueRecognitionMethod\": \"STRAIGHT_LINE\",\n \"revenueClassification\": \"EARNED\",\n \"servicePeriod\": {\n \"start\": \"2022-10-20\",\n \"endInclusive\": \"2022-10-24\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Users\",\n \"description\": \"Charges for users\",\n \"taxCategoryId\": \"28227c88-6dba-455f-9b30-b9c76957e610\",\n \"revenueRecognitionMethod\": \"STRAIGHT_LINE\",\n \"revenueClassification\": \"EARNED\",\n \"servicePeriod\": {\n \"start\": \"2022-10-20\",\n \"endInclusive\": \"2022-10-24\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/invoices/{invoice}/line-item-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Users\",\n \"description\": \"Charges for users\",\n \"taxCategoryId\": \"28227c88-6dba-455f-9b30-b9c76957e610\",\n \"revenueRecognitionMethod\": \"STRAIGHT_LINE\",\n \"revenueClassification\": \"EARNED\",\n \"servicePeriod\": {\n \"start\": \"2022-10-20\",\n \"endInclusive\": \"2022-10-24\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "941272d1-f840-4e16-b698-0cd455c81e0e",
"invoiceId": "cd11218d-fa00-4faa-8684-a43113d076a8",
"title": "Cars",
"description": "Charges for cars",
"index": 1,
"netTotal": "200000",
"totalTax": "10",
"grossTotal": "22000",
"taxCategory": {
"id": "28227c88-6dba-455f-9b30-b9c76957e610",
"name": "VAT"
}
}This response has no body data.This response has no body data.This response has no body data.Headers
Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
2024-07-30 Path Parameters
The Invoice ID
Body
Line Item Group Title
"Users"
Line Item Group Description
"Charges for users"
The tax category for all line items in this line item group
"28227c88-6dba-455f-9b30-b9c76957e610"
The revenue recognition method for all line items in this line item group
STRAIGHT_LINE, USAGE, MILESTONE, POINT_IN_TIME "USAGE"
The revenue classification for all line items in this line item group
PREPAYMENT, EARNED, BURNDOWN "EARNED"
Billing period
Show child attributes
Show child attributes
{
"start": "2022-10-01",
"endInclusive": "2022-10-30"
}
Response
Created
Line Item Group ID
"941272d1-f840-4e16-b698-0cd455c81e0e"
Invoice ID
"cd11218d-fa00-4faa-8684-a43113d076a8"
Line Item Group Title
"Cars"
Index (for maintaining order)
1
Net total, in decimal format of the Invoice's currency
"200000"
Total tax, in decimal format of the Invoice's currency
"10"
Gross total, in decimal format of the Invoice's currency
"22000"
Line Item Group Description
"Charges for cars"
The tax category for all line items in this line item group
Show child attributes
Show child attributes
{
"id": "28227c88-6dba-455f-9b30-b9c76957e610",
"name": "VAT"
}