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

# Retrieve calendars by identifier.

> Use this operation to obtain holiday and business-day calendars needed for date calculations. Each supplied
identifier is passed to the market-data lookup and all available calendars are returned. The request is
read-only and does not create missing calendars.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/MarketData/GetCalendars
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/MarketData/GetCalendars:
    post:
      tags:
        - MarketData
      summary: Retrieve calendars by identifier.
      description: >-
        Use this operation to obtain holiday and business-day calendars needed
        for date calculations. Each supplied

        identifier is passed to the market-data lookup and all available
        calendars are returned. The request is

        read-only and does not create missing calendars.
      operationId: GetCalendars
      requestBody:
        description: >-
          The query payload containing a non-empty `Identifiers` collection of
          calendar names or identifiers recognised by the market-data service.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiGetCalendarsRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiGetCalendarsRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiGetCalendarsRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiGetCalendarsRequest'
      responses:
        '200':
          description: >-
            Returns all calendars found for the requested identifiers and any
            lookup errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetCalendarsResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetCalendarsRequest:
      required:
        - $type
      type: object
      properties:
        identifiers:
          type: array
          items:
            type: string
          description: Calendar identifiers to retrieve.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCalendarsRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: Queries business-day calendars by calendar identifier.
    ApiGetCalendarsResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        calendars:
          type: array
          items:
            $ref: '#/components/schemas/Calendar'
          description: Business-day calendars returned for the requested identifiers.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCalendarsResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: Returns the selected business-day calendars.
    Calendar:
      description: Named business-day calendar with holiday dates and weekend treatment.
      discriminator:
        propertyName: $type
        mapping:
          Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core: '#/components/schemas/CalendarMintlifyShape'
          Derivitec.Web.Core.StaticData.CalendarIntersection, Derivitec.Web.Core: '#/components/schemas/CalendarIntersection'
          Derivitec.Web.Core.StaticData.CalendarUnion, Derivitec.Web.Core: '#/components/schemas/CalendarUnion'
      oneOf:
        - $ref: '#/components/schemas/CalendarMintlifyShape'
        - $ref: '#/components/schemas/CalendarIntersection'
        - $ref: '#/components/schemas/CalendarUnion'
    CalendarMintlifyShape:
      required:
        - $type
      type: object
      properties:
        holidays:
          type: array
          items:
            type: string
            format: date-time
          description: Dates treated as holidays by the calendar.
          nullable: true
        include_weekends:
          type: boolean
          description: >-
            Whether weekend dates are included in the calendar's
            non-business-day set.
        name:
          type: string
          description: Name of the business-day calendar.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.StaticData.Calendar, Derivitec.Web.Core
      additionalProperties: false
      description: Named business-day calendar with holiday dates and weekend treatment.
    CalendarIntersection:
      required:
        - $type
      type: object
      properties:
        holidays:
          type: array
          items:
            type: string
            format: date-time
          description: Dates treated as holidays by the calendar.
          nullable: true
        include_weekends:
          type: boolean
          description: >-
            Whether weekend dates are included in the calendar's
            non-business-day set.
        name:
          type: string
          description: Name of the business-day calendar.
          nullable: true
        calendars:
          type: array
          items:
            $ref: '#/components/schemas/Calendar'
          description: Gets or sets the list of underlying calendars in the intersection.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.StaticData.CalendarIntersection,
              Derivitec.Web.Core
      additionalProperties: false
      description: The calendar intersection.
    CalendarUnion:
      required:
        - $type
      type: object
      properties:
        holidays:
          type: array
          items:
            type: string
            format: date-time
          description: Dates treated as holidays by the calendar.
          nullable: true
        include_weekends:
          type: boolean
          description: >-
            Whether weekend dates are included in the calendar's
            non-business-day set.
        name:
          type: string
          description: Name of the business-day calendar.
          nullable: true
        calendars:
          type: array
          items:
            $ref: '#/components/schemas/Calendar'
          description: Gets or sets the list of underlying calendars in the union.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.StaticData.CalendarUnion, Derivitec.Web.Core
      additionalProperties: false
      description: The calendar union.
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````