Links
Propeller supports different types of resources, such as categories, products, usergroups, users, companies, etc. These resources can be linked to one another to cover different use cases, from enriching products with other similar products, accessories, etc. to indicating an account manager user of a company. These relationship types are predefined and are listed below. The Link API can be used to consult, create, update or delete a link between two resources.
Link types
Type | Subtype | From resource | To resource | Use case |
---|---|---|---|---|
accessories | * | * | * | Typically used for products enrichment |
accessoryfor | * | * | * | Typically used for products enrichment |
related | * | * | * | Typically used for products enrichment |
relatedfor | * | * | * | Typically used for products enrichment |
alternatives | * | * | * | Typically used for products enrichment |
options | * | * | * | Typically used for products enrichment |
parts | * | * | * | Typically used for products enrichment |
partfor | * | * | * | Typically used for products enrichment |
account | manage | user | company | User which is an account manager of a company |
account | manage | contact | company | Contact which is an account manager of a company |
*any can be used
Link Lookup keys
Key | Type | Description |
---|---|---|
id | integer | Propeller link id, auto-generated |
Fields
Name | Description | Type |
---|---|---|
type | Link type | string |
subtype | Link subtype | string |
isDefault | Indicates whether the to resource is the default one of the particular type/ subtype for the from resource | boolean |
isActive | Indicates whether the link is active, same as non existing if not | boolean |
from | The resource for which relationships are created | LinkResource |
to | The resource to which relationships are created | LinkResource |
priority | The order/ priority of the link in relation to other links of the same type, subtype, from and to resource | int |
Link Resource
A link resource is a JSON object used for identifying resources that need to be linked. It has two properties: to indicate the class of the resource (product, user, category, etc.) and it's id.
{
"class": "product",
"id": 56987
}
Link Errors
This section describes error codes specific for the Link
resource.
Code | Error Type | Status Code | Message | Reason |
---|---|---|---|---|
18001 | LinkInvalidClass | 400 | No links defined for class | The link type/ subtype combination is not valid for the from/ to class |
18002 | LinkInvalidType | 400 | Invalid link type/ subtype | Invalid link type or subtype. No such link predefined |
18003 | LinkNotFound | 404 | Link not found | Link does not exist |
📄️ Bulk Links by lookup key
The bulk endpoints offer an efficient way of importing/updating large amounts of links with just a single API call. When using the bulk `id` endpoint, the link resources are identified by Propeller `id`. If a link for resources with such `id` doesn't already exist, it will be created. If it does exist, it will be updated.
📄️ Search Links
Retrieves a list of links by using the search fields below:
📄️ Get Link by Id
Use this endpoint to retrieve link details by link id.
📄️ Delete Link by Id
Use this endpoint to delete a link by Id.
📄️ Update Link by Id
Use this endpoint to update a link by Id.