x-generator: NSwag v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))
swagger: '2.0'
info:
  title: Absorb Integration API
  version: v2
consumes:
  - application/json
produces:
  - application/json
paths:
  /curriculums/{id}:
    get:
      tags:
        - Curricula
      summary: Get an individual curriculum by ID.
      operationId: Curricula_GetCurriculum
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The ID of the curriculum.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/NonPagedCurriculumResource'
        '404':
          x-nullable: false
          description: Curricula not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /curriculums/for-sale:
    get:
      tags:
        - Curricula
      summary: Get all available curricula for sale.
      operationId: Curricula_GetCurriculaForSale
      parameters:
        - type: string
          name: id
          in: query
          description: The curriculum id to filter by.
          format: guid
          x-nullable: true
        - type: string
          name: catId
          in: query
          description: The curriculum category id to filter by.
          format: guid
          x-nullable: true
        - type: string
          name: from
          in: query
          description: The curriculum start date to filter by.
          format: date-time
          x-nullable: true
        - type: string
          name: to
          in: query
          description: The curriculum end date to filter by.
          format: date-time
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/NonPagedCurriculumResource'
      security:
        - api_key: []
  /curriculums/curriculum-group:
    get:
      tags:
        - Curricula
      summary: Get curriculum group.
      operationId: Curricula_GetCurriculumGroupById
      parameters:
        - type: string
          name: id
          in: query
          required: true
          description: The ID of the curriculum group.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/CurriculumGroupResource'
        '404':
          x-nullable: false
          description: Curriculum group not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /curriculums/multiple-curriculum-groups:
    post:
      tags:
        - Curricula
      summary: Gets multiple curriculum groups.
      operationId: Curricula_GetMultipleCurriculumGroups
      parameters:
        - name: request
          in: body
          description: Request containing identifiers of the curriculum groups.
          schema:
            $ref: '#/definitions/GetMultipleCurriculumGroupsRequest'
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: object
            additionalProperties:
              $ref: '#/definitions/CurriculumGroupResource'
        '400':
          x-nullable: false
          description: The required body paramaters were not included.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /curriculums:
    get:
      tags:
        - Curricula
      summary: Get all available curricula.
      operationId: Curricula_GetAllCurricula
      parameters:
        - type: string
          name: _filter
          in: query
          description: >-
            One or more filter operations to be performed on the collection.

            The referenced fields must allow filtering. See the respective
            report's schema for which fields can be filtered. 
                        
            Supports most of the [OData filter
            syntax](http://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionfilter).
                        
            Supported operations:
                * eq,
                * ne,
                * gt,
                * ge,
                * lt,
                * le,
                * and,
                * or,
                * not,
                * ()

            Supported functions:
                * substringof('value',fieldName),
                * endswith(fieldName,'value'),
                * startswith(fieldName,'value'),
                * tolower(fieldName),
                * toupper(fieldName)
                        
            Examples:

            * _filter=`firstname eq 'Jeffrey'`

            * _filter=`id eq guid'a14c149a-2ce0-41d4-b532-02189ad3cb22'`

            * _filter=`startsWith(lastname,'leb') or dateAdded ge
            datetime'1998-03-06T20:38:07Z'`
          x-nullable: true
        - type: string
          name: _sort
          in: query
          description: >-
            Optional list of comma-separated fields to sort the collection by.


            The referenced fields must allow sorting. See the respective
            report's schema for which fields can be sorted. 

            If not specified, all report fields are returned.


            To sort in a descending manner, prefix the field name with `-`. For
            example, 

            `_sort=name,-date`, sorts the collection of items by `name`
            (ascending) 

            and then by `date` (descending).
          x-nullable: true
        - type: string
          name: _limit
          in: query
          description: >-
            The maximum number of items to return in the current page of the
            collection.
          x-nullable: true
        - type: string
          name: _offset
          in: query
          description: The number of pages to offset into the collection.
          x-nullable: true
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '2'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/CurriculaResource'
        '422':
          x-nullable: false
          description: A validation error occured with the provided parameters.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  CurriculumResource:
    type: object
    description: 'Resource representing a curriculum. '
    properties:
      id:
        type: string
        description: |-
          `Filterable` 

          The unique course identifier.
        format: guid
      courseType:
        type: string
        description: >-
          `Sortable` `Filterable` 


          The course's type (ex, OnlineCourse, InstructorLedCourse,
          CourseBundle, Curriculum).
      name:
        type: string
        description: |-
          `Default Sort` `Sortable` `Filterable` 

          The course's name.
      description:
        type: string
        description: |-
          `Filterable` 

          The course's description.

          Supports HTML.
      notes:
        type: string
        description: |-
          `Filterable` 

          The course's notes.
      externalId:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's external ID.
      accessDate:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's access date.
        format: date-time
      expireType:
        description: |-
          `Sortable` `Filterable` 

          The course's expiry type. 

          Possible Enum Values: `0 = None` `1 = Date` `2 = Duration` 
        allOf:
          - $ref: '#/definitions/ExpireType'
      expireDuration:
        description: |-
          `Filterable` 

          The course's duration until expiry, if applicable.
        allOf:
          - $ref: '#/definitions/DurationResource'
      expiryDate:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's expiry date, if applicable.
        format: date-time
      activeStatus:
        description: |-
          `Sortable` `Filterable` 

          The course's status.

          Possible Enum Values: `0 = Active` `1 = Inactive` 
        allOf:
          - $ref: '#/definitions/CourseActiveStatus'
      tagIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of tag IDs.
        items:
          type: string
          format: guid
      resourceIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of resource IDs.
        items:
          type: string
          format: guid
      editorIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of editor IDs.
        items:
          type: string
          format: guid
      prices:
        type: array
        description: |-
          `Filterable` 

          The course's list of prices.
        items:
          $ref: '#/definitions/PriceResource'
      competencyDefinitionIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of competency definition IDs.
        items:
          type: string
          format: guid
      prerequisiteCourseIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of prerequisite course IDs.
        items:
          type: string
          format: guid
      postEnrollmentCourseIds:
        type: array
        description: |-
          `Filterable` 

          The course's list of post enrollment course IDs.
        items:
          type: string
          format: guid
      allowCourseEvaluation:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if the course allows evaluation, false otherwise.
      categoryId:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's category ID.
        format: guid
      certificateUrl:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's certificate URL, if any.
      audience:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's audience.
      goals:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's goals.
      vendor:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's vendor.
      companyCost:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's company cost.
        format: decimal
      learnerCost:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's learner cost.
        format: decimal
      companyTime:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's amount of company time.
        format: decimal
      learnerTime:
        type: number
        description: |-
          `Sortable` `Filterable` 

          The course's amount of learner time.
        format: decimal
      dateEdited:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The course's last edited date.
        format: date-time
      dateAdded:
        type: string
        description: |-
          `Sortable` `Filterable` 

          The date the course was added.
        format: date-time
      isPacingEnabled:
        type: boolean
        description: |-
          `Sortable` `Filterable` 

          True if pacing is enabled, false otherwise.
      curriculumGroupIds:
        type: array
        description: |-
          `Filterable` 

          A list of curriculum group IDs.
        items:
          type: string
          format: guid
  ExpireType:
    type: integer
    description: Represents the type of expiry an entity can have
    x-enumNames:
      - None
      - Date
      - Duration
    enum:
      - 0
      - 1
      - 2
  DurationResource:
    type: object
    description: Represents a timeframe, usually for when something expires, like a Course.
    properties:
      years:
        type: integer
      months:
        type: integer
        description: The number of months in the duration.
      days:
        type: integer
        description: The number of days in the duration.
      hours:
        type: integer
        description: The number of hours in the duration.
  Link:
    type: object
    properties:
      Rel:
        $ref: '#/definitions/Relation'
      Items:
        type: array
        items:
          $ref: '#/definitions/LinkItem'
  Relation:
    type: object
    properties:
      Name:
        type: string
  LinkItem:
    type: object
    properties:
      Href:
        type: string
      Name:
        type: string
      Templated:
        type: boolean
      Type:
        type: string
      Deprecation:
        type: string
      Profile:
        type: string
      Title:
        type: string
      Hreflang:
        type: string
  IEmbeddedResource:
    type: object
    x-abstract: true
    properties:
      Name:
        type: string
      Resources:
        type: array
        items:
          $ref: '#/definitions/IResource'
  IResource:
    type: object
    x-abstract: true
    properties:
      Links:
        type: array
        items:
          $ref: '#/definitions/Link'
      EmbeddedResources:
        type: array
        items:
          $ref: '#/definitions/IEmbeddedResource'
  CourseActiveStatus:
    type: integer
    description: |-
      Represents the overall accessibility of courses.
                  
    x-enumNames:
      - Active
      - Inactive
    enum:
      - 0
      - 1
  PriceResource:
    type: object
    description: Resource representing a Price on a Course.
    properties:
      id:
        type: string
        description: The ID of the course price.
        format: guid
      departmentId:
        type: string
        description: The ID of the department that this course price applies to.
        format: guid
      currency:
        type: string
        description: The symbol that is used to describe the currency (ex, £, €, $, etc)
      amount:
        type: number
        description: The amount to charge for a course.
        format: decimal
  GenericErrorResponse:
    type: object
    description: |-
      This class is NOT to be used as an actual response. This is to be used as
      the return type for non-200 responses in `SwaggerResponse` attributes.
    properties:
      validations:
        type: array
        description: The validations (if any) which caused the error.
        items:
          type: string
      code:
        description: The status code returned.
        allOf:
          - $ref: '#/definitions/HttpStatusCode'
      message:
        type: string
        description: The error message.
      term:
        type: string
        description: The general error term.
      _meta:
        type: object
        description: 'A list of meta data (if any). '
        additionalProperties:
          type: string
  HttpStatusCode:
    type: integer
    description: ''
    x-enumNames:
      - Continue
      - SwitchingProtocols
      - OK
      - Created
      - Accepted
      - NonAuthoritativeInformation
      - NoContent
      - ResetContent
      - PartialContent
      - MultipleChoices
      - Ambiguous
      - MovedPermanently
      - Moved
      - Found
      - Redirect
      - SeeOther
      - RedirectMethod
      - NotModified
      - UseProxy
      - Unused
      - TemporaryRedirect
      - RedirectKeepVerb
      - BadRequest
      - Unauthorized
      - PaymentRequired
      - Forbidden
      - NotFound
      - MethodNotAllowed
      - NotAcceptable
      - ProxyAuthenticationRequired
      - RequestTimeout
      - Conflict
      - Gone
      - LengthRequired
      - PreconditionFailed
      - RequestEntityTooLarge
      - RequestUriTooLong
      - UnsupportedMediaType
      - RequestedRangeNotSatisfiable
      - ExpectationFailed
      - UpgradeRequired
      - InternalServerError
      - NotImplemented
      - BadGateway
      - ServiceUnavailable
      - GatewayTimeout
      - HttpVersionNotSupported
  NonPagedCurriculumResource:
    type: object
    description: >-
      This class is NOT to be used as an actual response. This is to be used as
      the `SwaggerResponse` return type for

      non-paginated endpoints that return CurriculumResource.
    properties:
      isPacingEnabled:
        type: boolean
        description: True if pacing is enabled, false otherwise.
      curriculumGroupIds:
        type: array
        description: A list of curriculum group IDs.
        items:
          type: string
          format: guid
      id:
        type: string
        description: The unique course identifier.
        format: guid
      courseType:
        type: string
        description: >-
          The course's type (ex, OnlineCourse, InstructorLedCourse,
          CourseBundle, Curriculum).
      name:
        type: string
        description: The course's name.
      description:
        type: string
        description: |-
          The course's description.

          Supports HTML.
      notes:
        type: string
        description: The course's notes.
      externalId:
        type: string
        description: The course's external ID.
      accessDate:
        type: string
        description: The course's access date.
        format: date-time
      expireType:
        description: |-
          The course's expiry type. 

          Possible Enum Values: `0 = None` `1 = Date` `2 = Duration` 
        allOf:
          - $ref: '#/definitions/ExpireType'
      expireDuration:
        description: The course's duration until expiry, if applicable.
        allOf:
          - $ref: '#/definitions/DurationResource'
      expiryDate:
        type: string
        description: The course's expiry date, if applicable.
        format: date-time
      activeStatus:
        description: |-
          The course's status.

          Possible Enum Values: `0 = Active` `1 = Inactive` 
        allOf:
          - $ref: '#/definitions/CourseActiveStatus'
      tagIds:
        type: array
        description: The course's list of tag IDs.
        items:
          type: string
          format: guid
      resourceIds:
        type: array
        description: The course's list of resource IDs.
        items:
          type: string
          format: guid
      editorIds:
        type: array
        description: The course's list of editor IDs.
        items:
          type: string
          format: guid
      prices:
        type: array
        description: The course's list of prices.
        items:
          $ref: '#/definitions/PriceResource'
      competencyDefinitionIds:
        type: array
        description: The course's list of competency definition IDs.
        items:
          type: string
          format: guid
      prerequisiteCourseIds:
        type: array
        description: The course's list of prerequisite course IDs.
        items:
          type: string
          format: guid
      postEnrollmentCourseIds:
        type: array
        description: The course's list of post enrollment course IDs.
        items:
          type: string
          format: guid
      allowCourseEvaluation:
        type: boolean
        description: True if the course allows evaluation, false otherwise.
      categoryId:
        type: string
        description: The course's category ID.
        format: guid
      certificateUrl:
        type: string
        description: The course's certificate URL, if any.
      audience:
        type: string
        description: The course's audience.
      goals:
        type: string
        description: The course's goals.
      vendor:
        type: string
        description: The course's vendor.
      companyCost:
        type: number
        description: The course's company cost.
        format: decimal
      learnerCost:
        type: number
        description: The course's learner cost.
        format: decimal
      companyTime:
        type: number
        description: The course's amount of company time.
        format: decimal
      learnerTime:
        type: number
        description: The course's amount of learner time.
        format: decimal
      dateEdited:
        type: string
        description: The course's last edited date.
        format: date-time
      dateAdded:
        type: string
        description: The date the course was added.
        format: date-time
  CurriculumGroupResource:
    type: object
    description: 'Resource representing a curriculum group. '
    properties:
      id:
        type: string
        description: Identifier of curriculum group.
        format: guid
      name:
        type: string
        description: Name of curriculum group.
      order:
        type: integer
        description: Order of curriculum group within curriculum.
        format: int32
      requiredNumberOfCourses:
        type: integer
        description: Required number of courses to complete the group.
        format: int32
      curriculumId:
        type: string
        description: Identifier of curriculum this group belongs to.
        format: guid
      courses:
        type: array
        description: Courses in the group.
        items:
          $ref: '#/definitions/CurriculumGroupCourseResource'
  CurriculumGroupCourseResource:
    type: object
    description: 'Resource representing a course in a curriculum group. '
    properties:
      id:
        type: string
        description: Identifier of a course.
        format: guid
      order:
        type: integer
        description: Order of course within the group.
        format: int32
      courseType:
        type: string
        description: Type of the course.
  GetMultipleCurriculumGroupsRequest:
    type: object
    description: The request to get multiple curriculum groups.
    properties:
      groupIds:
        type: array
        description: Identifiers of curriculum groups.
        items:
          type: string
          format: guid
  GetMultipleCurriculumsContainingDetailedInfoRequestModel:
    type: object
    properties:
      Ids:
        type: array
        description: Identifiers of curriculums.
        items:
          type: string
      PageNumber:
        type: integer
        description: Page number. Start from 0. (0 is 1st page, 1 is 2nd page, etc)
        format: int32
      PageSize:
        type: integer
        description: Page size. Min is 1, Max is 20 (included).
        format: int32
  CurriculaResource:
    type: object
    description: Represents a collection of CurriculumResource.
    properties:
      totalItems:
        type: integer
        description: The total number of items in the unbounded collection
        format: int32
      returnedItems:
        type: integer
        description: The number of items in the bound collection being returned
        format: int32
      limit:
        type: integer
        description: The current page size for the collection
        format: int32
      offset:
        type: integer
        description: The current offset for the collection
        format: int32
      curriculums:
        type: array
        description: The paged collection of resources.
        items:
          $ref: '#/definitions/CurriculumResource'
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
tags:
  - name: Curricula
x-servers:
  - url: https://rest.myabsorb.com
    description: US
  - url: https://rest.myabsorb.ca
    description: CA
  - url: https://rest.myabsorb.eu
    description: EU
  - url: https://rest.myabsorb.com.au
    description: AU
