List projects
curl --request GET \
--url https://api.altera.co/company/projects \
--header 'Authorization: <api-key>'import requests
url = "https://api.altera.co/company/projects"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.altera.co/company/projects', 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.altera.co/company/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.altera.co/company/projects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.altera.co/company/projects")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.altera.co/company/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"result": "OK",
"data": [
{
"tagId": 123,
"name": "Grow",
"enabled": true,
"color": 4286963618
}
]
}Configuration
List projects
List company projects and obtain the project object needed to assign a sales invoice.
GET
/
company
/
projects
List projects
curl --request GET \
--url https://api.altera.co/company/projects \
--header 'Authorization: <api-key>'import requests
url = "https://api.altera.co/company/projects"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.altera.co/company/projects', 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.altera.co/company/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.altera.co/company/projects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.altera.co/company/projects")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.altera.co/company/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"result": "OK",
"data": [
{
"tagId": 123,
"name": "Grow",
"enabled": true,
"color": 4286963618
}
]
}The endpoint returns projects for the company associated with your
Invoice validation requires
Authorization API key. You do not need to send a companyId.
List projects
GET /company/projects returns active and disabled projects. Use GET /company/projects?onlyActive=1 to return only active projects; omitting the filter or using onlyActive=0 includes disabled projects.
Each item in data contains tagId, name, enabled and color. tagId identifies the project, and color is its numeric ARGB value. When no projects match, the response is { "result": "OK", "data": [] }.
Assign Grow to a draft invoice
- Fetch the projects and find the item whose
nameisGrowindata. There is no server-side name filter. - Copy that complete object into the top-level
projectfield of yourPOST /sales/invoicerequest. - Set
basicInformation.statusIdtoDRAFTto save a draft. For an existing draft, also includebasicInformation.invoiceIdand the intended invoice data.
{
"project": {
"tagId": 123,
"name": "Grow",
"enabled": true,
"color": 4286963618
}
}
name, enabled and color in addition to the existing project’s tagId. Sending only an ID, a name, or a projects array is insufficient. Include project again on subsequent saves to retain the assignment; omitting it removes the assignment.
See Create/update an invoice for the full invoice contract. If the project does not exist, create it using Add/modify a project before assigning it to an invoice.Authorizations
OpenApi Key created within Altera.app for a certain company
Query Parameters
Set to 1 to return only active projects. Omit or set to 0 to include disabled projects.
Available options:
0, 1 Was this page helpful?

