Write-backs
Claim write-backs
Lease pending price write-backs for this connector to apply.
POST
/
api
/
v1
/
writebacks
/
claim
Lease pending price write-backs for this connector
curl --request POST \
--url https://app.elastly.io/api/v1/writebacks/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"limit": 100
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 100})
};
fetch('https://app.elastly.io/api/v1/writebacks/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.elastly.io/api/v1/writebacks/claim"
payload = { "limit": 100 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.elastly.io/api/v1/writebacks/claim",
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([
'limit' => 100
]),
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;
}HttpResponse<String> response = Unirest.post("https://app.elastly.io/api/v1/writebacks/claim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 100\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.elastly.io/api/v1/writebacks/claim"
payload := strings.NewReader("{\n \"limit\": 100\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))
}{
"tasks": [
{
"id": "<string>",
"productSku": "<string>",
"productExternalId": "<string>",
"priceCents": 123,
"currency": "<string>",
"leaseUntil": "<string>",
"target": {},
"exchangeRateToBase": 123,
"reasonSummary": "<string>",
"pricingDecisionId": "<string>"
}
]
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}Claiming leases real work. Every task you claim carries a
leaseUntil, and your live connector
will not receive those write-backs until the lease expires. The interactive playground is turned
off here so reading the docs can never take work away from a running connector.Was this page helpful?
⌘I
Lease pending price write-backs for this connector
curl --request POST \
--url https://app.elastly.io/api/v1/writebacks/claim \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"limit": 100
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({limit: 100})
};
fetch('https://app.elastly.io/api/v1/writebacks/claim', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.elastly.io/api/v1/writebacks/claim"
payload = { "limit": 100 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.elastly.io/api/v1/writebacks/claim",
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([
'limit' => 100
]),
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;
}HttpResponse<String> response = Unirest.post("https://app.elastly.io/api/v1/writebacks/claim")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 100\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.elastly.io/api/v1/writebacks/claim"
payload := strings.NewReader("{\n \"limit\": 100\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))
}{
"tasks": [
{
"id": "<string>",
"productSku": "<string>",
"productExternalId": "<string>",
"priceCents": 123,
"currency": "<string>",
"leaseUntil": "<string>",
"target": {},
"exchangeRateToBase": 123,
"reasonSummary": "<string>",
"pricingDecisionId": "<string>"
}
]
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"requestId": "<string>",
"param": "<string>"
}
}