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

# Post apiutilitiesv0registrymintv0offer

> Get the factory and choice context for creating a mint offer.




## OpenAPI

````yaml /registry/apis/open-api-specs/utility.yaml post /api/utilities/v0/registry/mint/v0/offer
openapi: 3.0.0
info:
  title: Utilities API
  description: Exposes technical information and contract data of the Utility App
  version: 2.1.0
servers:
  - url: https://api.utilities.digitalasset.com
    description: MainNet
  - url: https://api.utilities.digitalasset-staging.com
    description: TestNet
  - url: https://api.utilities.digitalasset-dev.com
    description: DevNet
  - url: http://localhost:8080
    description: Local
security: []
tags:
  - name: utility
paths:
  /api/utilities/v0/registry/mint/v0/offer:
    post:
      tags:
        - registry
      description: |
        Get the factory and choice context for creating a mint offer.
      operationId: getMintOfferCreateContext
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfferMintRequest'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactoryWithChoiceContext'
        '400':
          $ref: '#/components/responses/400'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    OfferMintRequest:
      description: >-
        The request to get the factory and choice context for creating a mint
        offer.
      type: object
      required:
        - holder
        - instrumentId
      properties:
        holder:
          description: The party for whom the holding will be minted.
          type: string
        instrumentId:
          $ref: '#/components/schemas/InstrumentId'
    FactoryWithChoiceContext:
      description: >
        A factory contract together with the choice context required to exercise
        the choice

        provided by the factory. Typically used to implement the generic
        initiation of on-ledger workflows

        via a Daml interface.


        Clients SHOULD avoid reusing the same `FactoryWithChoiceContext` for
        exercising multiple choices,

        as the choice context MAY be specific to the choice being exercised.
      type: object
      required:
        - factoryId
        - choiceContext
      properties:
        factoryId:
          description: >-
            The contract ID of the contract of the factory which can be used to
            create instruction.
          type: string
        choiceContext:
          $ref: '#/components/schemas/ChoiceContext'
    InstrumentId:
      description: The identifier of the instrument.
      type: object
      required:
        - admin
        - id
      properties:
        admin:
          description: The party administering the instrument.
          type: string
        id:
          description: The unique identifier of the instrument.
          type: string
    ChoiceContext:
      description: >
        The context required to exercise a choice on a contract via an
        interface.

        Used to retrieve additional reference date that is passed in via
        disclosed contracts,

        which are in turn referred to via their contract ID in the
        `choiceContextData`.
      type: object
      required:
        - choiceContextData
        - disclosedContracts
      properties:
        choiceContextData:
          description: The additional data to use when exercising the choice.
          type: object
        disclosedContracts:
          description: >
            The contracts that are required to be disclosed to the participant
            node for exercising

            the choice.
          type: array
          items:
            $ref: '#/components/schemas/DisclosedContract'
    Error:
      type: object
      description: >-
        A problem occurred with processing the request. For instance:
        syntactically invalid JSON body, missing required fields, etc.
      required:
        - error
        - error_description
      properties:
        error:
          description: An error code, e.g. invalid_token
          type: string
          default: unknown_error
        error_description:
          description: A description of the error
          type: string
          default: Something went wrong
    DisclosedContract:
      allOf:
        - $ref: '#/components/schemas/ContractMeta'
        - type: object
          required:
            - createdEventBlob
          properties:
            createdEventBlob:
              type: string
              description: The base64 encoded created event blob
    ContractMeta:
      type: object
      required:
        - contractId
        - templateId
      properties:
        createdAt:
          type: string
          format: date-time
        contractId:
          type: string
        templateId:
          type: string
        synchronizerId:
          type: string
          description: >-
            Preferred synchronizer identifier for disclosed contracts and
            contract metadata.
        domainId:
          type: string
          deprecated: true
          description: Deprecated alias of synchronizerId kept for backward compatibility.
  responses:
    '400':
      description: bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````