Create checkout experience
curl --request POST \
--url https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Free shipping test"
}
'import requests
url = "https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences"
payload = { "name": "Free shipping test" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Free shipping test'})
};
fetch('https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences', 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.getredo.com/v2.2/stores/{storeId}/checkout-experiences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Free shipping test'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences"
payload := strings.NewReader("{\n \"name\": \"Free shipping test\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Free shipping test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Free shipping test\"\n}"
response = http.request(request)
puts response.read_body{
"checkoutExperienceId": "66b2f1c9e4b0a1d2c3f4a5d1"
}{
"type": "com.getredo.api:checkout/invalid-request",
"title": "Invalid checkout configuration",
"detail": "A checkout experience name cannot be blank."
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}Checkout Experiences
Create checkout experience
Create an empty checkout experience. It has no shipping methods and is not
live until the store’s checkout tree routes shoppers to it; add methods with
POST /stores/{storeId}/checkout-experiences/{checkoutExperienceId}/shipping-methods.
Requires the checkout_write scope.
POST
/
stores
/
{storeId}
/
checkout-experiences
Create checkout experience
curl --request POST \
--url https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Free shipping test"
}
'import requests
url = "https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences"
payload = { "name": "Free shipping test" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Free shipping test'})
};
fetch('https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences', 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.getredo.com/v2.2/stores/{storeId}/checkout-experiences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Free shipping test'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences"
payload := strings.NewReader("{\n \"name\": \"Free shipping test\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Free shipping test\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getredo.com/v2.2/stores/{storeId}/checkout-experiences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Free shipping test\"\n}"
response = http.request(request)
puts response.read_body{
"checkoutExperienceId": "66b2f1c9e4b0a1d2c3f4a5d1"
}{
"type": "com.getredo.api:checkout/invalid-request",
"title": "Invalid checkout configuration",
"detail": "A checkout experience name cannot be blank."
}{
"detail": "<string>",
"instance": "<string>",
"title": "<string>",
"type": "about:blank"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Store ID
Example:
"64e5a8a1af49a89df37e4ee7"
Body
application/json
Merchant-facing name for the new checkout experience. Must not be blank.
Example:
"Free shipping test"
Response
Created
The checkout experience that was written. Read it back with GET /stores/{storeId}/checkout-experiences/{checkoutExperienceId}.
Example:
"66b2f1c9e4b0a1d2c3f4a5b6"
Was this page helpful?