curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company', 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://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company",
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: Bearer <token>"
],
]);
$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://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"company_id": 123,
"company_name": "<string>",
"total_quantity": 123,
"total_amount": 123,
"items": [
{
"product_id": 123,
"product_name": "<string>",
"sku": "<string>",
"quantity": 123,
"amount": 123
}
]
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 10,
"to": 10,
"total": 50
},
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
}
}{
"error": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"status_code": 401
}{
"message": "<string>",
"errors": {}
}Sales by company report
Aggregated sales totals per company over a date range, with a per-item breakdown grouped by SKU or product. Results are paginated by company. The date range is required and is matched against each invoice’s order date.
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company', 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://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company",
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: Bearer <token>"
],
]);
$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://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/reports/sales-by-company")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"company_id": 123,
"company_name": "<string>",
"total_quantity": 123,
"total_amount": 123,
"items": [
{
"product_id": 123,
"product_name": "<string>",
"sku": "<string>",
"quantity": 123,
"amount": 123
}
]
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 10,
"to": 10,
"total": 50
},
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
}
}{
"error": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"status_code": 401
}{
"message": "<string>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Query Parameters
Start of the order-date range (inclusive, YYYY-MM-DD).
End of the order-date range (inclusive, YYYY-MM-DD). Must be on or after order_date[gte].
How to group the per-company item breakdown. sku includes a sku field on each item; product aggregates by product.
sku, product Restrict the report to a single company.
Restrict the report to a comma-separated list of company IDs (e.g. 1,2,3).
Page number for pagination.
x >= 1Number of companies per page (max 100).
1 <= x <= 100