curl --request GET \
--url https://api.fabric.inc/v3/product-jobs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fabric.inc/v3/product-jobs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fabric.inc/v3/product-jobs', 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.fabric.inc/v3/product-jobs",
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.fabric.inc/v3/product-jobs"
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.fabric.inc/v3/product-jobs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/product-jobs")
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{
"data": [
{
"id": "877f1f77bcf86cd799439087",
"type": "ITEM_VARIANT_EXPORT",
"inputFileId": "327f1f77bcf86cd799439045",
"outputFiles": [
"507f1f77bcf86cd7994390163, 967f1f77bcf86cd799439058"
],
"errorFiles": [
"887f1f77bcf86cd799439011, 997f1f77bcf86cd799439074"
],
"progressTracker": {
"updatedAt": "2023-02-14T22:10:30.618Z",
"totalCount": 100000,
"processedCount": 40000,
"errorCount": 10
},
"status": "COMPLETED",
"statusMessage": "100% completed",
"additionalDetails": {
"itemsCreated": 10,
"itemsUpdated": 10,
"variantsCreated": 10,
"variantsUpdated": 10,
"bundlesCreated": 10,
"bundlesUpdated": 10,
"attributeCreated": 10,
"attributeUpdated": 10,
"categoriesCreated": 10,
"categoriesUpdated": 10,
"collectionCreated": 5,
"collectionUpdated": 10
},
"createdAt": "2021-09-14T22:10:30.618Z",
"completedAt": "2021-09-14T22:10:30.618Z",
"updatedBy": "test@email.com",
"updatedAt": "2021-09-14T22:10:30.618Z"
}
],
"offset": 5,
"limit": 10,
"count": 100
}{
"message": "Request is invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request. Unable to find/create product"
}
]
}{
"type": "UNAUTHORIZED_ERROR",
"message": "Requester is unauthorized"
}{
"type": "REQUEST_DENIED",
"message": "User doesn't have the required permission"
}{
"type": "SERVER_ERROR",
"message": "Internal Server Error"
}Get Jobs Related to Products
Get a paginated list of jobs related to products by specifying the query parameters such as job ids, type. You can refine the results by specifying offset and limit. Note:
1. Query parameter ids can’t be combined with the rest of the query parameters and when it’s specified, pagination isn’t supported.
2. Query parameter inputFileIds supports up to 15 comma-separated file IDs and it can be combined only with the query parameter lastJobOnly. Pagination isn’t supported when this parameter is used.
curl --request GET \
--url https://api.fabric.inc/v3/product-jobs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fabric.inc/v3/product-jobs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fabric.inc/v3/product-jobs', 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.fabric.inc/v3/product-jobs",
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.fabric.inc/v3/product-jobs"
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.fabric.inc/v3/product-jobs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/product-jobs")
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{
"data": [
{
"id": "877f1f77bcf86cd799439087",
"type": "ITEM_VARIANT_EXPORT",
"inputFileId": "327f1f77bcf86cd799439045",
"outputFiles": [
"507f1f77bcf86cd7994390163, 967f1f77bcf86cd799439058"
],
"errorFiles": [
"887f1f77bcf86cd799439011, 997f1f77bcf86cd799439074"
],
"progressTracker": {
"updatedAt": "2023-02-14T22:10:30.618Z",
"totalCount": 100000,
"processedCount": 40000,
"errorCount": 10
},
"status": "COMPLETED",
"statusMessage": "100% completed",
"additionalDetails": {
"itemsCreated": 10,
"itemsUpdated": 10,
"variantsCreated": 10,
"variantsUpdated": 10,
"bundlesCreated": 10,
"bundlesUpdated": 10,
"attributeCreated": 10,
"attributeUpdated": 10,
"categoriesCreated": 10,
"categoriesUpdated": 10,
"collectionCreated": 5,
"collectionUpdated": 10
},
"createdAt": "2021-09-14T22:10:30.618Z",
"completedAt": "2021-09-14T22:10:30.618Z",
"updatedBy": "test@email.com",
"updatedAt": "2021-09-14T22:10:30.618Z"
}
],
"offset": 5,
"limit": 10,
"count": 100
}{
"message": "Request is invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request. Unable to find/create product"
}
]
}{
"type": "UNAUTHORIZED_ERROR",
"message": "Requester is unauthorized"
}{
"type": "REQUEST_DENIED",
"message": "User doesn't have the required permission"
}{
"type": "SERVER_ERROR",
"message": "Internal Server Error"
}Authorizations
S2S access token (JWT) from fabric Identity service (during login)
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
"517fa9dfd42d8b00g1o3k312"
Unique request ID
"263e731c-45c8-11ed-b878-0242ac120002"
Query Parameters
Supports up to 15 comma-separated job IDs. Note:
1. This parameter can't be combined with any other query parameter.
2. Pagination isn't supported when this parameter is used.
Job types Supported job types
ITEM_VARIANT_EXPORT, ITEM_VARIANT_IMPORT, BUNDLE_EXPORT, BUNDLE_IMPORT, ATTRIBUTE_IMPORT, ATTRIBUTE_EXPORT, CATEGORY_IMPORT, CATEGORY_EXPORT, COLLECTION_IMPORT, COLLECTION_EXPORT, ATTRIBUTE_JOB, PRODUCT_JOB, CATEGORY_JOB, COLLECTION_JOB, PRODUCT_BULK_CATEGORY_UPDATE, PRODUCT_DENORM_JOB "ITEM_VARIANT_EXPORT"
Supports up to 15 comma-separated file IDs. Note:
1. This can only be combined with the query parameter lastJobOnly.
2. Pagination isn't supported when this parameter is used.
true: The last job that meets the query parameters
false: Not necessarily the last job Note: Only applicable with type and inputFileIds.
Number of records to skip before returning records. For example, offset=20, limit=10 returns records 21-30.
2
Maximum number of records per page
20
Response
OK
Details of jobs
Show child attributes
Show child attributes
Number of records to skip before returning records. For example, offset=20, limit=10 returns records 21-30.
5
Maximum number of records per page
10
Total number of records
100
Was this page helpful?
