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

# Get performance obligation

> Use when you need to load a single performance obligation with the subscription line items it covers. Performance obligations are derived from subscriptions and are read-only.



## OpenAPI

````yaml https://swagger.flexprice.io get /performance_obligations/{id}
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /performance_obligations/{id}:
    get:
      tags:
        - Performance Obligations
      summary: Get performance obligation
      description: >-
        Use when you need to load a single performance obligation with the
        subscription line items it covers. Performance obligations are derived
        from subscriptions and are read-only.
      operationId: getPerformanceObligation
      parameters:
        - name: id
          in: path
          description: Performance obligation ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerformanceObligationResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: go
          label: Go
          source: "package main\n\nimport(\n\t\"context\"\n\tflexprice \"github.com/flexprice/go-sdk/v2\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := flexprice.New(\n        flexprice.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n    )\n\n    res, err := s.PerformanceObligations.GetPerformanceObligation(ctx, \"<id>\")\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.PerformanceObligationResponse != nil {\n        // handle response\n    }\n}"
        - lang: python
          label: Python
          source: |-
            from flexprice import Flexprice


            with Flexprice(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as f_client:

                res = f_client.performance_obligations.get_performance_obligation(id="<id>")

                # Handle response
                print(res)
        - lang: typescript
          label: TypeScript
          source: |-
            import { Flexprice } from "@flexprice/sdk";

            const flexprice = new Flexprice({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await flexprice.performanceObligations.getPerformanceObligation("<id>");

              console.log(result);
            }

            run();
components:
  schemas:
    PerformanceObligationResponse:
      type: object
      properties:
        amortization_method:
          $ref: '#/components/schemas/types.AmortizationMethod'
        associations:
          type: array
          items:
            $ref: '#/components/schemas/PerformanceObligationAssociationResponse'
        contract_id:
          type: string
        created_at:
          type: string
          format: date-time
        id:
          type: string
        name:
          type: string
        pob_status:
          $ref: '#/components/schemas/types.PerformanceObligationStatus'
        recognition_method:
          $ref: '#/components/schemas/types.RecognitionMethod'
        service_end:
          type: string
          format: date-time
        service_start:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/types.Status'
        updated_at:
          type: string
          format: date-time
    errors.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/errors.ErrorCode'
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    types.AmortizationMethod:
      type: string
      enum:
        - daily
        - period_even
        - period_even_prorated
      x-enum-varnames:
        - AmortizationDaily
        - AmortizationPeriodEven
        - AmortizationPeriodEvenProrated
      x-speakeasy-name-override: AmortizationMethod
    PerformanceObligationAssociationResponse:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        entity_id:
          type: string
        entity_type:
          $ref: '#/components/schemas/types.RevRecEntityType'
        id:
          type: string
    types.PerformanceObligationStatus:
      type: string
      enum:
        - draft
        - active
        - satisfied
        - cancelled
      x-enum-varnames:
        - PerformanceObligationStatusDraft
        - PerformanceObligationStatusActive
        - PerformanceObligationStatusSatisfied
        - PerformanceObligationStatusCancelled
      x-speakeasy-name-override: PerformanceObligationStatus
    types.RecognitionMethod:
      type: string
      enum:
        - point_in_time
        - straight_line
        - as_consumed
      x-enum-varnames:
        - RecognitionMethodPointInTime
        - RecognitionMethodStraightLine
        - RecognitionMethodAsConsumed
      x-speakeasy-name-override: RecognitionMethod
    types.Status:
      type: string
      enum:
        - published
        - deleted
        - archived
      x-enum-varnames:
        - StatusPublished
        - StatusDeleted
        - StatusArchived
      x-speakeasy-name-override: Status
    errors.ErrorCode:
      type: string
      enum:
        - http_client_error
        - system_error
        - internal_error
        - not_found
        - already_exists
        - version_conflict
        - validation_error
        - invalid_operation
        - permission_denied
        - database_error
        - service_unavailable
        - too_many_requests
        - not_implemented
      x-enum-varnames:
        - ErrCodeHTTPClient
        - ErrCodeSystemError
        - ErrCodeInternalError
        - ErrCodeNotFound
        - ErrCodeAlreadyExists
        - ErrCodeVersionConflict
        - ErrCodeValidation
        - ErrCodeInvalidOperation
        - ErrCodePermissionDenied
        - ErrCodeDatabase
        - ErrCodeServiceUnavailable
        - ErrCodeTooManyRequests
        - ErrCodeNotImplemented
      x-speakeasy-name-override: ErrorCode
    types.RevRecEntityType:
      type: string
      enum:
        - subscription
        - subscription_line_item
        - invoice
        - credit_note
        - payment
        - refund
        - pob
      x-enum-varnames:
        - RevRecEntityTypeSubscription
        - RevRecEntityTypeSubscriptionLineItem
        - RevRecEntityTypeInvoice
        - RevRecEntityTypeCreditNote
        - RevRecEntityTypePayment
        - RevRecEntityTypeRefund
        - RevRecEntityTypePOB
      x-speakeasy-name-override: RevRecEntityType
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.