Create a timeline comment
curl --request POST \
--url https://app.supercycle.com/api/v1/timeline_comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timelineEvent": {
"eventableId": 123,
"message": "<string>"
}
}
'import requests
url = "https://app.supercycle.com/api/v1/timeline_comments"
payload = { "timelineEvent": {
"eventableId": 123,
"message": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({timelineEvent: {eventableId: 123, message: '<string>'}})
};
fetch('https://app.supercycle.com/api/v1/timeline_comments', 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://app.supercycle.com/api/v1/timeline_comments",
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([
'timelineEvent' => [
'eventableId' => 123,
'message' => '<string>'
]
]),
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://app.supercycle.com/api/v1/timeline_comments"
payload := strings.NewReader("{\n \"timelineEvent\": {\n \"eventableId\": 123,\n \"message\": \"<string>\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://app.supercycle.com/api/v1/timeline_comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timelineEvent\": {\n \"eventableId\": 123,\n \"message\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.supercycle.com/api/v1/timeline_comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timelineEvent\": {\n \"eventableId\": 123,\n \"message\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "comment",
"message": "<string>"
}{
"error": "Resource does not belong to the shop"
}{
"errors": [
"Invalid request body"
]
}{
"error": "Rate limit exceeded. Retry after 42 seconds."
}TimelineComments
Create a timeline comment
Creates a new comment associated with a timeline event for a specific resource in a shop. The resource must belong to the authenticated shop.
POST
/
timeline_comments
Create a timeline comment
curl --request POST \
--url https://app.supercycle.com/api/v1/timeline_comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timelineEvent": {
"eventableId": 123,
"message": "<string>"
}
}
'import requests
url = "https://app.supercycle.com/api/v1/timeline_comments"
payload = { "timelineEvent": {
"eventableId": 123,
"message": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({timelineEvent: {eventableId: 123, message: '<string>'}})
};
fetch('https://app.supercycle.com/api/v1/timeline_comments', 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://app.supercycle.com/api/v1/timeline_comments",
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([
'timelineEvent' => [
'eventableId' => 123,
'message' => '<string>'
]
]),
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://app.supercycle.com/api/v1/timeline_comments"
payload := strings.NewReader("{\n \"timelineEvent\": {\n \"eventableId\": 123,\n \"message\": \"<string>\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://app.supercycle.com/api/v1/timeline_comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timelineEvent\": {\n \"eventableId\": 123,\n \"message\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.supercycle.com/api/v1/timeline_comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"timelineEvent\": {\n \"eventableId\": 123,\n \"message\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "comment",
"message": "<string>"
}{
"error": "Resource does not belong to the shop"
}{
"errors": [
"Invalid request body"
]
}{
"error": "Rate limit exceeded. Retry after 42 seconds."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Response
Successfully created timeline comment
Numeric ID of the timeline event.
Numeric ID of the resource associated with the event.
Type of the resource (e.g., Item, Rental, ReturnOrder).
Type of the timeline event.
Available options:
comment The comment message associated with the timeline event.
Was this page helpful?
⌘I