Catalog API
GET https://admin.threekit.com/api/catalog/products
Retrieves the list of products. The list will contain all products from the token's organization, and all shared products from any public organizations. For each entry the following information will be available.
- id - Product ID
- name - Product Name
- description - Product Description
- orgId - Organization ID
- proxyId - ID of the asset associated with the product
- keywords - Keywords (If present)
- categories - Categories (If present)
- metadata - The metadata information associated with a product (If present)
REST Endpoint
GET https://admin.threekit.com/api/catalog/products?bearer_token=[bearer_token]&orgId=[orgId]&metadata=[metadata]&publicShare=[publicShare]&name=[name]&nameLike=[nameLike]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId | query | string | false | Retrieve list of products of a particular organization. For the token's organization, it retrieves the list of all products. For a public organization it retrieves the list of shared products. |
metadata | query | string | false | Retrieve information by their metadata. Must be passed in as a stringified JSON. |
publicShare | query | boolean | false | Retrieve public product(s). |
name | query | string | false | Allows filtering of list of items/products by exactly matching name with the value provided in the parameter |
nameLike | query | string | false | Allows filtering of list of items/products by approximately matching name with the value provided in the parameter |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful get request, response body will include the list of products made public | None |
401 | Unauthorized | The token provided is not authorized to make the request or the token is invalid. | None |
403 | Forbidden | No token was provided in the query string of the request | None |
422 | Unprocessable Entity | The metadata query string was either invalid or in the wrong format | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/products \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/products",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"products": [
{
"id": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"name": "ThreeKit Sofa",
"description": "The original ThreeKit sofa, now configurable!",
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"proxyId": "2cc84670-9a79-47ee-a81e-73100389bcc7",
"metadata": {},
"keywords": [
"sofa",
"demo"
],
"categories": []
},
{
"id": "ae774d8d-095a-4374-b10a-dae909860597",
"name": "ThreeKit Table",
"description": "Motorized standing desk that comes in different sizes, tabletops, and leg styles.",
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"proxyId": "fb30e976-8f9a-4484-a9b6-087d15ca8631",
"metadata": {},
"keywords": [],
"categories": []
}
]
}
{
"error": {
"type": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"type": "no_token_found_error",
"message": "No access token provided in the request"
}
}
{
"error": {
"type": "invalid_product_query",
"message": "Invalid Product Search Query"
}
}
GET https://admin.threekit.com/api/catalog/products/{id}
curl --request GET \
--url https://admin.threekit.com/api/catalog/products \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/products",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"products": [
{
"id": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"name": "ThreeKit Sofa",
"description": "The original ThreeKit sofa, now configurable!",
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"proxyId": "2cc84670-9a79-47ee-a81e-73100389bcc7",
"metadata": {},
"keywords": [
"sofa",
"demo"
],
"categories": []
},
{
"id": "ae774d8d-095a-4374-b10a-dae909860597",
"name": "ThreeKit Table",
"description": "Motorized standing desk that comes in different sizes, tabletops, and leg styles.",
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"proxyId": "fb30e976-8f9a-4484-a9b6-087d15ca8631",
"metadata": {},
"keywords": [],
"categories": []
}
]
}
{
"error": {
"type": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"type": "no_token_found_error",
"message": "No access token provided in the request"
}
}
{
"error": {
"type": "invalid_product_query",
"message": "Invalid Product Search Query"
}
}
Retrieves a product from its ID. Only works for products belonging to the token's organization and shared products for any public organization.
REST Endpoint
GET https://admin.threekit.com/api/catalog/products/{id}?bearer_token=[bearer_token]&publicShare=[publicShare]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ID of the product to be retrieved |
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
publicShare | query | boolean | false | Retrieve public product(s). |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns a product and its information | None |
401 | Unauthorized | The token provided is not authorized to make the request or the token is invalid. | None |
403 | Forbidden | User provides the ID of a product which is not set to be publically shared. | None |
404 | Not Found | No product was found for the given ID | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/products/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/products/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/products/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
[
{
"id": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"name": "ThreeKit Sofa",
"description": "The original ThreeKit sofa, now configurable!",
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"sku": {},
"keywords": [
"sofa",
"demo"
],
"categories": []
}
]
{
"error": {
"type": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"type": "unauthorized_request_error",
"message": "Insufficient permissions to view the product"
}
}
{
"error": {
"type": "product_not_found_error",
"message": "Product not found"
}
}
GET https://admin.threekit.com/api/catalog/orgs
curl --request GET \
--url https://admin.threekit.com/api/catalog/products/string \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/products/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/products/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
[
{
"id": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"name": "ThreeKit Sofa",
"description": "The original ThreeKit sofa, now configurable!",
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"sku": {},
"keywords": [
"sofa",
"demo"
],
"categories": []
}
]
{
"error": {
"type": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"type": "unauthorized_request_error",
"message": "Insufficient permissions to view the product"
}
}
{
"error": {
"type": "product_not_found_error",
"message": "Product not found"
}
}
Retrieves a list of all public organizations. The token's organization is always included. Each brand will have the following information available.
- id - Organization ID
- name - Organization Name
- slug - Threekit Platform Organization Slug
- profile - Organization Profile which can contain the following, where provided a) profile.logo - Organization Logo b) profile.name - Organization Name. This can differ from the "name" field c) profile.descriptionShort - The tagline of the organization d) profile.descriptionLong - A brief description of the organization itself e) profile.website - Website of the organization f) profile.contactEmail - Email contact of the organization
REST Endpoint
GET https://admin.threekit.com/api/catalog/orgs?bearer_token=[bearer_token]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful get request, response body will include the list of publically shared organizations and their information, as well as the organization linked to the access token being used. | None |
401 | Unauthorized | The token provided is not authorized to make the request or the token is invalid. | None |
403 | Forbidden | No token was provided in the query string of the request | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/orgs \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/orgs",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/orgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"orgs": [
{
"id": "9ff8984c-e987-49f0-8c9b-7a7eb7dac6c5",
"name": "Organization 1",
"slug": "org 1",
"profile": {}
},
{
"id": "fb8a8c3d-a981-4512-883e-3c101def90f5",
"name": "Organization 2",
"slug": "org-2",
"profile": {
"logo": "<file hash>",
"name": "Organization 2",
"descriptionShort": "We are Org 2",
"descriptionLong": "This is our description of who we are",
"website": "www.example.com",
"contactEmail": "contactus@example.com"
}
}
]
}
{
"error": {
"type": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"type": "no_token_found_error",
"message": "No access token provided in the request"
}
}
GET https://admin.threekit.com/api/catalog/orgs/{id}
curl --request GET \
--url https://admin.threekit.com/api/catalog/orgs \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/orgs",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/orgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"orgs": [
{
"id": "9ff8984c-e987-49f0-8c9b-7a7eb7dac6c5",
"name": "Organization 1",
"slug": "org 1",
"profile": {}
},
{
"id": "fb8a8c3d-a981-4512-883e-3c101def90f5",
"name": "Organization 2",
"slug": "org-2",
"profile": {
"logo": "<file hash>",
"name": "Organization 2",
"descriptionShort": "We are Org 2",
"descriptionLong": "This is our description of who we are",
"website": "www.example.com",
"contactEmail": "contactus@example.com"
}
}
]
}
{
"error": {
"type": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"type": "no_token_found_error",
"message": "No access token provided in the request"
}
}
Retrieves an organization from its ID. Only works for the token's organization, and any public organization.
REST Endpoint
GET https://admin.threekit.com/api/catalog/orgs/{id}?bearer_token=[bearer_token]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ID of the organization to be retrieved |
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns a brand and its information, if it exists | None |
403 | Forbidden | The token provided is not authorized to make the request. | None |
404 | Not Found | No organization was found for the given ID | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/orgs/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/orgs/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/orgs/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
[
{
"id": "6de506fa-c898-4477-9019-37731468a372",
"name": "Organization 2",
"slug": "org-2",
"profile": {
"logo": "<file hash>",
"name": "Organization 2",
"descriptionShort": "We are Org 2",
"descriptionLong": "This is our description of who we are",
"website": "www.example.com",
"contactEmail": "contactus@example.com"
}
}
]
{
"error": {
"type": "unauthorized_request_error",
"message": "You are not authorized to view this organization"
}
}
{
"error": {
"type": "org_not_found",
"message": "Org not found"
}
}
GET https://admin.threekit.com/api/catalog/jobs/{id}
curl --request GET \
--url https://admin.threekit.com/api/catalog/orgs/string \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/orgs/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/orgs/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
[
{
"id": "6de506fa-c898-4477-9019-37731468a372",
"name": "Organization 2",
"slug": "org-2",
"profile": {
"logo": "<file hash>",
"name": "Organization 2",
"descriptionShort": "We are Org 2",
"descriptionLong": "This is our description of who we are",
"website": "www.example.com",
"contactEmail": "contactus@example.com"
}
}
]
{
"error": {
"type": "unauthorized_request_error",
"message": "You are not authorized to view this organization"
}
}
{
"error": {
"type": "org_not_found",
"message": "Org not found"
}
}
Retrieve the details of a job. This includes the job status as well as the successful results of the job, if applicable. If the job type is import, then it attaches the list of successful asset created to the 'output' field in the response. For other job types, it will return the file ID and filename.
REST Endpoint
GET https://admin.threekit.com/api/catalog/jobs/{id}?bearer_token=[bearer_token]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ID of the organization to be retrieved |
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Returns the details of the job and output of the successful run, if applicable | None |
403 | Forbidden | none | None |
404 | Not Found | No organization was found for the given ID | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/jobs/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/jobs/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/jobs/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
[
{
"id": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "Export ExampleAssetName.fbx",
"schedulerState": "active",
"type": "export",
"createdAt": "2019-10-29T18:44:27.697Z",
"updatedAt": "2019-10-29T18:44:27.697Z",
"priority": 0,
"parameters": "{}",
"output": {
"fileId": "a6312460-9550-4414-9fbf-c1b8742fcb6d",
"fileName": "ExampleAssetName.fbx"
}
}
]
{
"error": {
"type": "org_not_found",
"message": "Org not found"
}
}
GET https://admin.threekit.com/api/catalog/events
curl --request GET \
--url https://admin.threekit.com/api/catalog/jobs/string \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/jobs/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/jobs/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
[
{
"id": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "Export ExampleAssetName.fbx",
"schedulerState": "active",
"type": "export",
"createdAt": "2019-10-29T18:44:27.697Z",
"updatedAt": "2019-10-29T18:44:27.697Z",
"priority": 0,
"parameters": "{}",
"output": {
"fileId": "a6312460-9550-4414-9fbf-c1b8742fcb6d",
"fileName": "ExampleAssetName.fbx"
}
}
]
{
"error": {
"type": "org_not_found",
"message": "Org not found"
}
}
Retrieve the list of events for an org. Each event will also contain the asset name and asset metadata, if applicable. Each event will contain the following field.
- id - Id of the event
- eventType - Type of event. Currently the supported event types are - 'product download', 'product session start', 'product session end', 'product configuration set', 'product configuration attribute set', 'product interaction', 'product cart-add', 'product ordered', 'product social share', 'product AR not available', 'product AR offered', 'product AR download', 'product AR mobile transition offered', 'product AR mobile transition completed'
- eventMetadata - User defined metadata for an event
- orgId - ID of the org linked to the event
- assetId - Id of the asset linked to the event, if applicable
- userId - Id of the user linked to the session for which events are being stored
- sessionId - Id of the session for which the events are being stored
- configId - Id of the configuration of asset, if applicable, linked to the event
- configuration - Full configuration object of the asset, if applicable, linked to the event
- device - Information about the device linked to the event. This is the User-Agent header present in the request
- referer - Information about the webpage linked to the event. This is the referer header present in the request
- assetName - The name of the asset linked to the event, if the asset exists
- assetMetadata - The metadata of the asset linked to the event, if the asset exists
- createdAt - Event creation date
REST Endpoint
GET https://admin.threekit.com/api/catalog/events?bearer_token=[bearer_token]&orgId=[orgId]&metadata=[metadata]&device=[device]&referer=[referer]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId | query | string | false | Retrieve list of products of a particular organization. For the token's organization, it retrieves the list of all products. For a public organization it retrieves the list of shared products. |
metadata | query | string | false | Retrieve information by their metadata. Must be passed in as a stringified JSON. |
device | query | string | false | Retrieve events with a specific user agent header. Must be converted to an escaped query string. |
referer | query | string | false | Retrieve events for for a specific page(referer header). This can also be used to fetch all events for a specific origin header. Must be converted to an escpaed query string. |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of events for a specific org. Each event will contain the asset name and metadata, if applicable | None |
403 | Forbidden | Request to access events of an invalid or unauthorized org | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/events \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/events",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"events": [
{
"id": "78aa0bcc-ed1f-4156-958c-3b7cffbae606",
"eventType": "product AR not available",
"eventMetadata": {},
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"assetId": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"assetName": "Example Product A",
"assetMetadata": {},
"configId": "94e932d8-4edf-4198-a8c4-097fab9402d5",
"configuration": {},
"userId": null,
"sessionId": "b6f1b4b7-fd44-461d-8b90-79561a716370",
"device": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
"referer": "https://examplewebsite.com/examplepagea",
"createdAt": "2020-07-30T15:27:23.058Z"
}
]
}
{
"error": {
"type": "unauthorized_request_error",
"message": "You are not authorized to view this organization"
}
}
GET https://admin.threekit.com/api/catalog/events/{id}
curl --request GET \
--url https://admin.threekit.com/api/catalog/events \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/events",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"events": [
{
"id": "78aa0bcc-ed1f-4156-958c-3b7cffbae606",
"eventType": "product AR not available",
"eventMetadata": {},
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"assetId": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"assetName": "Example Product A",
"assetMetadata": {},
"configId": "94e932d8-4edf-4198-a8c4-097fab9402d5",
"configuration": {},
"userId": null,
"sessionId": "b6f1b4b7-fd44-461d-8b90-79561a716370",
"device": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
"referer": "https://examplewebsite.com/examplepagea",
"createdAt": "2020-07-30T15:27:23.058Z"
}
]
}
{
"error": {
"type": "unauthorized_request_error",
"message": "You are not authorized to view this organization"
}
}
Retrieve the details of an event. This includes the asset name and asset metadata, if applicable. Each event contains the following field.
- id - Id of the event
- eventType - Type of event. Currently the supported event types are - 'product download', 'product session start', 'product session end', 'product configuration set', 'product configuration attribute set', 'product interaction', 'product cart-add', 'product ordered', 'product social share', 'product AR not available', 'product AR offered', 'product AR download', 'product AR mobile transition offered', 'product AR mobile transition completed'
- eventMetadata - User defined metadata for an event
- orgId - ID of the org linked to the event
- assetId - Id of the asset linked to the event, if applicable
- userId - Id of the user linked to the session for which events are being stored
- sessionId - Id of the session for which the events are being stored
- configId - Id of the configuration of asset, if applicable, linked to the event
- configuration - Full configuration object of the asset, if applicable, linked to the event
- device - Information about the device linked to the event. This is the User-Agent header present in the request
- referer - Information about the webpage linked to the event. This is the referer header present in the request
- assetName - The name of the asset linked to the event, if the asset exists
- assetMetadata - The metadata of the asset linked to the event, if the asset exists
- createdAt - Event creation date
REST Endpoint
GET https://admin.threekit.com/api/catalog/events/{id}?bearer_token=[bearer_token]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ID of the event to be retrieved |
bearer_token | query | string | false | Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Fetch a specific event by its id | None |
404 | Not Found | Request to fetch an event using an invalid id | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/catalog/events/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/events/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/events/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
[
{
"id": "78aa0bcc-ed1f-4156-958c-3b7cffbae606",
"eventType": "product AR not available",
"eventMetadata": {},
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"assetId": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"assetName": "Example Product A",
"assetMetadata": {},
"configId": "94e932d8-4edf-4198-a8c4-097fab9402d5",
"configuration": {},
"userId": null,
"sessionId": "b6f1b4b7-fd44-461d-8b90-79561a716370",
"device": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
"referer": "https://examplewebsite.com/examplepagea",
"createdAt": "2020-07-30T15:27:23.058Z"
}
]
{
"error": {
"type": "event_not_found",
"message": "Event not found"
}
}
curl --request GET \
--url https://admin.threekit.com/api/catalog/events/string \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/catalog/events/string",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/catalog/events/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
[
{
"id": "78aa0bcc-ed1f-4156-958c-3b7cffbae606",
"eventType": "product AR not available",
"eventMetadata": {},
"orgId": "d7e8d7a2-93b1-43d5-bf20-32195396598c",
"assetId": "6e4b65b7-862b-4cd9-b183-c07d82d5beed",
"assetName": "Example Product A",
"assetMetadata": {},
"configId": "94e932d8-4edf-4198-a8c4-097fab9402d5",
"configuration": {},
"userId": null,
"sessionId": "b6f1b4b7-fd44-461d-8b90-79561a716370",
"device": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
"referer": "https://examplewebsite.com/examplepagea",
"createdAt": "2020-07-30T15:27:23.058Z"
}
]
{
"error": {
"type": "event_not_found",
"message": "Event not found"
}
}