Read the canonical order and payment projection for a cart
curl --request GET \
--url https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection \
--header 'X-API-Key: <api-key>'import requests
url = "https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection', 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://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"cartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkout": {
"attemptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collectionMode": "ONLINE",
"status": "PREPARING"
},
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
},
"payment": {
"reconciliationStatus": "CURRENT",
"status": "NO_PAYMENT_REQUIRED"
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"status": 429,
"message": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"status": 503,
"code": "RATE_LIMIT_STORE_UNAVAILABLE",
"message": "<string>"
}API Reference
Read the canonical order and payment projection for a cart
Requires an organization API key with orders:read and access to the requested location. Guest cart capabilities and merchant sessions do not authorize this operation. Returns the minimal current aggregate, not customer details or provider payment payloads. A successful read does not authorize a checkout retry.
GET
/
locations
/
{locationId}
/
carts
/
{cartId}
/
commerce-projection
Read the canonical order and payment projection for a cart
curl --request GET \
--url https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection \
--header 'X-API-Key: <api-key>'import requests
url = "https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection', 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://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.craveup.com/api/v1/locations/{locationId}/carts/{cartId}/commerce-projection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"cartId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checkout": {
"attemptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collectionMode": "ONLINE",
"status": "PREPARING"
},
"order": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
},
"payment": {
"reconciliationStatus": "CURRENT",
"status": "NO_PAYMENT_REQUIRED"
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"status": 429,
"message": "<string>"
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": {}
}{
"status": 503,
"code": "RATE_LIMIT_STORE_UNAVAILABLE",
"message": "<string>"
}Authorizations
Response
Current canonical projection. Cache-Control: private, no-store.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
