curl --request GET \
--url https://api.fabric.inc/v3/offers-imports-jobs/{jobId} \
--header 'Authorization: Bearer <token>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>'import requests
url = "https://api.fabric.inc/v3/offers-imports-jobs/{jobId}"
headers = {
"x-fabric-tenant-id": "<x-fabric-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-fabric-tenant-id': '<x-fabric-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.fabric.inc/v3/offers-imports-jobs/{jobId}', 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/offers-imports-jobs/{jobId}",
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>",
"x-fabric-tenant-id: <x-fabric-tenant-id>"
],
]);
$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/offers-imports-jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-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.fabric.inc/v3/offers-imports-jobs/{jobId}")
.header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/offers-imports-jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "643eda1bd4c15c0008b4fb67",
"startAt": "2023-04-18T17:57:07.260Z",
"fileName": "coupon/5f689caa4216e7000750d1ef/stg02/1681840413797-coupon.csv",
"type": "PRICE",
"details": [
{
"timestamp": "2023-04-18T17:57:07.260Z",
"isSuccess": true,
"message": "Import coupon codes job started: Tue Apr 18 2023 17:57:47 GMT+0000 (Coordinated Universal Time)"
}
],
"createdAt": "2019-08-20T14:15:22.000Z",
"updatedAt": "2019-08-20T14:15:22.000Z",
"endAt": "2023-04-18T17:57:54.445Z",
"errorFileName": "coupon/5f689caa4216e7000750d1ef/stg02/1681840413797-error-coupon.csv",
"errors": [
{
"message": "Price should always be >= 0.00",
"count": 8
}
],
"totalJob": 10,
"completedJob": 5,
"totalRowsCount": 100,
"insertedRowsCount": 60,
"failedRowsCount": 40
}{
"type": "TENANT_HEADER_REQUIRED",
"message": "x-fabric-tenant-id header is required"
}{
"type": "UNAUTHORIZED",
"message": "Invalid credentials"
}{
"type": "IMPORT_JOB_NOT_FOUND",
"message": "Import job not found."
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}Get import job by ID
Get details of a specific import job by job ID.
curl --request GET \
--url https://api.fabric.inc/v3/offers-imports-jobs/{jobId} \
--header 'Authorization: Bearer <token>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>'import requests
url = "https://api.fabric.inc/v3/offers-imports-jobs/{jobId}"
headers = {
"x-fabric-tenant-id": "<x-fabric-tenant-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-fabric-tenant-id': '<x-fabric-tenant-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.fabric.inc/v3/offers-imports-jobs/{jobId}', 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/offers-imports-jobs/{jobId}",
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>",
"x-fabric-tenant-id: <x-fabric-tenant-id>"
],
]);
$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/offers-imports-jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-fabric-tenant-id", "<x-fabric-tenant-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.fabric.inc/v3/offers-imports-jobs/{jobId}")
.header("x-fabric-tenant-id", "<x-fabric-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/offers-imports-jobs/{jobId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-fabric-tenant-id"] = '<x-fabric-tenant-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "643eda1bd4c15c0008b4fb67",
"startAt": "2023-04-18T17:57:07.260Z",
"fileName": "coupon/5f689caa4216e7000750d1ef/stg02/1681840413797-coupon.csv",
"type": "PRICE",
"details": [
{
"timestamp": "2023-04-18T17:57:07.260Z",
"isSuccess": true,
"message": "Import coupon codes job started: Tue Apr 18 2023 17:57:47 GMT+0000 (Coordinated Universal Time)"
}
],
"createdAt": "2019-08-20T14:15:22.000Z",
"updatedAt": "2019-08-20T14:15:22.000Z",
"endAt": "2023-04-18T17:57:54.445Z",
"errorFileName": "coupon/5f689caa4216e7000750d1ef/stg02/1681840413797-error-coupon.csv",
"errors": [
{
"message": "Price should always be >= 0.00",
"count": 8
}
],
"totalJob": 10,
"completedJob": 5,
"totalRowsCount": 100,
"insertedRowsCount": 60,
"failedRowsCount": 40
}{
"type": "TENANT_HEADER_REQUIRED",
"message": "x-fabric-tenant-id header is required"
}{
"type": "UNAUTHORIZED",
"message": "Invalid credentials"
}{
"type": "IMPORT_JOB_NOT_FOUND",
"message": "Import job not found."
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
24The sales channel ID.
"12"
A unique request ID.
"263e731c-45c8-11ed-b878-0242ac120002"
Path Parameters
Import job ID that's created when the import process starts
"606469bdf4fb7900085f1761"
Response
OK
The details of the import job.
A 24-character system-generated ID of the import job.
"643eda1bd4c15c0008b4fb67"
The start time of the import job, in UTC format.
"2023-04-18T17:57:07.260Z"
The name of the uploaded file
"coupon/5f689caa4216e7000750d1ef/stg02/1681840413797-coupon.csv"
The import job type for which details are retrieved.
PRICE, PRICE_RANGE, PRICELIST, PROMOTION, COUPON, COUPON_CODE, REDEMPTION "PRICE"
Represents the steps involved in the import process.
Show child attributes
Show child attributes
Record's creation time
"2019-08-20T14:15:22.000Z"
Record's last updated time
"2019-08-20T14:15:22.000Z"
The end time of the import job, in UTC format.
"2023-04-18T17:57:54.445Z"
Error file name if any error
"coupon/5f689caa4216e7000750d1ef/stg02/1681840413797-error-coupon.csv"
The errors details.
Show child attributes
Show child attributes
Indicates the total number of processes required to upload the entire file. For internal processing only.
10
Indicates the total number of completed processes for uploading the entire file. For internal processing only.
5
Indicates the total number of rows in the CSV file. For internal processing only.
100
Indicates the total number of rows in the CSV file that were processed successfully. For internal processing only.
60
Indicates the total number of rows in the CSV file that failed to process. For internal processing only.
40
Was this page helpful?
