curl --request PUT \
--url https://app.flextell.ai/api/v1/invoices/accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"tax_number": "<string>",
"integration_id": "<string>",
"name": "<string>",
"surname": "<string>",
"title": "<string>",
"tax_office": "<string>",
"country_id": 123,
"city_id": 123,
"district_id": 123,
"address": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"use_vat_exemption": true,
"withholding_rate_percent": 50,
"default_apply_withholding": true,
"extra_fields": {}
}
'import requests
url = "https://app.flextell.ai/api/v1/invoices/accounts/{id}"
payload = {
"tax_number": "<string>",
"integration_id": "<string>",
"name": "<string>",
"surname": "<string>",
"title": "<string>",
"tax_office": "<string>",
"country_id": 123,
"city_id": 123,
"district_id": 123,
"address": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"use_vat_exemption": True,
"withholding_rate_percent": 50,
"default_apply_withholding": True,
"extra_fields": {}
}
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
tax_number: '<string>',
integration_id: '<string>',
name: '<string>',
surname: '<string>',
title: '<string>',
tax_office: '<string>',
country_id: 123,
city_id: 123,
district_id: 123,
address: '<string>',
phone: '<string>',
email: 'jsmith@example.com',
use_vat_exemption: true,
withholding_rate_percent: 50,
default_apply_withholding: true,
extra_fields: {}
})
};
fetch('https://app.flextell.ai/api/v1/invoices/accounts/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tax_number' => '<string>',
'integration_id' => '<string>',
'name' => '<string>',
'surname' => '<string>',
'title' => '<string>',
'tax_office' => '<string>',
'country_id' => 123,
'city_id' => 123,
'district_id' => 123,
'address' => '<string>',
'phone' => '<string>',
'email' => 'jsmith@example.com',
'use_vat_exemption' => true,
'withholding_rate_percent' => 50,
'default_apply_withholding' => true,
'extra_fields' => [
]
]),
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}"
payload := strings.NewReader("{\n \"tax_number\": \"<string>\",\n \"integration_id\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"title\": \"<string>\",\n \"tax_office\": \"<string>\",\n \"country_id\": 123,\n \"city_id\": 123,\n \"district_id\": 123,\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"use_vat_exemption\": true,\n \"withholding_rate_percent\": 50,\n \"default_apply_withholding\": true,\n \"extra_fields\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.flextell.ai/api/v1/invoices/accounts/{id}")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax_number\": \"<string>\",\n \"integration_id\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"title\": \"<string>\",\n \"tax_office\": \"<string>\",\n \"country_id\": 123,\n \"city_id\": 123,\n \"district_id\": 123,\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"use_vat_exemption\": true,\n \"withholding_rate_percent\": 50,\n \"default_apply_withholding\": true,\n \"extra_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/invoices/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tax_number\": \"<string>\",\n \"integration_id\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"title\": \"<string>\",\n \"tax_office\": \"<string>\",\n \"country_id\": 123,\n \"city_id\": 123,\n \"district_id\": 123,\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"use_vat_exemption\": true,\n \"withholding_rate_percent\": 50,\n \"default_apply_withholding\": true,\n \"extra_fields\": {}\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": {}
}Update an invoice account
curl --request PUT \
--url https://app.flextell.ai/api/v1/invoices/accounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"tax_number": "<string>",
"integration_id": "<string>",
"name": "<string>",
"surname": "<string>",
"title": "<string>",
"tax_office": "<string>",
"country_id": 123,
"city_id": 123,
"district_id": 123,
"address": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"use_vat_exemption": true,
"withholding_rate_percent": 50,
"default_apply_withholding": true,
"extra_fields": {}
}
'import requests
url = "https://app.flextell.ai/api/v1/invoices/accounts/{id}"
payload = {
"tax_number": "<string>",
"integration_id": "<string>",
"name": "<string>",
"surname": "<string>",
"title": "<string>",
"tax_office": "<string>",
"country_id": 123,
"city_id": 123,
"district_id": 123,
"address": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"use_vat_exemption": True,
"withholding_rate_percent": 50,
"default_apply_withholding": True,
"extra_fields": {}
}
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
tax_number: '<string>',
integration_id: '<string>',
name: '<string>',
surname: '<string>',
title: '<string>',
tax_office: '<string>',
country_id: 123,
city_id: 123,
district_id: 123,
address: '<string>',
phone: '<string>',
email: 'jsmith@example.com',
use_vat_exemption: true,
withholding_rate_percent: 50,
default_apply_withholding: true,
extra_fields: {}
})
};
fetch('https://app.flextell.ai/api/v1/invoices/accounts/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tax_number' => '<string>',
'integration_id' => '<string>',
'name' => '<string>',
'surname' => '<string>',
'title' => '<string>',
'tax_office' => '<string>',
'country_id' => 123,
'city_id' => 123,
'district_id' => 123,
'address' => '<string>',
'phone' => '<string>',
'email' => 'jsmith@example.com',
'use_vat_exemption' => true,
'withholding_rate_percent' => 50,
'default_apply_withholding' => true,
'extra_fields' => [
]
]),
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}"
payload := strings.NewReader("{\n \"tax_number\": \"<string>\",\n \"integration_id\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"title\": \"<string>\",\n \"tax_office\": \"<string>\",\n \"country_id\": 123,\n \"city_id\": 123,\n \"district_id\": 123,\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"use_vat_exemption\": true,\n \"withholding_rate_percent\": 50,\n \"default_apply_withholding\": true,\n \"extra_fields\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.flextell.ai/api/v1/invoices/accounts/{id}")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tax_number\": \"<string>\",\n \"integration_id\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"title\": \"<string>\",\n \"tax_office\": \"<string>\",\n \"country_id\": 123,\n \"city_id\": 123,\n \"district_id\": 123,\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"use_vat_exemption\": true,\n \"withholding_rate_percent\": 50,\n \"default_apply_withholding\": true,\n \"extra_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/invoices/accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tax_number\": \"<string>\",\n \"integration_id\": \"<string>\",\n \"name\": \"<string>\",\n \"surname\": \"<string>\",\n \"title\": \"<string>\",\n \"tax_office\": \"<string>\",\n \"country_id\": 123,\n \"city_id\": 123,\n \"district_id\": 123,\n \"address\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"use_vat_exemption\": true,\n \"withholding_rate_percent\": 50,\n \"default_apply_withholding\": true,\n \"extra_fields\": {}\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
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
Whether the account belongs to an individual or a company.
individual, company Tax number (VKN) or Turkish identity number (TCKN).
11Whether the account issues e-invoices or e-vouchers (e-SMM).
einvoice, evoucher The integrator of an existing account cannot be changed.
First name, required for an individual.
255Last name, required for an individual.
255Company title, required for a company.
255Tax office name.
255The country identifier.
The city identifier; must belong to country_id.
The district identifier; must belong to city_id.
Street address.
1000Phone number.
255Email address.
255Whether invoices of this account apply the VAT exemption by default.
Default withholding rate in percent (0-100).
0 <= x <= 100Whether new invoices of this account apply withholding by default.
Integrator credentials keyed by the integration's required_fields[].key (e.g. {"API_KEY": "..."}). A key left out keeps its stored value; values are stored encrypted and never returned.
Show child attributes
Show child attributes