Skip to main content
GET
/
api
/
v1
/
batch-jobs
/
{batch_job_id}
Get batch job detail
curl --request GET \
  --url https://api.example.com/api/v1/batch-jobs/{batch_job_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.example.com/api/v1/batch-jobs/{batch_job_id}"

headers = {"Authorization": "Bearer <token>"}

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

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

fetch('https://api.example.com/api/v1/batch-jobs/{batch_job_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.example.com/api/v1/batch-jobs/{batch_job_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 => [
"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.example.com/api/v1/batch-jobs/{batch_job_id}"

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.example.com/api/v1/batch-jobs/{batch_job_id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/batch-jobs/{batch_job_id}")

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
{
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "failed_items": 123,
  "failure_count": 123,
  "has_error_csv": true,
  "id": "<string>",
  "processed_items": 123,
  "completed_at": "2023-11-07T05:31:56Z",
  "error_csv_url": "<string>",
  "input_file_name": "<string>",
  "input_file_url": "<string>",
  "total_items": 123
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

batch_job_id
string<MeteroidId>
required

Batch job ID

Example:

"bjob_7n42DGM5Tflk9n8mt7Fhc7"

Response

Batch job detail

created_at
string<date-time>
required
created_by
string<uuid>
required
failed_items
integer<int32>
required
failure_count
integer<int64>
required
has_error_csv
boolean
required
id
string<MeteroidId>
required
Example:

"bjob_7n42DGM5Tflk9n8mt7Fhc7"

job_type
enum<string>
required
Available options:
EVENT_CSV_IMPORT,
CUSTOMER_CSV_IMPORT,
SUBSCRIPTION_CSV_IMPORT,
SUBSCRIPTION_PLAN_MIGRATION
processed_items
integer<int32>
required
status
enum<string>
required
Available options:
PENDING,
CHUNKING,
PROCESSING,
COMPLETED,
COMPLETED_WITH_ERRORS,
FAILED,
CANCELLED
completed_at
string<date-time> | null
error_csv_url
string | null
input_file_name
string | null
input_file_url
string | null
total_items
integer<int32> | null