> ## Documentation Index
> Fetch the complete documentation index at: https://integration.delogue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Replaces the supplier facilities selected for a style.

> Full delete-and-recreate of the style's selection set in a single transaction (parity with the legacy POST). Body is always an array, even for a single item. An item with state="deleted" removes that one facility-type selection instead of recreating it; every other item becomes part of the new selection set. An invalid facilityTypeId/supplierFacilityId, or a supplier facility that does not carry the given facility type, fails the whole request (404/422) with no partial write. A style that exists in another organization returns 403; a style that exists nowhere returns 404.



## OpenAPI

````yaml https://service.my.delogue.com/openapi/external.json put /api/styles/{styleId}/supplier-facilities
openapi: 3.1.1
info:
  title: Delogue External API - (Production)
  description: Integration endpoints for Delogue API
  version: 1.0.0
servers:
  - url: >-
      http://ca-delogue-service-prod.bravepebble-62e34dbe.westeurope.azurecontainerapps.io/
security: []
tags:
  - name: SubSuppliers
  - name: StyleSupplierFacilities
  - name: StyleSkus
  - name: Styles
  - name: SampleRequests
  - name: StyleRelations
  - name: Style Prices
  - name: StyleItems
  - name: StyleFiles
  - name: StyleCustomFields
  - name: StyleContacts
  - name: StyleCategories
  - name: StyleCareInstructions
  - name: SizeRanges
  - name: Seasons
  - name: SampleTypes
  - name: Organizations
  - name: MeasurementCharts
  - name: Items
  - name: ItemCategories
  - name: Groups
  - name: Facilities
  - name: ComplianceCustomFields
  - name: ComplianceCategories
  - name: Color Groups
  - name: Colors
  - name: CareInstructions
  - name: CareInstructionMaterials
  - name: CareInstructionLayers
  - name: CareInstructionIcons
  - name: Brands
  - name: Barcodes
paths:
  /api/styles/{styleId}/supplier-facilities:
    put:
      tags:
        - StyleSupplierFacilities
      summary: Replaces the supplier facilities selected for a style.
      description: >-
        Full delete-and-recreate of the style's selection set in a single
        transaction (parity with the legacy POST). Body is always an array, even
        for a single item. An item with state="deleted" removes that one
        facility-type selection instead of recreating it; every other item
        becomes part of the new selection set. An invalid
        facilityTypeId/supplierFacilityId, or a supplier facility that does not
        carry the given facility type, fails the whole request (404/422) with no
        partial write. A style that exists in another organization returns 403;
        a style that exists nowhere returns 404.
      parameters:
        - name: styleId
          in: path
          required: true
          schema:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/StyleSupplierFacilitySelectionWriteDto'
          text/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/StyleSupplierFacilitySelectionWriteDto'
          application/*+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/StyleSupplierFacilitySelectionWriteDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponseOfListOfStyleSupplierFacilitySelectionDto
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponseOfListOfStyleSupplierFacilitySelectionDto
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/ApiResponseOfListOfStyleSupplierFacilitySelectionDto
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - {}
components:
  schemas:
    StyleSupplierFacilitySelectionWriteDto:
      type: object
      properties:
        facilityTypeId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int64
        supplierFacilityId:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int64
        state:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/StyleSupplierFacilitySelectionState'
      additionalProperties: false
    ApiResponseOfListOfStyleSupplierFacilitySelectionDto:
      required:
        - status
        - code
        - data
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        code:
          type: string
        data:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/StyleSupplierFacilitySelectionDto'
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResponseStatus'
        code:
          type: string
        error:
          $ref: '#/components/schemas/ErrorWrapper'
      additionalProperties: false
    StyleSupplierFacilitySelectionState: {}
    ApiResponseStatus: {}
    StyleSupplierFacilitySelectionDto:
      type: object
      properties:
        facilityType:
          $ref: '#/components/schemas/FacilityTypeDto'
        facility:
          $ref: '#/components/schemas/SelectedSupplierFacilityDto'
      additionalProperties: false
    ErrorWrapper:
      type: object
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDto'
      additionalProperties: false
    FacilityTypeDto:
      type: object
      properties:
        id:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int64
        name:
          type: string
      additionalProperties: false
    SelectedSupplierFacilityDto:
      type: object
      properties:
        id:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int64
        name:
          type: string
        address:
          type:
            - 'null'
            - string
        zipCodeOrCity:
          type:
            - 'null'
            - string
        country:
          type:
            - 'null'
            - string
        state:
          $ref: '#/components/schemas/SupplierFacilityState'
      additionalProperties: false
    ErrorDetailDto:
      required:
        - type
        - field
        - value
      type: object
      properties:
        type:
          type: string
        field:
          type:
            - 'null'
            - string
        value:
          type:
            - 'null'
            - string
      additionalProperties: false
    SupplierFacilityState: {}

````