Update
curl --request PATCH \
--url https://{defaultHost}/v1/abandoned_checkouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"abandoned_checkout": {
"notifications_enabled": true
}
}
'import requests
url = "https://{defaultHost}/v1/abandoned_checkouts/{id}"
payload = { "abandoned_checkout": { "notifications_enabled": True } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({abandoned_checkout: {notifications_enabled: true}})
};
fetch('https://{defaultHost}/v1/abandoned_checkouts/{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://{defaultHost}/v1/abandoned_checkouts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'abandoned_checkout' => [
'notifications_enabled' => true
]
]),
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://{defaultHost}/v1/abandoned_checkouts/{id}"
payload := strings.NewReader("{\n \"abandoned_checkout\": {\n \"notifications_enabled\": true\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{defaultHost}/v1/abandoned_checkouts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"abandoned_checkout\": {\n \"notifications_enabled\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/abandoned_checkouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"abandoned_checkout\": {\n \"notifications_enabled\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "6a0e43de-d362-426a-8444-3a5779c9e4a8",
"object": "abandoned_checkout",
"notifications_enabled": true,
"notification_status": "not_scheduled",
"notifications_scheduled_at": [],
"portal_url": "http://app.example.com/portal_redirect/abandoned_checkouts/6a0e43de-d362-426a-8444-3a5779c9e4a8",
"recovery_status": "abandoned",
"recovered_at": null,
"checkout": "15b65a42-6bb0-4a2a-ac47-4eecdbc8dcff",
"customer": "2c7ea724-2f4a-4860-915c-46c4261862e7",
"promotion": null,
"recovered_checkout": null,
"created_at": 1793794731,
"updated_at": 1793796831
}Abandonded Checkouts
Update
Updates a specific abandoned checkout.
PATCH
/
v1
/
abandoned_checkouts
/
{id}
Update
curl --request PATCH \
--url https://{defaultHost}/v1/abandoned_checkouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"abandoned_checkout": {
"notifications_enabled": true
}
}
'import requests
url = "https://{defaultHost}/v1/abandoned_checkouts/{id}"
payload = { "abandoned_checkout": { "notifications_enabled": True } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({abandoned_checkout: {notifications_enabled: true}})
};
fetch('https://{defaultHost}/v1/abandoned_checkouts/{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://{defaultHost}/v1/abandoned_checkouts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'abandoned_checkout' => [
'notifications_enabled' => true
]
]),
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://{defaultHost}/v1/abandoned_checkouts/{id}"
payload := strings.NewReader("{\n \"abandoned_checkout\": {\n \"notifications_enabled\": true\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{defaultHost}/v1/abandoned_checkouts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"abandoned_checkout\": {\n \"notifications_enabled\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/abandoned_checkouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"abandoned_checkout\": {\n \"notifications_enabled\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "6a0e43de-d362-426a-8444-3a5779c9e4a8",
"object": "abandoned_checkout",
"notifications_enabled": true,
"notification_status": "not_scheduled",
"notifications_scheduled_at": [],
"portal_url": "http://app.example.com/portal_redirect/abandoned_checkouts/6a0e43de-d362-426a-8444-3a5779c9e4a8",
"recovery_status": "abandoned",
"recovered_at": null,
"checkout": "15b65a42-6bb0-4a2a-ac47-4eecdbc8dcff",
"customer": "2c7ea724-2f4a-4860-915c-46c4261862e7",
"promotion": null,
"recovered_checkout": null,
"created_at": 1793794731,
"updated_at": 1793796831
}Authorizations
Response
200 - application/json
Success
Expandable – The associated checkout ID.
Expandable – The associated customer ID.
The promotion that was auto-generated for this abandoned checkout.
Expandable – The associated promotion ID.
The checkout that was recovered from this abandoned checkout.
Expandable – The associated checkout ID.
Was this page helpful?