Get compliance report details - Fabric
Get compliance report details
cURL
curl --request GET \
--url https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{id}/ \
--header 'Authorization: Bearer <token>'
import requests
url = "https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{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://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{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://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{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://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{id}/")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'
url = URI("https://marketplace-api.fabric.inc/v1/retailers/{retailer_id}/compliance-reports/{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
Response Example
{
"name": "Quarterly Financial Compliance",
"start": "2024-01-01T00:00:00Z",
"id": 12345,
"description": "This report outlines the financial compliance for Q1 2024.",
"interval": "quarterly",
"periods": "Q1, Q2"
}
Authorizations
- Authorization:
Bearer <token> - required header for authentication.
Path Parameters
- retailer_id (integer): The unique retailer ID. Example:
1001
- id (integer): The unique identifier of the compliance report. Example:
3003
Response
- 200 - application/json
- name (string): The name of the compliance report. Example: "Quarterly Financial Compliance"
- start (string): The start date and time of the compliance report in UTC format. Example: "2024-01-01T00:00:00Z"
- id (integer): Unique identifier for the compliance report. Example:
12345
- description (string|null): A detailed description of the compliance report. Example: "This report outlines the financial compliance for Q1 2024."
- interval (string): The interval at which the compliance report is generated. Example: "quarterly"
- periods (string): Periods for which the compliance report is applicable. Example: "Q1, Q2"