---
title: "Upsert suppliers and their desired collections with a full load."
method: POST
path: "/public/v1/sites-upsert/full"
tags: ["Suppliers - Sites Upsert"]
---

# Upsert suppliers and their desired collections with a full load.

`POST /public/v1/sites-upsert/full`

Full load means that all sites need to exist in the request payload.
Existing sites not part of the payload will be removed from the managed collections in this request.

**Required permission:** `create_sites_upsert_requests`

**Performance impact:** Medium

## Request body

- PublicFullSitesUpsertPayload
  - `siteData` SitesUpsertPayloadSiteEntry[], required
    - `name` string, required — The human-readable name for the Site, usually canonical. |The name must refer to an organization that is publicly registered |and carries out its main activity in that specific location.
    - `countryCode` string, required — Alpha-2 ISO Code of the address. See https://www.iso.org/obp/ui for details.
    - `locality` string, required — Refers to the city/town portion of the address. |In regions of the world where localities are not well defined or do not fit into this structure well, choose the closest locally instead. |Must have more than 3 characters.
    - `addressLine` string, required — Unstructured address lines describing the lower levels of an address. Usually this is a street name and house number.
    - `postalCode` string, nullable — Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address.
    - `industries` SitesUpsertIndustryDefinitionPayload[], nullable — Can be used to define industries for a site. This helps to assign the site to a specific industry.
      - `industry` string, required — The industry identifier based on the standard
      - `industryStandard` string, required — The industry standard used
    - `website` string, nullable — The official website for this site, such as the homepage of a business.
    - `contact` string[], nullable — List of email addresses for the site's contacts to complete self-assessments.
    - `yourReference` SitesUpsertYourReference, required
      - `id` string, required — A textual identifier that uniquely identifies a Site connected to your organization. Your reference can be a Supplier ID, ERP ID, or any other unique identifier for a site.
      - `source` string, nullable — An identifier that determines which system the “your_reference” originates. The source could be any ERP system or any internal tool you use to maintain your data
    - `additionalReferences` SitesUpsertYourReference[] — A list of additional references that identify a Site connected to your organization. Your reference can be a Supplier ID, ERP ID, or any other unique identifier for a site.
      - `id` string, required — A textual identifier that uniquely identifies a Site connected to your organization. Your reference can be a Supplier ID, ERP ID, or any other unique identifier for a site.
      - `source` string, nullable — An identifier that determines which system the “your_reference” originates. The source could be any ERP system or any internal tool you use to maintain your data
    - `connectionType` 'Supplier' | 'Customer' | 'Own' — How the Site is associated with your organization. |For reports and analysis, the connection type functions as a filter within the Prewave platform.
    - `diImpact` 'NA' | 'No' | 'Low' | 'Mid' | 'High' | 'Critical'
    - `biImpact` 'NA' | 'No' | 'Low' | 'Mid' | 'High' | 'Critical'
    - `priority` 'Low' | 'Mid' | 'High' | 'Critical' — Priority of alert
    - `spendData` number, double, nullable — The total value of the goods and/or services you purchased at that site in EUR per year. |Prewave can automatically evaluate its impact based on the spending data you provide and the total revenue of the site.
    - `collectionNames` string[], nullable — A list of collections in which you want to group your site.
    - `externalReferences` SitesUpsertExternalReferencePayload[], nullable — External identifiers that uniquely identify a Site. Prewave allows multiple identifier types.
      - `externalId` string, required — The external identifier
      - `system` string, required — The external identifier type
    - `postInitScreeningPeriod` integer, nullable — Request a history screening of the site (in years to be screened) to be triggered automatically right after the onboarding. |Additional costs may apply, quota is affected.
    - `impactData` SitesUpsertImpactDataPayload — Data related to calculating the impact.
      - `year` integer, required — Year of this impact data
      - `bi12MlnEuro` number, double, nullable — The Business Interruption-12 Value is the revenue generated with the products produced with the suppliers goods. It represents the revenue at risk in case this supplier fails to deliver.
      - `grossMttrEMonths` integer, nullable — Mean time to recovery (mttr) in months in case of an "elementary loss" of this suppliers facility. |In other words: "How long does it take to shift production to another site or another supplier?"
      - `grossMttrIMonths` integer, nullable — Mean time to recovery (mttr) in months in case of an "insolvency loss" of this suppliers facility. |In other words: "'"How long does it take to shift production to another site or another supplier?"
      - `cocSigned` boolean, nullable — Did this supplier sign our Code of Conduct?
      - `additionalInformation` string, nullable — Additional text information regarding this impact data
    - `safetyStock` SitesUpsertSafetyStockPayload
      - `onPremiseStockLevelMonths` integer, nullable — Safety stocks on premise of goods purchased from this supplier
      - `atSupplierLocation` 'SameBuilding' | 'DifferentFireSection' | 'DifferentBuilding' | 'NotApplicable' — The supplier location
      - `atSupplierDeviation` 'NotApplicable' | 'OnTarget' | 'Below' | 'Above' — Deviation from the agreed upon Safety Stock
      - `atSupplierStockLevelMonths` integer, nullable — Agreed upon safety stock at the supplier
      - `atSupplierLastConfirmedDate` string, date, nullable — Date on which the safety stock level was last confirmed by the supplier.
      - `inLogisticChainDaysOnHand` integer, nullable — Stock Level currently on the logistics chain to the production facilities.
  - `dryRun` boolean, required — If set to true, the request will be processed without actually writing to the database.This is useful for testing purposes. |Use endpoints `{requestId}/dry-runs` and `dry-run/{id}` to get the status and the results of your dry-runs.

## Response `200`

Request created successfully

- SitesUpsertRequestCreatedResponse
  - `requestId` string, uuid, required — The ID of a sites upsert request. Use this ID to check the status of the request and to retrieve dry-run ids.

## Other responses

- `400` — Validation failed
- `403` — 403 Forbidden - Authentication or authorization failure. This status code is returned when: (1) the request lacks valid authentication credentials (missing or invalid X-Auth-Token header), or (2) the authenticated user does not have the required permission to access this resource.
- `429` — API rate limit exceeded
- `500` — 500 Internal Server Error - An unexpected error occurred on the server. The request may or may not have been processed.

---

[API](https://skmtc.net/prewave/apis/public-prewave-api.md) · [All operations](https://skmtc.net/prewave/apis/public-prewave-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prewave/public-prewave-api/revisions/466169815b78/schema)
