Documents - Retrieve Orphans

👍

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.
14021402

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
Endpoint/api_1.php/articles/orphelins

API v4 endpoint

📘

This endpoint provides a paginated list of orphan documents.

HTTP MethodGET
Request Body
Pagination Attributes

🚧

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

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)

The JSON response to a successful request includes:

Response Header
HTTP Response Code200 integerThe request was successful.
Response Body
Document Informationrecords integer The number of records in the response.
rowsarray(string)An array of document information.
success booleanTrue if everything is ok, else False.
totalintegerThe total number of orphan documents in Quable PIM.
Example
{
    "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
}