Retrieve a specific order by ID
curl --request GET \
--url https://carbon-engine.onrender.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://carbon-engine.onrender.com/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://carbon-engine.onrender.com/v1/orders/{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://carbon-engine.onrender.com/v1/orders/{id}",
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://carbon-engine.onrender.com/v1/orders/{id}"
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://carbon-engine.onrender.com/v1/orders/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://carbon-engine.onrender.com/v1/orders/{id}")
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{
"_id": "<string>",
"orderNumber": "<string>",
"customer": "<string>",
"description": "<string>",
"price_sar_halalas": 123,
"amount_kg": 123,
"creditsPurchased": 123,
"callbackUrl": "<string>",
"state": "<string>",
"portfolio": "<string>",
"certificateUrl": "<string>",
"projectRecords": [
{
"project_id": "<string>",
"project_category_id": "<string>",
"credit_batch_id": "<string>",
"delta": 123,
"recorded_on": "2023-11-07T05:31:56Z"
}
],
"invoice": {
"amountDueSarHalalas": 123,
"balanceAppliedSarHalalas": 123,
"receiptUrl": "<string>"
}
}Orders
Get Order By Id
Returns information about an order
GET
/
v1
/
orders
/
{id}
Retrieve a specific order by ID
curl --request GET \
--url https://carbon-engine.onrender.com/v1/orders/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://carbon-engine.onrender.com/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://carbon-engine.onrender.com/v1/orders/{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://carbon-engine.onrender.com/v1/orders/{id}",
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://carbon-engine.onrender.com/v1/orders/{id}"
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://carbon-engine.onrender.com/v1/orders/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://carbon-engine.onrender.com/v1/orders/{id}")
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{
"_id": "<string>",
"orderNumber": "<string>",
"customer": "<string>",
"description": "<string>",
"price_sar_halalas": 123,
"amount_kg": 123,
"creditsPurchased": 123,
"callbackUrl": "<string>",
"state": "<string>",
"portfolio": "<string>",
"certificateUrl": "<string>",
"projectRecords": [
{
"project_id": "<string>",
"project_category_id": "<string>",
"credit_batch_id": "<string>",
"delta": 123,
"recorded_on": "2023-11-07T05:31:56Z"
}
],
"invoice": {
"amountDueSarHalalas": 123,
"balanceAppliedSarHalalas": 123,
"receiptUrl": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The order ID
Response
Details of the order
The unique order id
The unique order number
If purchased by customer
Description of the order
Total price of the credits purchased in SAR halalas
Number of carbon credits requested, in kilograms
Number of carbon credits fulfilled, in kilograms
Callback URL for order updates (if any)
Current status of the order, e.g., fulfilled, placed, or cancelled
The portfolio ID related to the order
URL to the order page with the certificate of the carbon credits
List of project records for this order
Show child attributes
Show child attributes
Show child attributes
Show child attributes
