Get an invoice
curl --request GET \
--url https://api.brandgate.dev/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brandgate.dev/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brandgate.dev/v1/invoices/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.brandgate.dev/v1/invoices/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "invoice",
"number": "<string>",
"status": "pending",
"invoice_date": "<string>",
"due_date": "<string>",
"paid_date": "<string>",
"currency": "<string>",
"total": "<string>",
"vat": "<string>",
"ocr_reference": "<string>",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"product_name": "<string>",
"sku": "<string>",
"quantity": "<string>",
"unit_price": "<string>",
"vat_rate": "<string>",
"line_total": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}invoices
Get an invoice
One invoice with its lines.
Requires the invoices:read scope.
GET
/
v1
/
invoices
/
{id}
Get an invoice
curl --request GET \
--url https://api.brandgate.dev/v1/invoices/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.brandgate.dev/v1/invoices/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brandgate.dev/v1/invoices/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.brandgate.dev/v1/invoices/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "invoice",
"number": "<string>",
"status": "pending",
"invoice_date": "<string>",
"due_date": "<string>",
"paid_date": "<string>",
"currency": "<string>",
"total": "<string>",
"vat": "<string>",
"ocr_reference": "<string>",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"product_name": "<string>",
"sku": "<string>",
"quantity": "<string>",
"unit_price": "<string>",
"vat_rate": "<string>",
"line_total": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
apiKeyoauth2
An organization API key (bg_live_…), created in BrandGate under Settings → Developers.
Path Parameters
Response
Success.
Maximum string length:
100Available options:
pending, paid, overdue, credited Pattern:
^\d{4}-\d{2}-\d{2}$Pattern:
^\d{4}-\d{2}-\d{2}$Pattern:
^\d{4}-\d{2}-\d{2}$Maximum string length:
3Pattern:
^-?\d{1,15}(\.\d{1,6})?$Pattern:
^-?\d{1,15}(\.\d{1,6})?$Maximum string length:
100Show child attributes
Show child attributes