Withdraw a change
curl --request DELETE \
--url https://console.perfgrid.com/api/v1/services/{service}/changes/{change} \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.perfgrid.com/api/v1/services/{service}/changes/{change}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.perfgrid.com/api/v1/services/{service}/changes/{change}', 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://console.perfgrid.com/api/v1/services/{service}/changes/{change}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://console.perfgrid.com/api/v1/services/{service}/changes/{change}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://console.perfgrid.com/api/v1/services/{service}/changes/{change}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.perfgrid.com/api/v1/services/{service}/changes/{change}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "upgrade",
"status": "pending_payment",
"currency": "<string>",
"amount": "<string>",
"effective_on": "<string>",
"covered_until": "<string>",
"invoice": {
"id": "<string>",
"reference": "<string>",
"status": "unpaid"
},
"created_at": "<string>"
}
}{
"message": "<string>"
}Services
Withdraw a change
Withdraws a change that waits for its payment or its date. Refused with
a 422: a price change, the difference left by an upgrade for a period
paid at the old price (follow_up), a scheduled change once a
period on its new terms is paid, and a billing cycle change while a
later renewal is already invoiced. Needs services.manage.
DELETE
/
services
/
{service}
/
changes
/
{change}
Withdraw a change
curl --request DELETE \
--url https://console.perfgrid.com/api/v1/services/{service}/changes/{change} \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.perfgrid.com/api/v1/services/{service}/changes/{change}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.perfgrid.com/api/v1/services/{service}/changes/{change}', 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://console.perfgrid.com/api/v1/services/{service}/changes/{change}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://console.perfgrid.com/api/v1/services/{service}/changes/{change}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://console.perfgrid.com/api/v1/services/{service}/changes/{change}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.perfgrid.com/api/v1/services/{service}/changes/{change}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "upgrade",
"status": "pending_payment",
"currency": "<string>",
"amount": "<string>",
"effective_on": "<string>",
"covered_until": "<string>",
"invoice": {
"id": "<string>",
"reference": "<string>",
"status": "unpaid"
},
"created_at": "<string>"
}
}{
"message": "<string>"
}Authorizations
An API token from API tokens in the console, sent as Authorization: Bearer pgapi_.... It works for one billing account, and its permissions decide which endpoints it may call.
Response
ServiceChangeResource
Show child attributes
Show child attributes