openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/BDS_DOCUMENT_CREA_NEW_VARIANT:
    post:
      tags:
      - BDS_BAPI
      operationId: /rfc/BDS_DOCUMENT_CREA_NEW_VARIANT
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CLIENT:
                  type: string
                  default: SY-MANDT
                  maxLength: 3
                DOC_ID:
                  type: string
                  maxLength: 42
                  description: Client
                DOC_VAR_ID:
                  type: integer
                  format: int64
                  description: BOR Key of Old Object
                DOC_VER_NO:
                  type: integer
                  format: int64
                  description: BOR Key of Old Object
                NEW_VAR_TG:
                  type: string
                  maxLength: 2
                  description: BOR Key of Old Object
                FROM_RELATIONS:
                  type: array
                  items:
                    type: object
                    properties:
                      REIO_ID:
                        type: string
                        maxLength: 32
                        description: Relationship between logical and physical documents
                      RE_CLASS:
                        type: string
                        maxLength: 10
                        description: Relationship class
                      PRTN_ID:
                        type: string
                        maxLength: 32
                        description: ID for documents and relations
                      PRTN_CLASS:
                        type: string
                        maxLength: 10
                        description: Document class
                PROPERTIES:
                  type: array
                  items:
                    type: object
                    properties:
                      NAME:
                        type: string
                        maxLength: 25
                        description: Attribute of a document or a relationship
                      VALUE:
                        type: string
                        maxLength: 64
                        description: Attribute Value
                TO_RELATIONS:
                  type: array
                  items:
                    type: object
                    properties:
                      REIO_ID:
                        type: string
                        maxLength: 32
                        description: Relationship between logical and physical documents
                      RE_CLASS:
                        type: string
                        maxLength: 10
                        description: Relationship class
                      PRTN_ID:
                        type: string
                        maxLength: 32
                        description: ID for documents and relations
                      PRTN_CLASS:
                        type: string
                        maxLength: 10
                        description: Document class
              required:
              - DOC_ID
              - DOC_VAR_ID
              - DOC_VER_NO
              - NEW_VAR_TG
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  NEW_DOC_VAR_ID:
                    type: integer
                    format: int64
                    description: BOR Key of New Object
                  FROM_RELATIONS:
                    type: array
                    items:
                      type: object
                      properties:
                        REIO_ID:
                          type: string
                          maxLength: 32
                          description: Relationship between logical and physical documents
                        RE_CLASS:
                          type: string
                          maxLength: 10
                          description: Relationship class
                        PRTN_ID:
                          type: string
                          maxLength: 32
                          description: ID for documents and relations
                        PRTN_CLASS:
                          type: string
                          maxLength: 10
                          description: Document class
                  PROPERTIES:
                    type: array
                    items:
                      type: object
                      properties:
                        NAME:
                          type: string
                          maxLength: 25
                          description: Attribute of a document or a relationship
                        VALUE:
                          type: string
                          maxLength: 64
                          description: Attribute Value
                  TO_RELATIONS:
                    type: array
                    items:
                      type: object
                      properties:
                        REIO_ID:
                          type: string
                          maxLength: 32
                          description: Relationship between logical and physical documents
                        RE_CLASS:
                          type: string
                          maxLength: 10
                          description: Relationship class
                        PRTN_ID:
                          type: string
                          maxLength: 32
                          description: ID for documents and relations
                        PRTN_CLASS:
                          type: string
                          maxLength: 10
                          description: Document class
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
