latestOpenAPI 3.0.12026-08-20112309904.6 KB

466169815b78

Suppliers - Sites

Create a new supplier

Create a new supplier with the specified properties.

The supplier will be created and automatically added to the user's supplier connections. All required fields must be provided and will be validated.

Asynchronous Processing:

  • Supplier creation is an asynchronous process that may take a few hours to complete.
  • The endpoint returns immediately with a 202 Accepted status and a UUID for tracking.
  • The 202 Accepted status indicates that the request has been accepted for processing but the resource is not yet fully created.
  • Use the returned UUID to track the request status via GET /public/v2/suppliers/sites/pending?uuid={UUID} (the Location header also points to this endpoint with the UUID query parameter).
  • Once processing is complete, the supplier will be available via GET /public/v2/suppliers/sites (get all suppliers) or GET /public/v2/suppliers/sites/find-by-identifier (find by identifier).

Request: The request body includes required fields (name, countryCode, city, address, supplierId) and optional fields (postalCode, industries, screeningPeriodInYears, requestValidationOnCreate). See the PublicSupplierCreatePayloadV2 schema for complete field definitions, validation rules, and formatting requirements.

Industries:

  • Optional industries accepts Prewave industry names from GET /public/v1/industries (case-insensitive match).
  • Resolved industries are stored as Prewave industry IDs with canonical catalog names.
  • Unknown or ambiguous names return 400 Bad Request. Commodities are not accepted.

Optional post-init screening and validation:

  • screeningPeriodInYears (optional): If set to 2, 5, or 10, a history screening for that many years is scheduled automatically after the supplier is created and onboarding completes. Requires ACCESS_PUBLIC_SCREENING_REQUEST in addition to ACCESS_PUBLIC_CONNECT_TARGET. Omit or null to skip. Invalid values (e.g. 3) return 400 Bad Request (Failed to map screening period …). After onboarding, poll GET /public/v2/suppliers/sites/screening with the same supplier identifiers.
  • requestValidationOnCreate (optional): If true, a validation (discovery) request is scheduled automatically after onboarding completes. Requires ACCESS_PUBLIC_VALIDATION_REQUEST in addition to ACCESS_PUBLIC_CONNECT_TARGET. Omit, null, or false to skip. After onboarding, poll GET /public/v2/suppliers/sites/validation with the same supplier identifiers.

Validation Rules:

  • The combination of supplierId.id + supplierId.source must be unique within your organization.
  • A supplier creation request cannot be created if there's already a pending request with the same supplierId.id + supplierId.source combination (returns 409 Conflict).
  • The supplierId.id must not already exist as a supplier ID for another supplier in your organization (returns 409 Conflict).
  • All string fields are automatically trimmed of leading/trailing whitespace.

Idempotency: This endpoint is not idempotent. Multiple requests with the same data will create multiple pending requests unless a duplicate is detected (which returns 409 Conflict).

Use Case Example: Creating a Supplier and Adding a Supplier ID from SAP Ariba

This example demonstrates the complete workflow of creating a new supplier, waiting for it to be processed, and then adding an additional supplier ID from SAP Ariba.

Step 1: Create the Supplier

POST /public/v2/suppliers/sites
Content-Type: application/json

{
  "name": "Acme Manufacturing Corp",
  "countryCode": "AT",
  "city": "Vienna",
  "address": "123 Industrial Park, Vienna, Austria",
  "postalCode": "1010",
  "supplierId": {
    "id": "SUP-ACME-001",
    "source": "PUBLIC_API"
  },
  "industries": ["Manufacturing", "Electronics"]
}

Response (202 Accepted):

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Supplier creation request submitted successfully",
  "pendingEndpoint": "GET /public/v2/suppliers/sites/pending"
}

The 202 Accepted status indicates that the request has been accepted for processing but the supplier resource is not yet fully created. Use the returned UUID or the Location header to track the request status.

Step 2: Wait for Supplier Creation to Complete

Poll the pending suppliers endpoint until the supplier is no longer in the pending list:

GET /public/v2/suppliers/sites/pending?uuid=550e8400-e29b-41d4-a716-446655440000

While pending, you'll see:

[
  {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "supplierId": {
      "id": "SUP-ACME-001",
      "source": "PUBLIC_API"
    },
    "name": "Acme Manufacturing Corp",
    "countryCode": "AT",
    "city": "Vienna",
    "address": "123 Industrial Park, Vienna, Austria",
    "status": "Pending",
    "reason": null
  }
]

Once processed, the supplier will no longer appear in the pending list (the array will be empty or won't contain this UUID).

Step 3: Find the Supplier by Supplier ID

After processing is complete, find the supplier using the supplier ID you provided during creation:

GET /public/v2/suppliers/sites/find-by-identifier?supplierId=SUP-ACME-001&source=Public_API

Response:

[
  {
    "prewaveTargetId": 102006215,
    "name": "Acme Manufacturing Corp",
    "address": "123 Industrial Park, Vienna, Austria",
    "city": "Vienna",
    "countryCode": "AT",
    "supplierIds": [
      {
        "id": "SUP-ACME-001",
        "source": "PUBLIC_API"
      }
    ]
  }
]

Step 4: Add Supplier ID from SAP Ariba

Now that you have the prewaveTargetId (102006215), add the SAP Ariba ERP vendor ID using the create identifier endpoint:

POST /public/v2/suppliers/sites/identifiers?prewaveId=102006215
Content-Type: application/json

{
  "type": "supplierId",
  "id": "0000123456",
  "source": "SAP_ARIBA_ERP_VENDOR_ID"
}

Response (201 Created):

{
  "type": "supplierId",
  "id": "0000123456",
  "source": "SAP_ARIBA_ERP_VENDOR_ID",
  "prewaveTargetId": 102006215
}

Step 5: Verify the Supplier ID Was Added

Verify that both supplier IDs are now associated with the supplier by finding the supplier again:

GET /public/v2/suppliers/sites/find-by-identifier?prewaveId=102006215

Response:

[
  {
    "prewaveTargetId": 102006215,
    "name": "Acme Manufacturing Corp",
    "address": "123 Industrial Park, Vienna, Austria",
    "city": "Vienna",
    "countryCode": "AT",
    "supplierIds": [
      {
        "id": "SUP-ACME-001",
        "source": "PUBLIC_API"
      },
      {
        "id": "0000123456",
        "source": "SAP_ARIBA_ERP_VENDOR_ID"
      }
    ]
  }
]

Alternative: Find Supplier by SAP Ariba Supplier ID

You can now also find the supplier using the SAP Ariba ERP vendor ID:

GET /public/v2/suppliers/sites/find-by-identifier?supplierId=0000123456&source=SAP_ARIBA_ERP_VENDOR_ID

Notes:

  • Supplier creation is asynchronous and may take a few hours. Poll GET /public/v2/suppliers/sites/pending periodically until the supplier is processed.
  • You can add multiple supplier IDs to the same supplier from different systems (SAP Ariba ERP vendor IDs, Coupa, DNB, etc.) using POST /public/v2/suppliers/sites/identifiers.
  • To find suppliers by their identifiers, use GET /public/v2/suppliers/sites/find-by-identifier.
  • To remove identifiers from suppliers, use DELETE /public/v2/suppliers/sites/identifiers.
  • To deactivate a supplier, use DELETE /public/v2/suppliers/sites.
  • Supplier IDs allow you to map suppliers in Prewave to identifiers used in your external systems.
  • SAP Ariba ERP vendor IDs typically follow a 10-digit format (e.g., "0000123456").
  • The prewaveTargetId is stable once the supplier is created, but may change in rare cases due to target merges.

Required permissions: ACCESS_PUBLIC_CONNECT_TARGET.

post/public/v2/suppliers/sites

Request body

namestring required

Name of the supplier

countryCodestring required

ISO 3166-1 alpha-2 country code where the supplier is located (e.g., 'AT' for Austria, 'DE' for Germany, 'US' for United States). Must be exactly 2 uppercase letters.

citystring required

City where the supplier is located

addressstring required

Full address of the supplier

postalCodestring nullable

Postal/ZIP code of the supplier's location

industriesstring[] nullable

Optional list of Prewave industry names associated with the supplier. Names are matched case-insensitively against GET /public/v1/industries. Unknown or ambiguous names return 400. Commodities are not accepted. Empty strings in the array will be filtered out. Leading/trailing whitespace will be trimmed.

screeningPeriodInYears2 | 5 | 10 nullable

Optional. If set to 2, 5, or 10, a history screening for that many years is scheduled automatically after the supplier is created and onboarding completes (batch post_init_screening_period). Requires permission access_public_screening_request in addition to access_public_connect_target. Omit or null to skip.

requestValidationOnCreateboolean nullable

Optional. If set to true, a validation (discovery) request is scheduled automatically after the supplier is created and onboarding completes. Requires permission access_public_validation_request in addition to access_public_connect_target. Omit or set to null/false to skip.

Example request

{
  "name": "Acme Corporation",
  "countryCode": "AT",
  "city": "Vienna",
  "address": "123 Main St, Vienna, Austria",
  "supplierId": {
    "id": "SUP-12345",
    "source": "SAP"
  },
  "postalCode": "1010",
  "industries": [
    "Manufacturing",
    "Electronics"
  ],
  "screeningPeriodInYears": 2,
  "requestValidationOnCreate": true
}

Response

Accepted - Supplier creation request has been accepted for asynchronous processing. The request is being processed asynchronously and the resource is not yet fully created. Use the Location header or the returned UUID to track the request status via the pending suppliers endpoint.

uuidstring uuid required

UUID of the created batch request target that can be used to track the supplier creation request

messagestring required

Success message

pendingEndpointstring required

Information about where to find pending suppliers

Example response

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Supplier creation request submitted successfully",
  "pendingEndpoint": "Pending suppliers can be found at GET /public/v2/suppliers/sites/pending"
}