Skip to main content
GET
/
batch_processes
/
{id}
Show batch process
curl --request GET \
  --url https://api.firstpromoter.com/api/v2/company/batch_processes/{id} \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.firstpromoter.com/api/v2/company/batch_processes/{id}"

headers = {
"Account-ID": "<account-id>",
"Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'Account-ID': '<account-id>', Authorization: 'Bearer <token>'}
};

fetch('https://api.firstpromoter.com/api/v2/company/batch_processes/{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.firstpromoter.com/api/v2/company/batch_processes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Account-ID: <account-id>",
"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.firstpromoter.com/api/v2/company/batch_processes/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Account-ID", "<account-id>")
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.firstpromoter.com/api/v2/company/batch_processes/{id}")
.header("Account-ID", "<account-id>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.firstpromoter.com/api/v2/company/batch_processes/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Account-ID"] = '<account-id>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": 8,
  "status": "stopped",
  "total": 5,
  "selected_total": 5,
  "processed_count": 0,
  "failed_count": 0,
  "action_label": "referral/delete",
  "created_at": "2025-03-26T15:15:34.908Z",
  "updated_at": "2025-03-26T15:15:34.908Z",
  "meta": {},
  "progress": 0,
  "processing_errors": []
}
{
"message": "Invalid user type",
"code": "forbidden"
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys

Headers

Account-ID
string
required

Account ID. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations

Path Parameters

id
integer
required

Batch process id

Response

Successfully retrieved batch process

id
integer
Example:

8

status
enum<string>
Available options:
pending,
in_progress,
completed,
failed,
stopped
Example:

"stopped"

total
integer
Example:

5

selected_total
integer
Example:

5

processed_count
integer
Example:

0

failed_count
integer
Example:

0

action_label
string
Example:

"referral/delete"

created_at
string<date-time>
Example:

"2025-03-26T15:15:34.908Z"

updated_at
string<date-time>
Example:

"2025-03-26T15:15:34.908Z"

meta
object | null
progress
integer
Example:

0

processing_errors
string[]
Example:
[]