Start collection refresh
curl --request POST \
--url https://api.sequin.io/v1/collections/{credential_id}/refresh/start \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequin.io/v1/collections/{credential_id}/refresh/start"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequin.io/v1/collections/{credential_id}/refresh/start', 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.sequin.io/v1/collections/{credential_id}/refresh/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.sequin.io/v1/collections/{credential_id}/refresh/start"
req, _ := http.NewRequest("POST", 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.post("https://api.sequin.io/v1/collections/{credential_id}/refresh/start")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequin.io/v1/collections/{credential_id}/refresh/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credential_id": "5f4b3b3e-4e3e-4b3b-8e3e-4b3e4b3e4b3e",
"last_started_at": "2024-07-01T00:00:00Z",
"last_succeeded_at": "2024-06-31T23:24:09Z",
"status": "processing",
"error": null
}
Collections
Start collection refresh
This endpoint starts a refresh of a credential’s collections.
POST
/
v1
/
collections
/
{credential_id}
/
refresh
/
start
Start collection refresh
curl --request POST \
--url https://api.sequin.io/v1/collections/{credential_id}/refresh/start \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequin.io/v1/collections/{credential_id}/refresh/start"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequin.io/v1/collections/{credential_id}/refresh/start', 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.sequin.io/v1/collections/{credential_id}/refresh/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.sequin.io/v1/collections/{credential_id}/refresh/start"
req, _ := http.NewRequest("POST", 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.post("https://api.sequin.io/v1/collections/{credential_id}/refresh/start")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequin.io/v1/collections/{credential_id}/refresh/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credential_id": "5f4b3b3e-4e3e-4b3b-8e3e-4b3e4b3e4b3e",
"last_started_at": "2024-07-01T00:00:00Z",
"last_succeeded_at": "2024-06-31T23:24:09Z",
"status": "processing",
"error": null
}
Request parameters
string
required
ID of the credential.
Response fields
string
ID of the credential.
string
The time Sequin last started the latest refresh of the credential’s collections. A datetime in ISO 8601 format.
string
The time Sequin last successfully refreshed the credential’s collections. A datetime in ISO 8601 format.
string
The status of the last refresh task. One of
processing, succeeded, or failed.processing indicates Sequin is currently refreshing the credential’s collections.object
If the latest refresh attempt failed (i.e.
state is failed), this field contains details about the error.{
"credential_id": "5f4b3b3e-4e3e-4b3b-8e3e-4b3e4b3e4b3e",
"last_started_at": "2024-07-01T00:00:00Z",
"last_succeeded_at": "2024-06-31T23:24:09Z",
"status": "processing",
"error": null
}
⌘I

