openapi: "3.1.0"
info:
  title: "PCF Data Exchange API"
  version: 1.3.0
paths:
  /footprintExchange/{requestId}:
    put:
      tags:
        - "EDC PCF Data Exchange"
      summary: "PCF Response / Update"
      operationId: "putPcfWithPathId"
      parameters:
        - name: "requestId"
          in: "path"
          required: true
          schema:
            type: "string"
        - name: message
          in: query
          required: false
          description: Human-readable message (max 250 chars). Use decoded text in this contract. Clients MUST percent-encode reserved and non-ASCII characters when sending the query parameter (RFC 3986). Servers MUST decode once. Do not pre-encode or double-encode.
          allowReserved: false
          example: No offset included, please!
          schema:
            type: string
        - name: "update"
          description: "Whether this is an update to an existing request. If 'false' this is a response to an open request."
          in: "query"
          required: false
          schema:
            default: false
            type: "boolean"
        - name: edc-bpn
          description: The caller's Catena-X BusinessPartnerNumber, automatically set by the EDC
          example: BPNL0000005AMPL3
          in: header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema: {}
        required: true
        description: "PCF data that matches the requested dataModelVersion <a href=\"https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.pcf\">Schema Definitions</a>"
      responses:
        "200":
          description: "OK"
        "400":
          description: "Bad Request"
    get:
      tags:
        - "EDC PCF Data Exchange"
      summary: "PCF Request"
      description: "Request footprint. At least one manufacturerPartId or customerPartId must be provided."
      operationId: "requestPcf"
      parameters:
        - name: "requestId"
          in: "path"
          required: true
          schema:
            type: "string"
          description: "The id of the footprint request"
        - name: edc-bpn
          description: The caller's Catena-X BusinessPartnerNumber, automatically set by the EDC
          example: BPNL0000005AMPL3
          in: header
          required: true
          schema:
            type: string
        - name: "manufacturerPartId"
          in: "query"
          required: false
          schema:
            type: "string"
        - name: "customerPartId"
          in: "query"
          required: false
          schema:
            type: "string"
        - name: message
          in: query
          required: false
          description: Human-readable message (max 250 chars). Use decoded text in this contract. Clients MUST percent-encode reserved and non-ASCII characters when sending the query parameter (RFC 3986). Servers MUST decode once. Do not pre-encode or double-encode.
          allowReserved: false
          example: No offset included, please!
          schema:
            type: string
        - name: dataModelVersion
          in: query
          required: false
          description: Fully qualified data model URN including version. Use decoded URN values in this contract (for example urn:samm:io.catenax.pcf:10.0.0). Clients MUST percent-encode reserved characters when sending this query parameter (for example ':' as %3A, RFC 3986). Servers MUST decode once. Do not pre-encode or double-encode.
          allowReserved: false
          example: urn:samm:io.catenax.pcf:10.0.0
          schema:
            type: string
            default: urn:samm:io.catenax.pcf:9.0.0
            oneOf:
              - enum:
                  - urn:samm:io.catenax.pcf:9.0.0
              - pattern: '^urn:samm:io\.catenax\.pcf:10\.[0-9]+\.[0-9]+$'
      responses:
        "202":
          description: "Accepted"
        "404":
          description: "Not Found"
        "422":
          description: "Unprocessable Entity"