curl --request GET \
--url https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}', 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.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}"
req, _ := http.NewRequest("GET", 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.get("https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"contractId": "<string>",
"deltaLineItems": [
{
"id": "<string>",
"name": "<string>",
"pricing": {
"prices": [
{
"currencyCode": "<string>",
"price": 123,
"maxQuantity": 123
}
],
"pricingModel": "FLAT"
},
"quantity": 123,
"acv": 123,
"allowBuyerSelectedQuantity": true,
"amount": 123,
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"arr": 123,
"billingCycleAnchorDate": "2023-12-25",
"billingPeriodEndDate": "2023-12-25",
"billingPeriodStartDate": "2023-12-25",
"billingStartDelayDays": 123,
"billingStartDelayMonths": 123,
"billingStartDelayType": "HS_BILLING_START_DELAY_DAYS",
"buyerSelectedQuantityMax": 123,
"buyerSelectedQuantityMin": 123,
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"discount": 123,
"discountPercentage": 123,
"effectiveUnitPrice": 123,
"externalId": "<string>",
"images": "<string>",
"isEditablePrice": true,
"isOptional": true,
"isParent": true,
"lineItemCurrencyCode": "<string>",
"mrr": 123,
"parentLineItemId": "<string>",
"positionOnQuote": 123,
"postTaxAmount": 123,
"preDiscountAmount": 123,
"price": 123,
"priceBookId": "<string>",
"pricingModel": "FLAT",
"productId": "<string>",
"productType": "<string>",
"rampKey": "<string>",
"recurringBillingDayOfMonth": 123,
"recurringBillingEndDate": "2023-12-25",
"recurringBillingFrequency": "ANNUALLY",
"recurringBillingNumberOfPayments": 123,
"recurringBillingPeriod": "<string>",
"recurringBillingStartDate": "2023-12-25",
"recurringBillingTerms": "AUTOMATICALLY_RENEW",
"richTextDescription": "<string>",
"sku": "<string>",
"tax": 123,
"taxAmount": 123,
"taxCategory": "<string>",
"taxRateGroupId": "<string>",
"tcv": 123,
"termInMonths": 123,
"tierAmount": 123,
"totalDiscount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"variantId": "<string>"
}
],
"id": "<string>",
"lineItemChanges": [
{
"action": "ADD",
"rampKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineItemAdd": {
"mode": "CUSTOM",
"name": "<string>",
"pricing": {
"prices": [
{
"currencyCode": "<string>",
"price": {},
"maxQuantity": 123
}
],
"pricingModel": "FLAT"
},
"quantity": 123,
"allowBuyerSelectedQuantity": true,
"billingCycleAnchorDate": "2023-12-25",
"billingStartDelayDays": 123,
"billingStartDelayMonths": 123,
"buyerSelectedQuantityMax": 123,
"buyerSelectedQuantityMin": 123,
"description": "<string>",
"discount": 123,
"discountPercentage": 123,
"externalId": "<string>",
"images": "<string>",
"isEditablePrice": true,
"isOptional": true,
"lineItemCurrencyCode": "<string>",
"positionOnQuote": 123,
"priceBookId": "<string>",
"productId": "<string>",
"productType": "<string>",
"recurringBillingEndDate": "2023-12-25",
"recurringBillingFrequency": "ANNUALLY",
"recurringBillingPeriod": "<string>",
"recurringBillingStartDate": "2023-12-25",
"richTextDescription": "<string>",
"sku": "<string>",
"taxCategory": "<string>",
"taxRateGroupId": "<string>",
"variantId": "<string>"
},
"lineItemUpdate": {
"allowBuyerSelectedQuantity": {},
"billingCycleAnchorDate": {},
"billingStartDelayDays": {},
"billingStartDelayMonths": {},
"buyerSelectedQuantityMax": {},
"buyerSelectedQuantityMin": {},
"description": {},
"discount": {},
"discountPercentage": {},
"externalId": {},
"images": {},
"isEditablePrice": {},
"isOptional": {},
"lineItemCurrencyCode": {},
"name": {},
"positionOnQuote": {},
"priceBookId": {},
"pricing": {},
"productType": {},
"quantity": {},
"recurringBillingEndDate": {},
"recurringBillingFrequency": {},
"recurringBillingPeriod": {},
"recurringBillingStartDate": {},
"richTextDescription": {},
"sku": {},
"taxCategory": {},
"taxRateGroupId": {},
"variantId": {}
}
}
],
"proposedLineItems": [
{
"id": "<string>",
"name": "<string>",
"pricing": {
"prices": [
{
"currencyCode": "<string>",
"price": 123,
"maxQuantity": 123
}
],
"pricingModel": "FLAT"
},
"quantity": 123,
"acv": 123,
"allowBuyerSelectedQuantity": true,
"amount": 123,
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"arr": 123,
"billingCycleAnchorDate": "2023-12-25",
"billingPeriodEndDate": "2023-12-25",
"billingPeriodStartDate": "2023-12-25",
"billingStartDelayDays": 123,
"billingStartDelayMonths": 123,
"billingStartDelayType": "HS_BILLING_START_DELAY_DAYS",
"buyerSelectedQuantityMax": 123,
"buyerSelectedQuantityMin": 123,
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"discount": 123,
"discountPercentage": 123,
"effectiveUnitPrice": 123,
"externalId": "<string>",
"images": "<string>",
"isEditablePrice": true,
"isOptional": true,
"isParent": true,
"lineItemCurrencyCode": "<string>",
"mrr": 123,
"parentLineItemId": "<string>",
"positionOnQuote": 123,
"postTaxAmount": 123,
"preDiscountAmount": 123,
"price": 123,
"priceBookId": "<string>",
"pricingModel": "FLAT",
"productId": "<string>",
"productType": "<string>",
"rampKey": "<string>",
"recurringBillingDayOfMonth": 123,
"recurringBillingEndDate": "2023-12-25",
"recurringBillingFrequency": "ANNUALLY",
"recurringBillingNumberOfPayments": 123,
"recurringBillingPeriod": "<string>",
"recurringBillingStartDate": "2023-12-25",
"recurringBillingTerms": "AUTOMATICALLY_RENEW",
"richTextDescription": "<string>",
"sku": "<string>",
"tax": 123,
"taxAmount": 123,
"taxCategory": "<string>",
"taxRateGroupId": "<string>",
"tcv": 123,
"termInMonths": 123,
"tierAmount": 123,
"totalDiscount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"variantId": "<string>"
}
],
"prorating": true,
"status": "ACCEPTED",
"type": "DIRECT",
"createdAt": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-12-25",
"name": "<string>",
"quoteId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}Retrieve change
Retrieve details of a specific contract change using its unique identifier. This endpoint allows you to access information about the change, including its status, type, and any associated line item changes. It is useful for tracking the progress and details of contract modifications.
curl --request GET \
--url https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}', 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.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}"
req, _ := http.NewRequest("GET", 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.get("https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/commerce/contracts/2027-03-beta/changes/{changeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"contractId": "<string>",
"deltaLineItems": [
{
"id": "<string>",
"name": "<string>",
"pricing": {
"prices": [
{
"currencyCode": "<string>",
"price": 123,
"maxQuantity": 123
}
],
"pricingModel": "FLAT"
},
"quantity": 123,
"acv": 123,
"allowBuyerSelectedQuantity": true,
"amount": 123,
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"arr": 123,
"billingCycleAnchorDate": "2023-12-25",
"billingPeriodEndDate": "2023-12-25",
"billingPeriodStartDate": "2023-12-25",
"billingStartDelayDays": 123,
"billingStartDelayMonths": 123,
"billingStartDelayType": "HS_BILLING_START_DELAY_DAYS",
"buyerSelectedQuantityMax": 123,
"buyerSelectedQuantityMin": 123,
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"discount": 123,
"discountPercentage": 123,
"effectiveUnitPrice": 123,
"externalId": "<string>",
"images": "<string>",
"isEditablePrice": true,
"isOptional": true,
"isParent": true,
"lineItemCurrencyCode": "<string>",
"mrr": 123,
"parentLineItemId": "<string>",
"positionOnQuote": 123,
"postTaxAmount": 123,
"preDiscountAmount": 123,
"price": 123,
"priceBookId": "<string>",
"pricingModel": "FLAT",
"productId": "<string>",
"productType": "<string>",
"rampKey": "<string>",
"recurringBillingDayOfMonth": 123,
"recurringBillingEndDate": "2023-12-25",
"recurringBillingFrequency": "ANNUALLY",
"recurringBillingNumberOfPayments": 123,
"recurringBillingPeriod": "<string>",
"recurringBillingStartDate": "2023-12-25",
"recurringBillingTerms": "AUTOMATICALLY_RENEW",
"richTextDescription": "<string>",
"sku": "<string>",
"tax": 123,
"taxAmount": 123,
"taxCategory": "<string>",
"taxRateGroupId": "<string>",
"tcv": 123,
"termInMonths": 123,
"tierAmount": 123,
"totalDiscount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"variantId": "<string>"
}
],
"id": "<string>",
"lineItemChanges": [
{
"action": "ADD",
"rampKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineItemAdd": {
"mode": "CUSTOM",
"name": "<string>",
"pricing": {
"prices": [
{
"currencyCode": "<string>",
"price": {},
"maxQuantity": 123
}
],
"pricingModel": "FLAT"
},
"quantity": 123,
"allowBuyerSelectedQuantity": true,
"billingCycleAnchorDate": "2023-12-25",
"billingStartDelayDays": 123,
"billingStartDelayMonths": 123,
"buyerSelectedQuantityMax": 123,
"buyerSelectedQuantityMin": 123,
"description": "<string>",
"discount": 123,
"discountPercentage": 123,
"externalId": "<string>",
"images": "<string>",
"isEditablePrice": true,
"isOptional": true,
"lineItemCurrencyCode": "<string>",
"positionOnQuote": 123,
"priceBookId": "<string>",
"productId": "<string>",
"productType": "<string>",
"recurringBillingEndDate": "2023-12-25",
"recurringBillingFrequency": "ANNUALLY",
"recurringBillingPeriod": "<string>",
"recurringBillingStartDate": "2023-12-25",
"richTextDescription": "<string>",
"sku": "<string>",
"taxCategory": "<string>",
"taxRateGroupId": "<string>",
"variantId": "<string>"
},
"lineItemUpdate": {
"allowBuyerSelectedQuantity": {},
"billingCycleAnchorDate": {},
"billingStartDelayDays": {},
"billingStartDelayMonths": {},
"buyerSelectedQuantityMax": {},
"buyerSelectedQuantityMin": {},
"description": {},
"discount": {},
"discountPercentage": {},
"externalId": {},
"images": {},
"isEditablePrice": {},
"isOptional": {},
"lineItemCurrencyCode": {},
"name": {},
"positionOnQuote": {},
"priceBookId": {},
"pricing": {},
"productType": {},
"quantity": {},
"recurringBillingEndDate": {},
"recurringBillingFrequency": {},
"recurringBillingPeriod": {},
"recurringBillingStartDate": {},
"richTextDescription": {},
"sku": {},
"taxCategory": {},
"taxRateGroupId": {},
"variantId": {}
}
}
],
"proposedLineItems": [
{
"id": "<string>",
"name": "<string>",
"pricing": {
"prices": [
{
"currencyCode": "<string>",
"price": 123,
"maxQuantity": 123
}
],
"pricingModel": "FLAT"
},
"quantity": 123,
"acv": 123,
"allowBuyerSelectedQuantity": true,
"amount": 123,
"archived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"arr": 123,
"billingCycleAnchorDate": "2023-12-25",
"billingPeriodEndDate": "2023-12-25",
"billingPeriodStartDate": "2023-12-25",
"billingStartDelayDays": 123,
"billingStartDelayMonths": 123,
"billingStartDelayType": "HS_BILLING_START_DELAY_DAYS",
"buyerSelectedQuantityMax": 123,
"buyerSelectedQuantityMin": 123,
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"discount": 123,
"discountPercentage": 123,
"effectiveUnitPrice": 123,
"externalId": "<string>",
"images": "<string>",
"isEditablePrice": true,
"isOptional": true,
"isParent": true,
"lineItemCurrencyCode": "<string>",
"mrr": 123,
"parentLineItemId": "<string>",
"positionOnQuote": 123,
"postTaxAmount": 123,
"preDiscountAmount": 123,
"price": 123,
"priceBookId": "<string>",
"pricingModel": "FLAT",
"productId": "<string>",
"productType": "<string>",
"rampKey": "<string>",
"recurringBillingDayOfMonth": 123,
"recurringBillingEndDate": "2023-12-25",
"recurringBillingFrequency": "ANNUALLY",
"recurringBillingNumberOfPayments": 123,
"recurringBillingPeriod": "<string>",
"recurringBillingStartDate": "2023-12-25",
"recurringBillingTerms": "AUTOMATICALLY_RENEW",
"richTextDescription": "<string>",
"sku": "<string>",
"tax": 123,
"taxAmount": 123,
"taxCategory": "<string>",
"taxRateGroupId": "<string>",
"tcv": 123,
"termInMonths": 123,
"tierAmount": 123,
"totalDiscount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"variantId": "<string>"
}
],
"prorating": true,
"status": "ACCEPTED",
"type": "DIRECT",
"createdAt": "2023-11-07T05:31:56Z",
"effectiveDate": "2023-12-25",
"name": "<string>",
"quoteId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}Supported products
Supported products
Required Scopes
Required Scopes
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The unique identifier of the contract change to retrieve.
Response
successful operation
The unique identifier of the contract associated with this change.
An array of line items that represent the difference resulting from the contract change.
Show child attributes
Show child attributes
The unique identifier for the contract change.
An array of changes to line items associated with the contract change.
Show child attributes
Show child attributes
An array of line items that are proposed as part of the contract change.
Show child attributes
Show child attributes
A boolean indicating whether the contract change involves prorating.
The current status of the contract change. Valid values include 'DRAFT', 'PROPOSED', 'ACCEPTED', 'CANCELED', 'FAILED', and 'EXPIRED'.
ACCEPTED, CANCELED, DRAFT, EXPIRED, FAILED, PROPOSED The type of contract change. Valid values include 'DIRECT' and 'QUOTE'.
DIRECT, QUOTE The date and time when the contract change was created, in ISO 8601 format.
The date when the contract change becomes effective, in YYYY-MM-DD format.
The name of the contract change.
The unique identifier of the quote associated with this contract change.
The date and time when the contract change was last updated, in ISO 8601 format.
Was this page helpful?