Create a new Credit Note Line Item Group
curl --request POST \
--url https://eu.sequencehq.com/api/credit-notes/{creditnote}/line-item-groups \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"title": "Users",
"description": "Credit note for users"
}
'import requests
url = "https://eu.sequencehq.com/api/credit-notes/{creditnote}/line-item-groups"
payload = {
"lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"title": "Users",
"description": "Credit note for users"
}
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({
lineItemGroupId: 'af60cab3-812d-4250-a051-0fb7133a00c7',
title: 'Users',
description: 'Credit note for users'
})
};
fetch('https://eu.sequencehq.com/api/credit-notes/{creditnote}/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/credit-notes/{creditnote}/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([
'lineItemGroupId' => 'af60cab3-812d-4250-a051-0fb7133a00c7',
'title' => 'Users',
'description' => 'Credit note for users'
]),
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/credit-notes/{creditnote}/line-item-groups"
payload := strings.NewReader("{\n \"lineItemGroupId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"title\": \"Users\",\n \"description\": \"Credit note for users\"\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/credit-notes/{creditnote}/line-item-groups")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"lineItemGroupId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"title\": \"Users\",\n \"description\": \"Credit note for users\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/credit-notes/{creditnote}/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 \"lineItemGroupId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"title\": \"Users\",\n \"description\": \"Credit note for users\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"title": "Users",
"description": "Credit note for users",
"index": 2,
"netTotal": "51.20",
"totalTax": "2.50",
"grossTotal": "101.23"
}This response has no body data.This response has no body data.This response has no body data.Credit Note Line Items
Create a new Credit Note Line Item Group
Create a new Credit Note Line Item Group
POST
/
credit-notes
/
{creditnote}
/
line-item-groups
Create a new Credit Note Line Item Group
curl --request POST \
--url https://eu.sequencehq.com/api/credit-notes/{creditnote}/line-item-groups \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"title": "Users",
"description": "Credit note for users"
}
'import requests
url = "https://eu.sequencehq.com/api/credit-notes/{creditnote}/line-item-groups"
payload = {
"lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"title": "Users",
"description": "Credit note for users"
}
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({
lineItemGroupId: 'af60cab3-812d-4250-a051-0fb7133a00c7',
title: 'Users',
description: 'Credit note for users'
})
};
fetch('https://eu.sequencehq.com/api/credit-notes/{creditnote}/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/credit-notes/{creditnote}/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([
'lineItemGroupId' => 'af60cab3-812d-4250-a051-0fb7133a00c7',
'title' => 'Users',
'description' => 'Credit note for users'
]),
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/credit-notes/{creditnote}/line-item-groups"
payload := strings.NewReader("{\n \"lineItemGroupId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"title\": \"Users\",\n \"description\": \"Credit note for users\"\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/credit-notes/{creditnote}/line-item-groups")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"lineItemGroupId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"title\": \"Users\",\n \"description\": \"Credit note for users\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/credit-notes/{creditnote}/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 \"lineItemGroupId\": \"af60cab3-812d-4250-a051-0fb7133a00c7\",\n \"title\": \"Users\",\n \"description\": \"Credit note for users\"\n}"
response = http.request(request)
puts response.read_body{
"id": "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
"creditNoteId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"lineItemGroupId": "af60cab3-812d-4250-a051-0fb7133a00c7",
"title": "Users",
"description": "Credit note for users",
"index": 2,
"netTotal": "51.20",
"totalTax": "2.50",
"grossTotal": "101.23"
}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
Available options:
2024-07-30 Path Parameters
The CreditNote ID
Body
application/json
Response
Created
Credit Note Line Item Group ID
Example:
"e5bc0f12-4bc1-f821-bc2d-04639a16f9ec"
Credit Note ID
Example:
"af60cab3-812d-4250-a051-0fb7133a00c7"
Credit Note Line Item Group Title
Example:
"Users"
Index (for maintaining order)
Example:
2
Net total
Example:
"51.20"
Total tax
Example:
"2.50"
Gross total
Example:
"101.23"
Line Item Group ID
Example:
"af60cab3-812d-4250-a051-0fb7133a00c7"
Credit Note Line Item Group Description
Example:
"Credit note for users"