Set the default series of an invoice account
curl --request PATCH \
--url https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"default_series": "<string>"
}
'import requests
url = "https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series"
payload = { "default_series": "<string>" }
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({default_series: '<string>'})
};
fetch('https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series', 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://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'default_series' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Tenant: <x-tenant>"
],
]);
$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://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series"
payload := strings.NewReader("{\n \"default_series\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Tenant", "<x-tenant>")
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_series\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_series\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": "<string>",
"data": {
"id": 123,
"integration_id": 123,
"party_type": "<string>",
"party_type_label": "Bireysel",
"document_type": "<string>",
"document_type_label": "E-Fatura",
"name": "<string>",
"surname": "<string>",
"title": "<string>",
"tax_number": "<string>",
"default_series": "<string>",
"tax_office": "<string>",
"country_id": 123,
"city_id": 123,
"district_id": 123,
"address": "<string>",
"phone": "<string>",
"email": "<string>",
"use_vat_exemption": true,
"withholding_rate_percent": 123,
"default_apply_withholding": true,
"configured_extra_fields": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"integration": {
"id": 123,
"name": "<string>",
"system_name": "<string>",
"company_logo": null
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"success": true,
"error_code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"errors": null,
"data": null
}{
"message": "<string>",
"errors": {}
}Faturalar
Set the default series of an invoice account
PATCH
/
v1
/
invoices
/
accounts
/
{id}
/
default-series
Set the default series of an invoice account
curl --request PATCH \
--url https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"default_series": "<string>"
}
'import requests
url = "https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series"
payload = { "default_series": "<string>" }
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({default_series: '<string>'})
};
fetch('https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series', 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://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'default_series' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Tenant: <x-tenant>"
],
]);
$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://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series"
payload := strings.NewReader("{\n \"default_series\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Tenant", "<x-tenant>")
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_series\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/invoices/accounts/{id}/default-series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_series\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": "<string>",
"data": {
"id": 123,
"integration_id": 123,
"party_type": "<string>",
"party_type_label": "Bireysel",
"document_type": "<string>",
"document_type_label": "E-Fatura",
"name": "<string>",
"surname": "<string>",
"title": "<string>",
"tax_number": "<string>",
"default_series": "<string>",
"tax_office": "<string>",
"country_id": 123,
"city_id": 123,
"district_id": 123,
"address": "<string>",
"phone": "<string>",
"email": "<string>",
"use_vat_exemption": true,
"withholding_rate_percent": 123,
"default_apply_withholding": true,
"configured_extra_fields": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"integration": {
"id": 123,
"name": "<string>",
"system_name": "<string>",
"company_logo": null
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"success": true,
"error_code": "RESOURCE_NOT_FOUND",
"message": "<string>",
"errors": null,
"data": null
}{
"message": "<string>",
"errors": {}
}Yetkilendirmeler
oauth2bearer
The access token received from the authorization server in the OAuth 2.0 flow.
Başlıklar
Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.
Yol Parametreleri
The invoice account identifier
Gövde
application/json
The integrator series new invoices of this account are issued from, one of GET /invoices/series.
Maximum string length:
255