curl --request PUT \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}import requests
url = "https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.hubapi.com/crm-objects/v1/objects/line_items/{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://api.hubapi.com/crm-objects/v1/objects/line_items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$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/crm-objects/v1/objects/line_items/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "description",
"value": "An updated description for this line item. Updating the quantity."
},
{
"name": "quantity",
"value": "5"
},
{
"versions": [
{
"name": "amount",
"value": "137.50",
"timestamp": 0,
"sourceId": "LineItemAmountCalculator",
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "137.50",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": "LineItemAmountCalculator"
},
{
"versions": [
{
"name": "quantity",
"value": "5",
"timestamp": 1525371765869,
"source": "API",
"sourceVid": []
}
],
"value": "5",
"timestamp": 1525371765869,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_lastmodifieddate",
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": null
},
{
"versions": [
{
"name": "price",
"value": "27.50",
"timestamp": 1525359863627,
"source": "API",
"sourceVid": []
}
],
"value": "27.50",
"timestamp": 1525359863627,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "description",
"value": "An updated description for this line item. Updating the quantity.",
"timestamp": 1525371765869,
"source": "API",
"sourceVid": []
},
{
"name": "description",
"value": "A description of this product.",
"timestamp": 1525359863627,
"source": "API",
"sourceVid": []
}
],
"value": "An updated description for this line item. Updating the quantity.",
"timestamp": 1525371765869,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1688960",
"timestamp": 1525371444427,
"source": "API",
"sourceVid": []
}
],
"value": "1688960",
"timestamp": 1525371444427,
"source": "API",
"sourceId": null
}
]Update a line item
Get a list of changes to line item objects. Returns 1000 (or fewer) changes, starting with the least recent change. This endpoint is designed to be polled periodically, allowing your integration to keep track of which objects have been updated so that you can get the details of those updated objects. After each request, the timestamp, changeType, and objectId of the most recently changed record (which will be the last record in the returned list of changes) should be stored by your integration, as you can use those values to get changes that occurred later, allowing you to pull only changes that occurred after your last polling request. All three values must be stored, as the combination of those values is what your integration needs to use to get changes that occurred after your last polling attempt. See the example for more details.
curl --request PUT \
--url https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}import requests
url = "https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.hubapi.com/crm-objects/v1/objects/line_items/{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://api.hubapi.com/crm-objects/v1/objects/line_items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$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/crm-objects/v1/objects/line_items/{id}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/crm-objects/v1/objects/line_items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "description",
"value": "An updated description for this line item. Updating the quantity."
},
{
"name": "quantity",
"value": "5"
},
{
"versions": [
{
"name": "amount",
"value": "137.50",
"timestamp": 0,
"sourceId": "LineItemAmountCalculator",
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "137.50",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": "LineItemAmountCalculator"
},
{
"versions": [
{
"name": "quantity",
"value": "5",
"timestamp": 1525371765869,
"source": "API",
"sourceVid": []
}
],
"value": "5",
"timestamp": 1525371765869,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_lastmodifieddate",
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": null
},
{
"versions": [
{
"name": "price",
"value": "27.50",
"timestamp": 1525359863627,
"source": "API",
"sourceVid": []
}
],
"value": "27.50",
"timestamp": 1525359863627,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "description",
"value": "An updated description for this line item. Updating the quantity.",
"timestamp": 1525371765869,
"source": "API",
"sourceVid": []
},
{
"name": "description",
"value": "A description of this product.",
"timestamp": 1525359863627,
"source": "API",
"sourceVid": []
}
],
"value": "An updated description for this line item. Updating the quantity.",
"timestamp": 1525371765869,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_product_id",
"value": "1688960",
"timestamp": 1525371444427,
"source": "API",
"sourceVid": []
}
],
"value": "1688960",
"timestamp": 1525371444427,
"source": "API",
"sourceId": null
}
]Scope requirements
Scope requirements
レスポンス
Successful response - Get a list of changes to line item objects
The response is of type object.