Integrations
Save QuickBooks accounting attachment settings for a program
Updates only supplied settings, globally or for the selected tenant-owned program. At least one setting is required; null or blank string clears a scalar setting. Nonempty income accounts must be active Income/Other Income; deposit accounts active Bank/Other Current Asset; classes active; revenue items active Service items. Provider validation failures return422 or retryable503. Program overrides retain only applicable desig-<id>/entity-<id> targets; global overrides retain desig-<id> keys only. Requires permission: one of manage_programs.
POST
/
admin
/
fields_to_attach
/
{program_id}
Save QuickBooks accounting attachment settings for a program
curl --request POST \
--url https://api.gratona.com/v1/admin/fields_to_attach/{program_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "Account Id",
"deposit_account_id": "Deposit Account Id",
"class_id": "Class Id",
"designation_revenue_item_id": "Designation Revenue Item Id",
"designation_revenue_item_overrides": {
"desig-42": "81"
}
}
'import requests
url = "https://api.gratona.com/v1/admin/fields_to_attach/{program_id}"
payload = {
"account_id": "Account Id",
"deposit_account_id": "Deposit Account Id",
"class_id": "Class Id",
"designation_revenue_item_id": "Designation Revenue Item Id",
"designation_revenue_item_overrides": { "desig-42": "81" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: 'Account Id',
deposit_account_id: 'Deposit Account Id',
class_id: 'Class Id',
designation_revenue_item_id: 'Designation Revenue Item Id',
designation_revenue_item_overrides: {'desig-42': '81'}
})
};
fetch('https://api.gratona.com/v1/admin/fields_to_attach/{program_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://api.gratona.com/v1/admin/fields_to_attach/{program_id}",
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([
'account_id' => 'Account Id',
'deposit_account_id' => 'Deposit Account Id',
'class_id' => 'Class Id',
'designation_revenue_item_id' => 'Designation Revenue Item Id',
'designation_revenue_item_overrides' => [
'desig-42' => '81'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.gratona.com/v1/admin/fields_to_attach/{program_id}"
payload := strings.NewReader("{\n \"account_id\": \"Account Id\",\n \"deposit_account_id\": \"Deposit Account Id\",\n \"class_id\": \"Class Id\",\n \"designation_revenue_item_id\": \"Designation Revenue Item Id\",\n \"designation_revenue_item_overrides\": {\n \"desig-42\": \"81\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.gratona.com/v1/admin/fields_to_attach/{program_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"Account Id\",\n \"deposit_account_id\": \"Deposit Account Id\",\n \"class_id\": \"Class Id\",\n \"designation_revenue_item_id\": \"Designation Revenue Item Id\",\n \"designation_revenue_item_overrides\": {\n \"desig-42\": \"81\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/fields_to_attach/{program_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"Account Id\",\n \"deposit_account_id\": \"Deposit Account Id\",\n \"class_id\": \"Class Id\",\n \"designation_revenue_item_id\": \"Designation Revenue Item Id\",\n \"designation_revenue_item_overrides\": {\n \"desig-42\": \"81\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Settings Updated"
}{
"message": "Unauthorized",
"status": "error"
}{
"error": "QuickBooks integration not found",
"needs_reauth": true
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Program id in the current organization.
Body
application/json
Validated request fields for this operation.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Account id. Validation: nullable, string.
Example:
"Account Id"
Deposit account id. Validation: nullable, string.
Example:
"Deposit Account Id"
Class id. Validation: nullable, string.
Example:
"Class Id"
Designation revenue item id. Validation: nullable, string.
Example:
"Designation Revenue Item Id"
Show child attributes
Show child attributes
Example:
{ "desig-42": "81" }
Response
Operation result.
Example:
"Settings Updated"
⌘I
Save QuickBooks accounting attachment settings for a program
curl --request POST \
--url https://api.gratona.com/v1/admin/fields_to_attach/{program_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "Account Id",
"deposit_account_id": "Deposit Account Id",
"class_id": "Class Id",
"designation_revenue_item_id": "Designation Revenue Item Id",
"designation_revenue_item_overrides": {
"desig-42": "81"
}
}
'import requests
url = "https://api.gratona.com/v1/admin/fields_to_attach/{program_id}"
payload = {
"account_id": "Account Id",
"deposit_account_id": "Deposit Account Id",
"class_id": "Class Id",
"designation_revenue_item_id": "Designation Revenue Item Id",
"designation_revenue_item_overrides": { "desig-42": "81" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: 'Account Id',
deposit_account_id: 'Deposit Account Id',
class_id: 'Class Id',
designation_revenue_item_id: 'Designation Revenue Item Id',
designation_revenue_item_overrides: {'desig-42': '81'}
})
};
fetch('https://api.gratona.com/v1/admin/fields_to_attach/{program_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://api.gratona.com/v1/admin/fields_to_attach/{program_id}",
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([
'account_id' => 'Account Id',
'deposit_account_id' => 'Deposit Account Id',
'class_id' => 'Class Id',
'designation_revenue_item_id' => 'Designation Revenue Item Id',
'designation_revenue_item_overrides' => [
'desig-42' => '81'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.gratona.com/v1/admin/fields_to_attach/{program_id}"
payload := strings.NewReader("{\n \"account_id\": \"Account Id\",\n \"deposit_account_id\": \"Deposit Account Id\",\n \"class_id\": \"Class Id\",\n \"designation_revenue_item_id\": \"Designation Revenue Item Id\",\n \"designation_revenue_item_overrides\": {\n \"desig-42\": \"81\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.gratona.com/v1/admin/fields_to_attach/{program_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"Account Id\",\n \"deposit_account_id\": \"Deposit Account Id\",\n \"class_id\": \"Class Id\",\n \"designation_revenue_item_id\": \"Designation Revenue Item Id\",\n \"designation_revenue_item_overrides\": {\n \"desig-42\": \"81\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/fields_to_attach/{program_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"Account Id\",\n \"deposit_account_id\": \"Deposit Account Id\",\n \"class_id\": \"Class Id\",\n \"designation_revenue_item_id\": \"Designation Revenue Item Id\",\n \"designation_revenue_item_overrides\": {\n \"desig-42\": \"81\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Settings Updated"
}{
"message": "Unauthorized",
"status": "error"
}{
"error": "QuickBooks integration not found",
"needs_reauth": true
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}