curl --request PUT \
--url https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ToDate": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal"
payload = {
"ToDate": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ToDate: '2023-11-07T05:31:56Z', ExpirationDate: '2023-11-07T05:31:56Z'})
};
fetch('https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal', 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://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'ToDate' => '2023-11-07T05:31:56Z',
'ExpirationDate' => '2023-11-07T05:31:56Z'
]),
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://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal"
payload := strings.NewReader("{\n \"ToDate\": \"2023-11-07T05:31:56Z\",\n \"ExpirationDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ToDate\": \"2023-11-07T05:31:56Z\",\n \"ExpirationDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ToDate\": \"2023-11-07T05:31:56Z\",\n \"ExpirationDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body"string"Set the renewal date or expiration date of the current subscription.
Acts on the account’s current subscription. The account must be in the Subscribing, Cancelling, Trialing, CancellingTrial or PastDue stage, and the request is rejected when a future subscription (a scheduled plan change) is waiting to start on the account.
ToDate is the new renewal date. It must be after the subscription’s start date, on or after the date of the subscription’s latest invoice, and not later than ExpirationDate. Moving the renewal date earlier gives no credit for the rest of the current term.
ExpirationDate is the date the subscription ends. Outseta ends the subscription when it reaches this date and sets its EndDate to it. When only ExpirationDate is sent and it is before the current renewal date, the renewal date moves to the expiration date.
Every request sets the expiration date. If ExpirationDate is omitted, the subscription’s existing expiration date is removed, except when ToDate is later than it: then the expiration date moves to ToDate. To remove the expiration date, send an empty body (). To keep an expiration date while changing the renewal date, send both.
Times of day: ExpirationDate is first set to the time of day of the subscription’s start date, and the checks above compare ToDate with the time of day you send. For example, with a subscription that started at 12:00 UTC, ToDate 2027-03-31T18:00:00Z is later than ExpirationDate 2027-03-31T00:00:00Z and is rejected. Send ToDate with the time of day of the current RenewalDate to avoid this. The saved renewal date keeps the time of day of the current RenewalDate.
curl --request PUT \
--url https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ToDate": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal"
payload = {
"ToDate": "2023-11-07T05:31:56Z",
"ExpirationDate": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ToDate: '2023-11-07T05:31:56Z', ExpirationDate: '2023-11-07T05:31:56Z'})
};
fetch('https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal', 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://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'ToDate' => '2023-11-07T05:31:56Z',
'ExpirationDate' => '2023-11-07T05:31:56Z'
]),
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://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal"
payload := strings.NewReader("{\n \"ToDate\": \"2023-11-07T05:31:56Z\",\n \"ExpirationDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ToDate\": \"2023-11-07T05:31:56Z\",\n \"ExpirationDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/crm/accounts/{accountUid}/extend-renewal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ToDate\": \"2023-11-07T05:31:56Z\",\n \"ExpirationDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body"string"Authorizations
Enter your access token (OAuth / JWT).
Path Parameters
The account's unique identifier
Body
The new renewal date (ToDate), the new expiration date (ExpirationDate), or both
The new renewal date of the subscription. Omit it to keep the current renewal date, unless ExpirationDate is earlier than it: then the renewal date moves to ExpirationDate.
The date the subscription ends. Omit it to remove the subscription's expiration date, unless ToDate is later than the existing expiration date: then the expiration date moves to ToDate.
Response
The response is of type file.