curl --request GET \
--url https://api.opencals.com/storefront/cart/checkout/questions/{language} \
--header 'X-Cart-Id: <x-cart-id>'import requests
url = "https://api.opencals.com/storefront/cart/checkout/questions/{language}"
headers = {"X-Cart-Id": "<x-cart-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Cart-Id': '<x-cart-id>'}};
fetch('https://api.opencals.com/storefront/cart/checkout/questions/{language}', 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.opencals.com/storefront/cart/checkout/questions/{language}",
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-Cart-Id: <x-cart-id>"
],
]);
$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.opencals.com/storefront/cart/checkout/questions/{language}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Cart-Id", "<x-cart-id>")
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.opencals.com/storefront/cart/checkout/questions/{language}")
.header("X-Cart-Id", "<x-cart-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/cart/checkout/questions/{language}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Cart-Id"] = '<x-cart-id>'
response = http.request(request)
puts response.read_body[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"internalName": "Customer Allergies Question",
"required": true,
"type": "single-line-text-field",
"order": 1,
"alwaysShow": false,
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-15T00:00:00Z",
"deletedAt": "2023-06-03T09:45:00Z",
"storeId": "store-uuid",
"translations": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"questionId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Do you have any allergies?",
"description": "Please let us know about any food allergies or dietary restrictions.",
"options": [
"Nut allergy",
"Gluten intolerance",
"Lactose intolerance",
"None"
],
"languageCode": "en",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-15T00:00:00Z"
}
],
"fileConfig": {
"categories": [
"images",
"pdf"
],
"maxSizeBytes": 26214400,
"maxFiles": 5
},
"existingAnswer": "<string>"
}
]Get all checkout questions for current cart
curl --request GET \
--url https://api.opencals.com/storefront/cart/checkout/questions/{language} \
--header 'X-Cart-Id: <x-cart-id>'import requests
url = "https://api.opencals.com/storefront/cart/checkout/questions/{language}"
headers = {"X-Cart-Id": "<x-cart-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Cart-Id': '<x-cart-id>'}};
fetch('https://api.opencals.com/storefront/cart/checkout/questions/{language}', 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.opencals.com/storefront/cart/checkout/questions/{language}",
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-Cart-Id: <x-cart-id>"
],
]);
$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.opencals.com/storefront/cart/checkout/questions/{language}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Cart-Id", "<x-cart-id>")
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.opencals.com/storefront/cart/checkout/questions/{language}")
.header("X-Cart-Id", "<x-cart-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opencals.com/storefront/cart/checkout/questions/{language}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Cart-Id"] = '<x-cart-id>'
response = http.request(request)
puts response.read_body[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"internalName": "Customer Allergies Question",
"required": true,
"type": "single-line-text-field",
"order": 1,
"alwaysShow": false,
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-15T00:00:00Z",
"deletedAt": "2023-06-03T09:45:00Z",
"storeId": "store-uuid",
"translations": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"questionId": "550e8400-e29b-41d4-a716-446655440000",
"title": "Do you have any allergies?",
"description": "Please let us know about any food allergies or dietary restrictions.",
"options": [
"Nut allergy",
"Gluten intolerance",
"Lactose intolerance",
"None"
],
"languageCode": "en",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-15T00:00:00Z"
}
],
"fileConfig": {
"categories": [
"images",
"pdf"
],
"maxSizeBytes": 26214400,
"maxFiles": 5
},
"existingAnswer": "<string>"
}
]Headers
Path Parameters
Response
Checkout questions for all cart items
Unique identifier for the checkout question
"550e8400-e29b-41d4-a716-446655440000"
Internal name for the question (not shown to customers)
"Customer Allergies Question"
Whether the question is required to be answered
true
Type of input for the question
single-line-text-field, multi-line-text-field, dropdown, rating, checkbox, file-upload "single-line-text-field"
Display order of the question (lower numbers appear first)
1
Whether this question is shown for all products in the store
false
Date and time when the question was created
"2023-01-01T00:00:00Z"
Date and time when the question was last updated
"2023-01-15T00:00:00Z"
Date when the question was soft-deleted
"2023-06-03T09:45:00Z"
ID of the store that owns this question
"store-uuid"
Translations of this question (filtered to the requested language)
Show child attributes
Show child attributes
File-upload constraints (allowed categories, max size, max files). Only set when type is file-upload.
{ "categories": ["images", "pdf"], "maxSizeBytes": 26214400, "maxFiles": 5 }
The customer's previously-saved answer to this question, if any
Was this page helpful?