Relations

Delete relations

Delete relations from a storage.

SecurityapiKey
Request
path Parameters
storageId
required
string
Request Body schema: application/json
required
Array of objects (BusinessPartnerRelationDelete)

List of relations to delete.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

Not Found

post/v4/storages/{storageId}/relations/delete
Request samples
application/json
{
  • "relations": [
    ]
}
Response samples
application/json
{
  • "deleted": "10"
}

Initialize Storage relations

Initialize relations in a Business Partner Storage.

SecurityapiKey
Request
path Parameters
storageId
required
string

storageId

Responses
204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

post/v4/storages/{storageId}/relations
Request samples

Read Relations

Read a page of relations from a Business Partner Storage.

SecurityapiKey
Request
path Parameters
storageId
required
string

storageId

query Parameters
classTechnicalKey
string (BusinessPartnerRelationClassTechnicalKey)

Filter by class technical key. List of available (classes)[https://meta.cdq.com/Business_partner/relation/class].

Example: classTechnicalKey=BUSINESS_PARTNER_RELATION_CLASS_CDQ_HIERARCHY
dataSource
string

Filter by dataSource name or id

endedAfter
string

Find relations which endedAt is after given date.

Example: endedAfter=2019-12-31T16:47:00Z
endedBefore
string

Find relations which endedAt is before given date.

Example: endedBefore=2019-12-31T16:47:00Z
externalId
string

Filter by externalId

featureOff
Array of strings (RelationsReadFeatureParam)

Features to be turned off:

  • SHOW_BUSINESS_PARTNER_INFORMATION - Allows to switch fetching Business Partner details to improve performance. By default, turned on.
Items Value: Description
SHOW_BUSINESS_PARTNER_INFORMATION

Allows to switch fetching business partner details to improve performance. By default, turned on.

Example: featureOff=SHOW_BUSINESS_PARTNER_INFORMATION
featureOn
Array of strings (RelationsReadFeatureParam)

Features to be turned on.

Items Value: Description
SHOW_BUSINESS_PARTNER_INFORMATION

Allows to switch fetching business partner details to improve performance. By default, turned on.

Example: featureOn=SHOW_BUSINESS_PARTNER_INFORMATION
limit
integer <int32> >= 1
Default: 500

Number of items to be returned on the page.

Example: limit=100
startAfter
string

Only items with an ID greater than the given one will be retrieved.

When nextStartAfter provided in the response, should be used instead of the ID as an indicator for a next page.

Example: startAfter=10
startedAfter
string

Find relations which startedAt is after given date.

Example: startedAfter=2019-12-31T16:47:00Z
startedBefore
string

Find relations which startedAt is before given date

Example: startedBefore=2019-12-31T16:47:00Z
type
string (BusinessPartnerRelationTypeTechnicalKey)

Filter by type.

Example: type=COMMERCIAL_ULTIMATE
Responses
200

OK

get/v4/storages/{storageId}/relations
Request samples
Response samples
application/json
{
  • "startAfter": "5712566172571652",
  • "nextStartAfter": "5712566172571652",
  • "limit": "100",
  • "total": "67",
  • "values": [
    ]
}

Upsert Business Partner Relations

Upsert Business Partner Relations. When inserting a new relation, 'startedAt' date is set to current date and 'endedAt' date is set to null. When updating a relation, 'endedAt' date is set to current date in existing relation and a new relation is created."

SecurityapiKey
Request
path Parameters
storageId
required
string

storageId

Request Body schema: application/json
required

Parameters for Relations Upsert Request.

required
Array of objects (BusinessPartnerRelation) [ 1 .. 1000 ] items

Batch of Business Partner relations.

Responses
200

OK

400

Bad Request

401

Unauthorized

put/v4/storages/{storageId}/relations
Request samples
application/json
{
  • "relations": [
    ]
}
Response samples
application/json
{
  • "numberOfProvidedRelations": "500",
  • "numberOfInserts": "500",
  • "numberOfUpdates": "500",
  • "numberOfFailed": "500",
  • "failures": [
    ]
}