latestOpenAPI 3.0.12026-08-20112309904.6 KB

466169815b78

Collections - Targets

Add targets to collection

Add multiple targets (suppliers, customers, etc.) to a collection.

Targets are identified by their unique prewaveTargetId (target's infotag_id). If a target is already in the collection, it will be ignored (no duplicate entries). All target IDs must be valid and accessible to the user.

This operation is atomic - either all targets are added successfully, or none are added.

Getting Collection ID:

  • To find available collections and their IDs, use the Collections Management API:
    • GET /public/v1/collections - List all collections accessible to you (returns collections with id field)
    • GET /public/v1/collections/{collectionId} - Get a specific collection by ID
  • The id field in collection responses is the collectionId used in this endpoint's path parameter

Getting Target IDs (prewaveTargetId):

  • To get current target IDs, use the Supplier Sites API:
    • GET /public/v2/suppliers/sites - List all suppliers with their current prewaveTargetId values
    • GET /public/v2/suppliers/sites/find-by-identifier?prewaveId={prewaveTargetId} - Get a specific supplier by prewaveTargetId
  • The prewaveTargetId field in supplier responses is the target ID used in the request body

Important: Target ID Stability

⚠️ The target id (prewaveTargetId) may change due to target merges or data consolidation. When this happens:

  • The target's edge numbers, edge data, and collection memberships are automatically moved to a new target
  • Using an outdated target ID will result in a 404 Not Found error

💡 Best Practice for Integrations:

  • Always refresh target IDs before adding targets to a collection by calling GET /public/v2/suppliers/sites to get the latest prewaveTargetId values
  • Match suppliers by supplier identifiers (your external system identifiers) rather than storing prewaveTargetId values long-term
  • If you receive a 404 Not Found error, use GET /public/v2/suppliers/sites to find the current prewaveTargetId by matching your supplier identifiers

Audit Trail:

  • All changes are audited for compliance and tracking purposes
  • Every action is recorded in the audit log with:
    • The user who performed the operation
    • Timestamp of the operation
    • Details about which targets were added to the collection
    • Reference to the public API endpoint used

Required Permissions: manage_collection and update on the collection.

post/public/v1/collections/{collectionId}/targets

Path parameters

collectionIdinteger required

Unique identifier of the collection

Request body

integer[] required

Response

Targets added to collection successfully. All changes have been audited.

idinteger required
uuidstring uuid required
scope'User' | 'Customer' | 'Featured' required
type'Default' | 'Commodity' | 'Ariba' required
namestring required
countinteger nullable
lanesboolean required
tiersEnabledboolean required
parentIdinteger nullable
updatedAtstring date-time nullable