swagger: '2.0'
info:
  version: '2.0'
  title: user-exit-configurations
consumes:
  - application/json
produces:
  - application/json
paths:
  /user-exit-configurations:
    get:
      tags:
        - user-exit-configurations
      description: Get a collection of user exit configurations.
      operationId: getUserExitConfigurations
      parameters:
        - name: id
          in: query
          description: The unique numeric ID for identifying the user exit configuration.
          required: false
          type: integer
          format: int64
        - name: description
          in: query
          description: The description of the user exit configuration.
          required: false
          type: string
        - name: httpMethod
          in: query
          description: 'The HTTP method used to invoke user exit configuration. Possible values include GET, PUT, POST and DELETE.'
          required: false
          type: string
        - name: url
          in: query
          description: The relative path of the user exit configuration URL.
          required: false
          type: string
        - name: requestHandler
          in: query
          description: The request handler class name which implements com.ibm.commerce.foundation.ue.RequestHandler.
          required: false
          type: string
        - name: responseHandler
          in: query
          description: The response handler class name which implements com.ibm.commerce.foundation.ue.ResponseHandler.
          required: false
          type: string
        - name: properties
          in: query
          description: 'An ampersand-separated (&) list of properties in the form of URL-encoded name-value pairs. For a list of supported properties, please refer to the Knowledge Center.'
          required: false
          type: string
        - name: retriable
          in: query
          description: 'Indicate whether the user exit configuration is retriable in case of failure. A value of 1 indicates that it is retriable, while 0 indicates it is not retriable. The default value is 0.'
          required: false
          type: integer
          format: int32
        - name: timeout
          in: query
          description: The amount of time to wait (in milliseconds) before an request invoking the user exit configuration is considered failed.
          required: false
          type: integer
          format: int32
        - name: filterId
          in: query
          description: The unique numeric ID for identifying the filter template used by the user exit configuration. A value of null indicates that filtering is not required.
          required: false
          type: integer
          format: int64
        - name: offset
          in: query
          description: 'The position within the resulting dataset where the query begins returning item records. If the offset is "5", the records that returned begin with the sixth record that matches the query parameters. If the offset is "0", the records that are returned begin with the first record that matches the query parameters.'
          required: false
          type: integer
          format: int32
        - name: limit
          in: query
          description: The maximum number of records to return.
          required: false
          type: integer
          format: int32
        - name: fields
          in: query
          description: 'The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.'
          required: false
          type: string
        - name: expand
          in: query
          description: 'The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.'
          required: false
          type: string
        - name: sort
          in: query
          description: 'The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.'
          required: false
          type: string
      responses:
        '200':
          description: A collection of user exit configurations.
          schema:
            $ref: '#/definitions/UserExitConfigurationCollection'
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    post:
      tags:
        - user-exit-configurations
      description: Create a user exit configuration.
      operationId: createUserExitConfiguration
      parameters:
        - in: body
          name: UserExitConfiguration
          description: A user exit configuration.
          required: true
          schema:
            $ref: '#/definitions/UserExitConfiguration'
      responses:
        '201':
          description: The operation was successful.
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
  '/user-exit-configurations/{id}':
    get:
      tags:
        - user-exit-configurations
      description: Get a user exit configuration.
      operationId: getUserExitConfigurationById
      parameters:
        - name: fields
          in: query
          description: 'The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.'
          required: false
          type: string
        - name: expand
          in: query
          description: 'The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.'
          required: false
          type: string
        - name: sort
          in: query
          description: 'The comma-separated set of properties which controls the order of the items being listed, prefixed by either (-) to sort by descending order, or optionally (+) to sort by ascending order. For example, sort=name,-d which means, order the items based on the name value in ascending order, then by the id value in descending order.'
          required: false
          type: string
      responses:
        '200':
          description: A user exit configuration.
          schema:
            $ref: '#/definitions/UserExitConfiguration'
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '404':
          description: The resource was not found.
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    delete:
      tags:
        - user-exit-configurations
      description: Delete a user exit configuration.
      operationId: deleteUserExitConfigurationById
      parameters: []
      responses:
        '204':
          description: The operation was successful.
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '404':
          description: The resource was not found.
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    patch:
      tags:
        - user-exit-configurations
      description: Update a user exit configuration.
      operationId: updateUserExitConfigurationById
      parameters:
        - in: body
          name: UserExitConfiguration
          description: A user exit configuration.
          required: true
          schema:
            $ref: '#/definitions/UserExitConfiguration'
      responses:
        '200':
          description: The operation was successful.
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '404':
          description: The resource was not found.
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    parameters:
      - name: id
        in: path
        description: The unique numeric ID for identifying the user exit configuration.
        required: true
        type: integer
        format: int64
definitions:
  Link:
    type: object
    properties:
      href:
        type: string
        format: uri
        description: The URL of the link.
    description: Links to related resources.
  Error:
    type: object
    properties:
      code:
        type: string
        description: The error message code.
      message:
        type: string
        description: The error message.
      messageKey:
        type: string
        description: The error message key.
      messageArguments:
        type: array
        description: The arguments used to construct the error message.
        items:
          type: object
      correlationId:
        type: string
        description: The unique identifier for the request.
      locale:
        type: string
        description: The locale of the error message.
    description: The error message item model.
  ErrorResponseContainer:
    type: object
    properties:
      requestId:
        type: string
        description: The request identifier.
      errors:
        type: array
        description: The errors.
        items:
          $ref: '#/definitions/Error'
    description: The error message model.
  UserExitConfiguration:
    type: object
    properties:
      id:
        type: integer
        format: int64
        description: The unique numeric ID for identifying the user exit configuration.
      description:
        type: string
        description: The description of the user exit configuration.
      httpMethod:
        type: string
        description: 'The HTTP method used to invoke user exit configuration. Possible values include GET, PUT, POST and DELETE.'
      url:
        type: string
        description: The relative path of the user exit configuration URL.
      requestHandler:
        type: string
        description: The request handler class name which implements com.ibm.commerce.foundation.ue.RequestHandler.
      responseHandler:
        type: string
        description: The response handler class name which implements com.ibm.commerce.foundation.ue.ResponseHandler.
      properties:
        type: string
        description: 'An ampersand-separated (&) list of properties in the form of URL-encoded name-value pairs. For a list of supported properties, please refer to the Knowledge Center.'
      retriable:
        type: integer
        format: int32
        description: 'Indicate whether the user exit configuration is retriable in case of failure. A value of 1 indicates that it is retriable, while 0 indicates it is not retriable. The default value is 0.'
      timeout:
        type: integer
        format: int32
        description: The amount of time to wait (in milliseconds) before an request invoking the user exit configuration is considered failed.
      filterId:
        type: integer
        format: int64
        description: The unique numeric ID for identifying the filter template used by the user exit configuration. A value of null indicates that filtering is not required.
    description: A user exit configuration.
  UserExitConfigurationCollection:
    type: object
    properties:
      count:
        type: integer
        format: int64
        description: The total number of items.
      items:
        type: array
        description: The items.
        items:
          $ref: '#/definitions/UserExitConfiguration'
    description: A collection of user exit configurations.
