Documents - Retrieve Orphans

Retrieve Orphan Documents

👍

Objective

This cookbook describes how to retrieve your documents that are not associated with classifications.

Documents with no association to a classification are known as orphans.

Updates to your classification hierarchy may create orphan documents which you can easily retrieve with the Quable PIM API.

Orphan document illustration

Process Overview

Retrieving your orphan documents is accomplished with a simple GET request to Quable PIM API.

Retrieve Orphans

To retrieve all orphan documents, you can send the request without any attributes.

URL Parameters

FieldValueDescription
Endpoint/api_1.php/articles/orphelinsAPI v4 endpoint
HTTP MethodGET
📘

Note

This endpoint provides a paginated list of orphan documents.

Request Body

Pagination Attributes

🚧

Important

In order to paginate the results, both pagination attributes must be used.

FieldTypeDescription
limitintegerThe number of items to retrieve.
startintegerThe offset in the list of orphan documents to start from. Note: Counting begins at 0.

Example

This example is a call to retrieve 30 orphan documents, starting from 60 in the total list.

import requests
import json

url = "https://{{YOUR-PIM}}.quable.com/api_1.php/articles/orphelins?start=60&limit=30"

payload = json.dumps({})
headers = {
		'Content-Type': 'application/json',
		'Authorization': 'Bearer OAUTH_ACCESS_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload, timeout=30)

print(response.text)

Response

The JSON response to a successful request includes:

Response Header

FieldValueTypeDescription
HTTP Response Code200integerThe request was successful.

Response Body

FieldTypeDescription
recordsintegerThe number of records in the response.
rowsarray(string)An array of document information.
successbooleanTrue if everything is ok, else False.
totalintegerThe total number of orphan documents in Quable PIM.

Example Response

{
	"total": 1638,
	"records": 30,
	"rows": [{
			"id": 28735,
			"code": "PRODUCT_23455768",
			"active": true,
			"name": "Bathrobe"
		},
		{
			"id": 28736,
			"code": "PRODUCT_2423",
			"active": true,
			"name": "Blue jean"
		},
		{
			"id": 28737,
			"code": "PRODUCT_7543",
			"active": true,
			"name": "Pink dress"
		}
	],
	"success": true
}