Bulk Links by lookup key
POST/links/bulk/:lookupKey
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.
When using the bulk sourceId
endpoint, the link resources are identified by Propeller sourceId
and source
.
Fields
Name | Required |
---|---|
type | yes |
subtype | yes |
isDefault | no Defaults to false |
isActive | no Defaults to true |
from | yes |
to | yes |
priority | no Default to 0 |
Request
Path Parameters
From and to resources lookup keys. id
and sourceId
are supported.
- application/json
Body
Array [
]
links
object[]
from
object
to
object
Responses
- 200
- 400
Bulk Links by Id - 200 / Bulk Links by Id - 200 (Product cross/upsell use case) / Bulk Links by sourceId - 200 (Product cross/upsell use case)
Response Headers
Connection
string
Content-Length
string
Date
string
Keep-Alive
string
Return-Format
string
- application/json
- Schema
- Example (from schema)
- Bulk Links by Id - 200
- Bulk Links by Id - 200 (Product cross/upsell use case)
- Bulk Links by sourceId - 200 (Product cross/upsell use case)
Schema
Array [
]
data
object[]
from
object
to
object
{
"data": [
{
"error": "Customer with id [19815] not found",
"from": {
"class": "customer",
"id": 19815
},
"lookupKey": "id",
"success": false,
"to": {
"class": "company",
"id": 204
}
},
{
"from": {
"class": "contact",
"id": 14575
},
"id": 543843,
"lookupKey": "id",
"success": true,
"to": {
"class": "company",
"id": 150
}
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"error": "Customer with id [19815] not found",
"from": {
"class": "customer",
"id": 19815
},
"lookupKey": "id",
"success": false,
"to": {
"class": "company",
"id": 204
}
},
{
"from": {
"class": "contact",
"id": 14575
},
"id": 543843,
"lookupKey": "id",
"success": true,
"to": {
"class": "company",
"id": 150
}
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"from": {
"class": "product",
"id": 227293
},
"id": 543973,
"lookupKey": "id",
"success": true,
"to": {
"class": "product",
"id": 227294
}
},
{
"from": {
"class": "product",
"id": 227293
},
"id": 543974,
"lookupKey": "id",
"success": true,
"to": {
"class": "product",
"id": 227292
}
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"from": {
"class": "product",
"language": "NL",
"source": "TECHDATA",
"sourceId": "NCABD7000411"
},
"id": 543975,
"lookupKey": "sourceId",
"success": true,
"to": {
"class": "product",
"language": "NL",
"source": "TECHDATA",
"sourceId": "NCABD70004"
}
},
{
"from": {
"class": "product",
"language": "NL",
"source": "TECHDATA",
"sourceId": "NCABD7000411"
},
"id": 543976,
"lookupKey": "sourceId",
"success": true,
"to": {
"class": "product",
"language": "NL",
"source": "TECHDATA",
"sourceId": "NCABD70004123"
}
}
],
"messages": [
"Completed"
],
"total": 2
}
Bulk Links by lookup key - 400 (invalid lookup key) / Bulk Links by sourceId - 400 (schema validation error)
Response Headers
Connection
string
Content-Length
string
Date
string
Return-Format
string
- application/json
- Schema
- Example (from schema)
- Bulk Links by lookup key - 400 (invalid lookup key)
- Bulk Links by sourceId - 400 (schema validation error)
Schema
error
object
{
"error": {
"code": 10006,
"messages": [
"Invalid lookup key [ids], key must contain one of the following values: [id,sourceId]"
],
"moreInfo": "https://www.propel.us/docs/errors/10006",
"status": 400,
"type": "InvalidLookupKey"
}
}
{
"error": {
"code": 10006,
"messages": [
"Invalid lookup key [ids], key must contain one of the following values: [id,sourceId]"
],
"moreInfo": "https://www.propel.us/docs/errors/10006",
"status": 400,
"type": "InvalidLookupKey"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/links/0/type: accessories-dummy is not a valid enum value"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}