openapi: 3.0.0
info:
  title: ""
  description: "With the MCM API, you can create, update, delete, and search for document versions."
  version: 1.2.0
servers:
- url: "https://{instanceUrl}/services/apexrest/mvn/mcm/v1/"
tags:
- name: documents
  description: Handling of `mvn_CM_Document_c` records.
- name: document-versions
  description: Handling of `mvn_CM_Document_Version_c` records.
paths:
  /documents:
    post:
      tags:
      - documents
      summary: Create new documents with a document version.
      description: |-
        Creates new `mvn__CM_Document__c` records with a `mvn__CM_Document_Version__c` and a related file, products and regions.<br /><br />
        Lifecycle is assigned automatically based on the passed in `mvn__CM_Document_Type__c`.<br /><br />
        The fields `mvn__CM_Major_Version_Number__c`, `mvn__CM_Minor_Major_Version_Number__c` and `mvn__CM_Status__c` are initialized to `0`, `1` and the defined lifecycle's `mvn__CM_Initial_State__c` during creation, the only exception is when at least one of those fields is provided, in which case any of the three fields are initialized.<br /><br />
        When creating a new record it is recommended to include the `OwnerId` to avoid ownership data skew (<a href="https://developer.salesforce.com/docs/atlas.en-us.draes.meta/draes/draes_group_membership_data_skew.htm">more information here</a>). The `Owner` can also be set using an external `Id` on the `User` (see request example).
      requestBody:
        description: "Array of documents' metadata that may include file, product and region information"
        content:
          application/json:
            schema:
              maxItems: 10
              type: array
              description: List of `mvn__CM_Document__c` and `mvn__CM_Document_Version__c` records representation to be created.
              items:
                $ref: "#/components/schemas/CM_DocumentCreateRequest"
            examples:
              Using Salesforce Ids:
                $ref: "#/components/examples/DocumentCreateRequestWithSalesforceIds"
              Using External Ids:
                $ref: "#/components/examples/DocumentCreateRequestWithExternalIds"
        required: true
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/mvn__CM_Document_Version__c"
              examples:
                DocumentCreateResponse:
                  $ref: "#/components/examples/DocumentCreateResponse"
        "400":
          description: Bad request
        "500":
          description: Error creating the document
  /documents/{documentId}:
    post:
      tags:
      - documents
      summary: Create a new version of the document.
      description: "Creates a new `mvn__CM_Document_Version__c` for the `mvn__CM_Document__c`, including the file relationship, products and regions.<br /><br /> The new `mvn__CM_Document_Version__c` is created from scratch based on the request and no values are carried over from the previous version. Note that passing a value for the field `mvn__CM_Previous_Document_Version__c` is not supported and the valued will be cleared out.<br /><br /> The new document version number must be greater than the MCM's latest version.<br /><br /> The `CM_Edit_Document` permission is required in order to create the new version.<br /><br /> When creating a new record it is recommended to include the `OwnerId` to avoid ownership data skew (<a href=\"https://developer.salesforce.com/docs/atlas.en-us.draes.meta/draes/draes_group_membership_data_skew.htm\">more information here</a>). The `Owner` can also be set using an external `Id` on the `User` (see request example)."
      parameters:
      - name: documentId
        in: path
        description: The Salesforce `Id` of the `mvn__CM_Document__c` record
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        description: "Document version metadata that may include file, product and region information"
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CM_DocumentCreateRequest"
            examples:
              Using Salesforce Ids:
                $ref: "#/components/examples/DocumentCreateVersionRequestWithSalesforceIds"
              Using External Ids:
                $ref: "#/components/examples/DocumentCreateVersionRequestWithExternalIds"
        required: true
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/mvn__CM_Document_Version__c"
              examples:
                DocumentCreateVersionResponse:
                  $ref: "#/components/examples/DocumentCreateVersionResponse"
        "400":
          description: Bad Request
        "403":
          description: Forbidden
        "404":
          description: Not found
        "500":
          description: Error creating the document version
    delete:
      tags:
      - documents
      summary: Deletes the document and all related document versions.
      description: Deletes the `mvn__CM_Document__c` and all the associated `mvn__CM_Document_Version__c` record. It requires `CM_Delete` permission for the `mvn__CM_Document__c`.
      parameters:
      - name: documentId
        in: path
        description: The Salesforce `Id` of the `mvn__CM_Document__c` record
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Ok
        "403":
          description: Forbidden
        "500":
          description: Internal server error
  /document-versions/{documentVersionId}:
    get:
      tags:
      - document-versions
      summary: Query the document version.
      description: "Queries the `mvn__CM_Document_Version__c` record with the passed in Salesforce `Id`. The endpoint returns the queried record's metadata, which includes all visible fields, the URL of the record, and associated regions, products, renditions, and documents."
      parameters:
      - name: documentVersionId
        in: path
        description: The Salesforce `Id` of the `mvn__CM_Document_Version__c` record
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: includeOutwardRelationships
        in: query
        description: Indicates whether the response should list the documents that are in an outward relationship with the specified document version (`true`) or not list them (`false`).
        required: false
        schema:
          type: string
          enum:
          - "true"
          - "false"
      - name: includeInwardRelationships
        in: query
        description: Indicates whether the response should list the documents that are in an inward relationship with the specified document version (`true`) or not list them (`false`).
        required: false
        schema:
          type: string
          enum:
          - "true"
          - "false"
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CM_DocumentVersion"
              examples:
                DocumentVersionGetResponse:
                  $ref: "#/components/examples/DocumentVersionGetResponse"
        "404":
          description: Not found
        "500":
          description: Other error
    delete:
      tags:
      - document-versions
      summary: Deletes the document version
      description: Deletes the `mvn__CM_Document_Version__c` record. It requires `CM_Delete_Version` permission for the `mvn__CM_Document_Version__c`.
      parameters:
      - name: documentVersionId
        in: path
        description: The Salesforce `Id` of the `mvn__CM_Document_Version__c` record
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Ok
        "403":
          description: Forbidden
        "500":
          description: Internal server error
    patch:
      tags:
      - document-versions
      summary: Update the document version metadata
      description: Updates the `mvn__CM_Document_Version__c` metadata. This endpoint does not support external Ids for the `documentRelationships` or `documentRegions`. The `CM_Edit_Metadata` permission is required in order to update document version metadata.
      parameters:
      - name: documentVersionId
        in: path
        description: The Salesforce `Id` of the `mvn__CM_Document_Version__c` record
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        description: Document version metadata that may include product and region information.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CM_DocumentVersionEditMetadataRequest"
            examples:
              Document Version Edit Metadata Request:
                $ref: "#/components/examples/DocumentVersionEditMetadataRequest"
        required: true
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/mvn__CM_Document_Version__c"
              example:
                $ref: "#/components/examples/DocumentVersionEditMetadataResponse"
        "403":
          description: Forbidden
        "500":
          description: Other error
  /document-versions/search:
    get:
      tags:
      - document-versions
      summary: Retrieve the next page of results and the URL for the next page if there are more pages.
      parameters:
      - name: Id
        in: query
        description: Id of a results page. The `NextPageUrl` returned from a previous call contains this Id.
        required: true
        style: form
        explode: true
        schema:
          type: string
      responses:
        "200":
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuccessResponse"
              examples:
                DocumentVersionSearchResponse:
                  $ref: "#/components/examples/DocumentVersionSearchResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
    post:
      tags:
      - document-versions
      summary: Search for document versions and retrieve the first page of results.
      description: "With this endpoint, you can search for and retrieve a list of documents that meet filter criteria. If there is more than one page of results, the endpoint also returns a URL for the next page. <br /><br /> As the MCM API uses token (cursor) based pagination, there is no limit to the number of pages the API can support. The [mcmSearch Platform Cache partition](https://help.mavens.com/mic/en/content-management-module/platform-cache.html) must have allocated space in order to use this API)."
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchRequestBody"
            examples:
              Simple search criteria:
                $ref: "#/components/examples/simple_search_criteria"
              Complex search criteria:
                $ref: "#/components/examples/complex_search_criteria"
        required: true
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SuccessResponse"
              examples:
                DocumentVersionSearchResponse:
                  $ref: "#/components/examples/DocumentVersionSearchResponse"
        "400":
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    CM_DocumentCreateRequest:
      required:
      - documentVersion
      type: object
      properties:
        documentVersion:
          required:
          - mvn__CM_Document_Type__c
          - mvn__CM_Title__c
          type: object
          properties:
            mvn__CM_Document_Type__c:
              type: string
              description: "The type of document to create, the value must match one of the picklist API names configured in the org"
            mvn__CM_Title__c:
              type: string
              description: Title of the `mvn__CM_Document_Version__c` record
          additionalProperties:
            description: Any of the writtable `mvn__CM_Document_Version__c` fields
            oneOf:
            - type: string
            - type: number
            - type: integer
            - type: boolean
          description: The `mvn__CM_Document_Version__c` record representation
        documentRelationships:
          type: array
          items:
            $ref: "#/components/schemas/mvn__CM_Document_Relationship__c"
        documentRegions:
          type: array
          items:
            $ref: "#/components/schemas/mvn__CM_Document_Region__c"
        contentVersionId:
          type: string
          description: Salesforce `Id` of the `ContentVersion` record to be associated with the new `mvn__CM_Document_Version__c` record
      description: The `mvn__CM_Document__c` and `mvn__CM_Document_Version__c` records representation
    CM_DocumentVersion:
      type: object
      properties:
        sourceUrl:
          type: string
          description: URL of the Document Version record.
        renditionsUrl:
          type: string
          description: URL of the associated rendition.
        document:
          allOf:
          - $ref: "#/components/schemas/mvn__CM_Document_Version__c"
          - type: object
            properties:
              mvn__CM_Document_Regions__r:
                description: List of related document regions.
                allOf:
                - $ref: "#/components/schemas/SObject"
                - type: object
                  properties:
                    mvn__CM_Document_Version__c:
                      type: string
                      description: An `mvn__CM_Document_Version__c` representation with all the visible fields.
                    mvn__CM_Region__c:
                      type: string
                      description: Geographical area associated with the document version.
                    mvn__CM_Region__r:
                      description: Representation of the mvn__Region__c object that includes the country ISO code instead of the Salesforce `Id`.
                      allOf:
                      - $ref: "#/components/schemas/SObject"
                      - type: object
                        properties:
                          Name:
                            type: string
                          mvn__Country__c:
                            type: string
                            description: DeveloperName of the referenced `mvn__Country__mdt` record.
                          mvn__Country_ISO_Code__c:
                            type: string
                            description: Two characters ISO code of the country or region.
              mvn__CM_Document_Relationships_1__r:
                type: array
                items:
                  anyOf:
                  - $ref: "#/components/schemas/DocumentRelationship"
                  - $ref: "#/components/schemas/ProductRelationship"
              mvn__CM_Document_Relationship_2__r:
                type: array
                items:
                  allOf:
                  - $ref: "#/components/schemas/DocumentRelationship"
      description: The request `mvn__CM_Document_Version__c` record representation.
    CM_DocumentVersionEditMetadataRequest:
      type: object
      properties:
        documentVersion:
          type: object
          additionalProperties:
            description: All the visible `mvn__CM_Document_Version__c` fields.
            oneOf:
            - type: string
            - type: number
            - type: integer
            - type: boolean
        documentRelationships:
          type: array
          items:
            description: Document Relationship representation.
            oneOf:
            - required:
              - mvn__CM_Product__c
              type: object
              properties:
                mvn__CM_Product__c:
                  type: string
                  description: "Salesforce `Id` of the `mvn__CM_Product__c` record, this property may only be used when the MCM Product Catalog is configured in the org."
            - required:
              - MED_Product__c
              type: object
              properties:
                MED_Product__c:
                  type: string
                  description: "Salesforce `Id` of the `MED_Product__c` record, this property may only be used when the MIC Product Catalog is configured in the org."
        documentRegions:
          type: array
          items:
            required:
            - mvn__CM_Region__c
            type: object
            properties:
              mvn__CM_Region__c:
                type: string
                description: Salesforce `Id` of the `mvn__Region__c` record.
            description: Document Region representation.
      description: The request `mvn__CM_Document_Version__c` record representation for a metadata update.
    ComplexFilter:
      description: "The endpoint supports the `AnyTrue`, `AllTrue`, and `NotTrue` complex operators."
      oneOf:
      - type: object
        properties:
          AnyTrue:
            type: array
            items:
              $ref: "#/components/schemas/SimpleFilter"
      - type: object
        properties:
          AllTrue:
            type: array
            items:
              $ref: "#/components/schemas/SimpleFilter"
      - type: object
        properties:
          NotTrue:
            type: array
            items:
              $ref: "#/components/schemas/SimpleFilter"
    DocumentRelationship:
      description: Inward/outward document relationships(`mvn__CM_Document_Relationships_1__r`/`mvn__CM_Document_Relationships_2__r`).
      allOf:
      - $ref: "#/components/schemas/SObject"
      - type: object
        properties:
          mvn__CM_Document_Version_1__c:
            type: string
            description: "Document Version record on the source side of a document-document relationship. For example, in a Translation relationship, `CM_Document_Version_2__c` is a translation of `CM_Document_Version_1__c`."
          mvn__CM_Document_Version_2__c:
            type: string
            description: "Document Version record on the destination side of a document-document relationship. For example, in a Sourced relationship, `CM_Document_Version_2__c` is cloned from `CM_Document_Version_1__c`."
          mvn__CM_Category:
            type: string
            description: Category of relationship (i.e. document-document relationship or document-product relationship).
          mvn__CM_Type__c:
            type: string
            description: Type of document-document relationship.
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        errorCode:
          type: string
      example:
        message: "No such column 'mvn__CM_Status__' on entity 'mvn__CM_Document_Version__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."
        errorCode: FAILURE
    mvn__CM_Document_Relationship__c:
      description: Document Relationship representation
      oneOf:
      - required:
        - mvn__CM_Product__c
        type: object
        properties:
          mvn__CM_Product__c:
            type: string
            description: "Salesforce `Id` of the `mvn__CM_Product__c` record, this property may only be used when the MCM Product Catalog is configured in the org"
      - required:
        - MED_Product__c
        type: object
        properties:
          MED_Product__c:
            type: string
            description: "Salesforce `Id` of the `MED_Product__c` record, this property may only be used when the MIC Product Catalog is configured in the org"
      - required:
        - mvn__CM_Product__r
        type: object
        properties:
          mvn__CM_Product__r:
            required:
            - mvn__CM_External_Id__c
            type: object
            properties:
              mvn__CM_External_Id__c:
                type: string
            description: "Representation of the mvn__CM_Product__c object that includes the external Id instead of the Salesforce `Id`, this property may only be used when the MCM Product Catalog is configured in the org"
      - required:
        - MED_Product__r
        type: object
        properties:
          MED_Product__r:
            required:
            - MED_External_Id__c
            type: object
            properties:
              MED_External_Id__c:
                type: string
                description: External Id for the MIC product.
            description: "Representation of the MED_Product__c object that includes the external Id instead of the Salesforce `Id`, this property may only be used when the MIC Product Catalog is configured in the org"
    mvn__CM_Document_Region__c:
      description: Document Region representation
      oneOf:
      - required:
        - mvn__CM_Region__c
        type: object
        properties:
          mvn__CM_Region__c:
            type: string
            description: Salesforce `Id` of the `mvn__Region__c` record
      - required:
        - mvn__CM_Region__r
        type: object
        properties:
          mvn__CM_Region__r:
            required:
            - mvn__Country_ISO_Code__c
            type: object
            properties:
              mvn__Country_ISO_Code__c:
                type: string
                description: Two characters ISO code of the country or region.
            description: Representation of the mvn__Region__c object that includes the country ISO code instead of the Salesforce `Id`.
    mvn__CM_Document_Version__c:
      type: object
      properties:
        attributes:
          type: object
          properties:
            type:
              type: string
            url:
              type: string
        Id:
          type: string
          description: Salesforce `Id` of the `mvn__CM_Document_Version__c`
      additionalProperties:
        description: All the visible `mvn__CM_Document_Version__c` fields
        oneOf:
        - type: string
        - type: number
        - type: integer
        - type: boolean
      description: An `mvn__CM_Document_Version__c` representation with all the visible fields.
    ProductRelationship:
      description: Product relationship (mvn__CM_Document_Relationships_1__r)
      anyOf:
      - allOf:
        - $ref: "#/components/schemas/SObject"
        - type: object
          properties:
            mvn__CM_Document_Version_1__c:
              type: string
              description: Document Version record that is related to a product.
            mvn__CM_Category:
              type: string
              description: Category of relationship (i.e. document-document relationship or document-product relationship).
            mvn__CM_Product__c:
              type: string
              description: Product (`mvn__CM_Product__c`) record that is related to the Document Version record.
            mvn__CM_Product__r:
              allOf:
              - $ref: "#/components/schemas/SObject"
              - type: object
                properties:
                  Name:
                    type: string
                    description: Name of the product (`mvn__CM_Product__c`) that displays in the user interface.
      - allOf:
        - $ref: "#/components/schemas/SObject"
        - type: object
          properties:
            mvn__CM_Document_Version_1__c:
              type: string
              description: Document Version record that is related to a product.
            mvn__CM_Category:
              type: string
              description: Category of relationship (i.e. document-document relationship or document-product relationship).
            MED_Product__c:
              type: string
              description: Product (`MED_Product__c`) record that is related to the Document Version record.
            MED_Product__r:
              allOf:
              - $ref: "#/components/schemas/SObject"
              - type: object
                properties:
                  Name:
                    type: string
                    description: Name of the product (`MED_Product__c`) that displays in the user interface.
    SearchRequestBody:
      type: object
      properties:
        pageLimit:
          type: integer
          description: Maximum number of results returned in a single page. This number cannot exceed 200.
        documentFilters:
          type: array
          description: Document version filters associated to this request
          items:
            anyOf:
            - $ref: "#/components/schemas/SimpleFilter"
            - $ref: "#/components/schemas/ComplexFilter"
        productFilters:
          type: array
          description: Product filters associated to this request
          items:
            anyOf:
            - $ref: "#/components/schemas/SimpleFilter"
            - $ref: "#/components/schemas/ComplexFilter"
        regionFilters:
          type: array
          description: Region filters associated to this request
          items:
            anyOf:
            - $ref: "#/components/schemas/SimpleFilter"
            - $ref: "#/components/schemas/ComplexFilter"
        id:
          type: string
          description: Unique identifier for the request (UUID)
        keyword:
          type: string
          description: Keyword associated to this request
        lastRecordId:
          type: string
          description: Record Id that represents the offset
        lastValueOfSortedField:
          type: string
          description: Last value of sorted field. This should be encoded if ever passed via URL.
        sortBy:
          type: string
          description: API name of the Document Version field that the returned documents are sorted by. Include the namespace of the field.
        sortDirection:
          type: string
          description: Indicates whether the returned Document Versions are listed in ascending or descending order.
          enum:
          - asc
          - ASC
          - desc
          - DESC
        includeOutwardRelationships:
          type: boolean
          description: Indicates whether the response should include the documents that are in an outward relationship with the retrieved document versions (`true`) or not list them (`false`).
        includeInwardRelationships:
          type: boolean
          description: Indicates whether the response should include the documents that are in an inward relationship with the retrieved document versions (`true`) or not list them (`false`).
    SimpleFilter:
      type: object
      properties:
        fieldName:
          type: string
          description: Field that the filter criteria is based on.
        operator:
          type: string
          description: Specifies how `fieldName` relates to `value`.
          enum:
          - Equals
          - NotEquals
          - Includes
          - Excludes
          - GreaterThan
          - GreaterThanOrEqualTo
          - LessThan
          - LessThanOrEqualTo
          - SoqlLike
          - SoqlNotLike
          - SoqlIn
          - SoqlNotIn
        value:
          type: string
          description: Value of the `fieldName` that the filter criteria is based on.
    SObject:
      type: object
      properties:
        attributes:
          type: object
          properties:
            type:
              type: string
            url:
              type: string
        Id:
          type: string
      description: Represents a Salesforce `SObject`.
    SuccessResponse:
      type: object
      properties:
        totalRecords:
          type: integer
          description: Number of records that meet the filter criteria.
        status:
          type: string
          description: Whether the request succeeded or failed.
        pageRecords:
          type: integer
          description: Number of records listed on the returned page.
        pageLimit:
          type: integer
          description: Maximum number of results returned in a single page. This number cannot exceed 200.
        nextPageUrl:
          type: string
          description: URL that you can make a GET request to for the next page of results.
        message:
          type: string
          description: Message associated with the response.
        documents:
          type: array
          description: List of documents that meet the filter criteria.
          items:
            type: object
            properties:
              sourceUrl:
                type: string
                description: URL of the document version record.
              renditions:
                type: array
                description: Renditions associated with the document version.
                items:
                  type: object
                  properties:
                    url:
                      type: string
                      description: URL of the ContentVersion for the rendition.
                    type:
                      type: string
                      description: Type of rendition.
                      example: CM_Viewable_Rendition
                    id:
                      type: string
                      description: Salesforce Id of the mvn__CM_Document_Rendition__c record.
                    fileSize:
                      type: number
                      description: Size of the rendition file.
                    fileName:
                      type: string
                      description: Name of the rendition file.
                    fileExtension:
                      type: string
                      description: Extension of the rendition file.
                    createdDate:
                      type: string
                      description: Date/Time when the document rendition was created.
                    createdById:
                      type: string
                      description: Salesforce Id of the user who created the document rendition.
              document:
                type: object
                properties:
                  mvn__CM_Region__c:
                    type: string
                    description: Geographical area associated with the document version.
                  mvn__CM_Product__c:
                    type: string
                    description: Product associated with the document version.
                  mvn__CM_Document_Relationships_2__r:
                    type: array
                    items:
                      $ref: "#/components/schemas/DocumentRelationship"
                  mvn__CM_Document_Relationships_1__r:
                    type: array
                    items:
                      anyOf:
                      - $ref: "#/components/schemas/DocumentRelationship"
                      - $ref: "#/components/schemas/ProductRelationship"
                  mvn__CM_Version_Number__c:
                    type: number
                    description: "Version Number of the document version, e.g. `5.4` where `5` is the Major Version Number and `4` is the Minor Version Number."
                  mvn__CM_Title__c:
                    type: string
                    description: "Title of the document version, e.g. `Dosing Guide`. Title does not include Version Number."
                  mvn__CM_Thumbnail__c:
                    type: string
                    description: Pointer to the thumbnail URL of the document version.
                  mvn__CM_Thumbnail_URL__c:
                    type: string
                    description: Relative URL of the thumbnail rendition.
                  mvn__CM_Status__c:
                    type: string
                    description: DeveloperName of the `CM_Status__mdt` associated to the document version.
                  mvn__CM_Status_Custom_Label__c:
                    type: string
                    description: Custom label for the document version's status.
                  mvn__CM_Minor_Version_Number__c:
                    type: integer
                    description: "Minor version number of the version. For example, if the Version Number is `5.4`, the Minor Version Number is `4`."
                  mvn__CM_Metadata_Last_Modified_Date__c:
                    type: string
                    description: Date and time when the document version metadata was last modified.
                  mvn__CM_Metadata_Last_Modified_By__c:
                    type: string
                    description: User who last modified the document version's metadata.
                  mvn__CM_Major_Version_Number__c:
                    type: integer
                    description: "Major version number of the document version. For example, if the Version Number is `5.4`, the Major Version Number is `5`."
                  mvn__CM_Latest_Version_Title__c:
                    type: string
                    description: Title of the latest document version.
                  mvn__CM_Latest_Version_Number__c:
                    type: string
                    description: Version number of the latest document version.
                  mvn__CM_Latest_Document_Version_ID__c:
                    type: string
                    description: Record ID of the latest document version.
                  mvn__CM_Language__c:
                    type: string
                    description: Language of the document version.
                  mvn__CM_Is_Latest_Version__c:
                    type: boolean
                    description: Whether the document version is the latest document version of the document record that the document version is associated to.
                  mvn__CM_Fully_Qualified_Name__c:
                    type: string
                    description: "Fully Qualified Name of the document version. The Fully Qualified Name is comprised of the Title followed by the Version Number. For example, if the Fully Qualified Name of a document version is `Dosing Guide (v0.4)`, `Dosing Guide` is the Title, and `0.4` is the Version Number."
                  mvn__CM_File_Size__c:
                    type: integer
                    description: Size of the file associated with the document version.
                  mvn__CM_File_Id__c:
                    type: string
                    description: ID of the file associated with the document version.
                  mvn__CM_File_Extension__c:
                    type: string
                    description: File extension of the file associated with the document version.
                  mvn__CM_External_File__c:
                    type: boolean
                    description: Whether the file associated with the document version is hosted outside of Salesforce.
                  mvn__CM_Expiration_Reminder_Date__c:
                    type: string
                    description: Date when Document Version expiration reminders are sent.
                  mvn__CM_Expiration_Date__c:
                    type: string
                    description: Date and time the Document Version expires.
                  mvn__CM_Document__c:
                    type: string
                    description: Parent document of the document version.
                  mvn__CM_Document_Type__c:
                    type: string
                    description: Document Type of the document version.
                  mvn__CM_Document_Subtype__c:
                    type: string
                    description: Subtype of the document version. Subtype depends on Document Type and controls Document Classification.
                  mvn__CM_Document_Number__c:
                    type: string
                    description: Document number of the parent document.
                  mvn__CM_Document_Lifecycle__c:
                    type: string
                    description: Lifecycle of the parent document.
                  mvn__CM_Description__c:
                    type: string
                    description: Description of the document version.
                  mvn__CM_Delivery_Option__c:
                    type: string
                    description: Approved delivery options for the Document Version.
                  mvn__CM_Content_Version_Id__c:
                    type: string
                    description: ID of the associated Content Version.
                  mvn__CM_Checked_Out__c:
                    type: boolean
                    description: Whether the document version is currently checked out.
                  mvn__CM_Allowed_Audience__c:
                    type: string
                    description: Audience allowed to use the Document Version.
                  LastReferencedDate:
                    type: string
                    description: Date and time when a user last viewed a record related to the document version.
                  LastViewedDate:
                    type: string
                    description: Date and time that a user last viewed the document version.
                  SystemModstamp:
                    type: string
                    description: "Date and time when the document version was last modified by a user or an automated process, such as a trigger."
                  LastModifiedById:
                    type: string
                    description: ID of the field that was last modified on the document version.
                  LastModifiedDate:
                    type: string
                    description: Date and time the document version was last modified by a user.
                  CreatedById:
                    type: string
                    description: ID of the user who created the document version.
                  CreatedDate:
                    type: string
                    description: Date and time the document version was created.
                  Name:
                    type: string
                    description: Identifier of the document version record.
                  IsDeleted:
                    type: boolean
                    description: Whether the document version is deleted.
                  OwnerId:
                    type: string
                    description: ID of the user who owns the record.
                  Id:
                    type: string
                    description: ID of the record.
  examples:
    complex_search_criteria:
      value:
        pageLimit: 50
        documentFilters:
        - AnyTrue:
          - fieldName: mvn__CM_Document_Type__c
            operator: Equals
            value: CM_Medical_Information_Response
          - fieldName: mvn__CM_Allowed_Audience__c
            operator: Equals
            value: HCP
        productFilters:
        - AllTrue:
          - fieldName: MED_Status__c
            operator: Equals
            value: Active
          - fieldName: MED_Country__c
            operator: Equals
            value: United_States
        regionFilters:
        - fieldName: mvn__Country__c
          operator: NotEquals
          value: France
        keyword: children
        sortBy: mvn__CM_Title__c
        sortDirection: asc
        includeOutwardRelationships: true
        includeInwardRelationships: true
    DocumentCreateRequestWithExternalIds:
      value:
      - documentVersion:
          mvn__CM_Document_Type__c: CM_Medical_Information_Response
          mvn__CM_Document_Subtype__c: CM_Standard_Response
          mvn__CM_Title__c: Dosing guide
          mvn__CM_Language__c: en-US
          mvn__CM_Description__c: Dosing guide standard response
          Owner:
            attributes:
              type: User
            Customer_Defined_External_Id__c: "0001"
        documentRelationships:
        - mvn__CM_Product__r:
            mvn__CM_External_Id__c: "00001"
        - mvn__CM_Product__r:
            mvn__CM_External_Id__c: "00002"
        documentRegions:
        - mvn__CM_Region__r:
            mvn__Country_ISO_Code__c: US
        - mvn__CM_Region__r:
            mvn__Country_ISO_Code__c: CA
        contentVersionId: 068P00000013jZhIAI
    DocumentCreateRequestWithSalesforceIds:
      value:
      - documentVersion:
          mvn__CM_Document_Type__c: CM_Medical_Information_Response
          mvn__CM_Document_Subtype__c: CM_Standard_Response
          mvn__CM_Title__c: Dosing guide
          mvn__CM_Language__c: en-US
          mvn__CM_Description__c: Dosing guide standard response
          OwnerId: 005P0000006JG8HIAW
        documentRelationships:
        - mvn__CM_Product__c: a0DP0000006pAIaMAM
        - mvn__CM_Product__c: a0DP0000006pAIaMAN
        documentRegions:
        - mvn__CM_Region__c: a02P0000008HSAMIA4
        - mvn__CM_Region__c: a02P0000008HSAMIA5
        contentVersionId: 068P00000013jZhIAI
    DocumentCreateResponse:
      value:
      - attributes:
          type: "mvn__CM_Document_Version__c,"
          url: /service/data/v50.0/sobjects/mvn__CM_Document_Version__c/a09P000000B0oIdIAJ
        Id: a09P000000B0oIdIAJ
        mvn__CM_Document_Type__c: CM_Medical_Information_Response
        mvn__CM_Document_Subtype__c: CM_Standard_Response
        mvn__CM_Title__c: Dosing guide
        mvn__CM_Language__c: en-US
        mvn__CM_Description__c: Dosing guide standard response
    DocumentCreateVersionResponse:
      value:
        attributes:
          type: "mvn__CM_Document_Version__c,"
          url: /service/data/v50.0/sobjects/mvn__CM_Document_Version__c/a09P000000B0oIdIAJ
        Id: a09P000000B0oIdIAJ
        mvn__CM_Document_Type__c: CM_Medical_Information_Response
        mvn__CM_Document_Subtype__c: CM_Standard_Response
        mvn__CM_Title__c: Dosing guide
        mvn__CM_Language__c: en-US
        mvn__CM_Description__c: Dosing guide standard response
    DocumentCreateVersionRequestWithExternalIds:
      value:
        documentVersion:
          mvn__CM_Document_Type__c: CM_Medical_Information_Response
          mvn__CM_Document_Subtype__c: CM_Standard_Response
          mvn__CM_Title__c: Dosing guide
          mvn__CM_Language__c: en-US
          mvn__CM_Description__c: Dosing guide standard response
          Owner:
            attributes:
              type: User
            Customer_Defined_External_Id__c: "0001"
        documentRelationships:
        - mvn__CM_Product__r:
            mvn__CM_External_Id__c: "00001"
        - mvn__CM_Product__r:
            mvn__CM_External_Id__c: "00002"
        documentRegions:
        - mvn__CM_Region__r:
            mvn__Country_ISO_Code__c: US
        - mvn__CM_Region__r:
            mvn__Country_ISO_Code__c: CA
        contentVersionId: 068P00000013jZhIAI
    DocumentCreateVersionRequestWithSalesforceIds:
      value:
        documentVersion:
          mvn__CM_Document_Type__c: CM_Medical_Information_Response
          mvn__CM_Document_Subtype__c: CM_Standard_Response
          mvn__CM_Title__c: Dosing guide
          mvn__CM_Language__c: en-US
          mvn__CM_Description__c: Dosing guide standard response
          OwnerId: 005P0000006JG8HIAW
        documentRelationships:
        - mvn__CM_Product__c: a0DP0000006pAIaMAM
        - mvn__CM_Product__c: a0DP0000006pAIaMAN
        documentRegions:
        - mvn__CM_Region__c: a02P0000008HSAMIA4
        - mvn__CM_Region__c: a02P0000008HSAMIA5
        contentVersionId: 068P00000013jZhIAI
    DocumentVersionEditMetadataResponse:
      value:
        Id: a091D00000CYR2SQAX
        mvn__CM_Document_Type__c: CM_Medical_Information_Response
        mvn__CM_Document_Subtype__c: CM_Standard_Response
        mvn__CM_Title__c: Dosing guide
        mvn__CM_Language__c: en-US
        mvn__CM_Description__c: Dosing guide standard response
        OwnerId: 005P0000006JG8HIAW
    DocumentVersionEditMetadataRequest:
      value:
        documentVersion:
          mvn__CM_Description__c: Dosing guide standard response
        documentRelationships:
        - mvn__CM_Product__c: a0DP0000006pAIaMAM
        - mvn__CM_Product__c: a0DP0000006pAIaMAN
        documentRegions:
        - mvn__CM_Region__c: a02P0000008HSAMIA4
        - mvn__CM_Region__c: a02P0000008HSAMIA5
    DocumentVersionGetResponse:
      value:
        sourceUrl: /services/data/v50.0/connect/files/0690R000001LiL0QAK/content
        renditions: /services/data/v50.0/connect/files/0690R000001LiL0QAK/previews
        document:
          mvn__CM_Document_Regions__r:
          - attributes:
              type: mvn__CM_Document_Region__c
              url: /services/data/v53.0/sobjects/mvn__CM_Document_Region__c/a0Q0R000004clqoUAA
            mvn__CM_Document_Version__c: a0W0R000005TVyoUAG
            Id: a0Q0R000004clqoUAA
            mvn__CM_Region__c: a0M0R000004ZGdsUAG
            mvn__CM_Region__r:
              attributes:
                type: mvn__Region__c
                url: /services/data/v53.0/sobjects/mvn__Region__c/a0M0R000004ZGdsUAG
              Id: a0M0R000004ZGdsUAG
              Name: United States
              mvn__Country__c: United_States
              mvn__Country_ISO_Code__c: US
          mvn__CM_Document_Relationships_2__r:
          - attributes:
              type: mvn__CM_Document_Relationship__c
              url: /services/data/v53.0/sobjects/mvn__CM_Document_Relationship__c/a0R0R000002bFupUAE
            mvn__CM_Document_Version_2__c: a0W0R000005TVyoUAG
            Id: a0R0R000002bFupUAE
            mvn__CM_Category__c: Document
            mvn__CM_Type__c: CM_Bundle
            mvn__CM_Document_Version_1__c: a0W0R000005TVynUAG
          mvn__CM_Document_Relationships_1__r:
          - attributes:
              type: mvn__CM_Document_Relationship__c
              url: /services/data/v53.0/sobjects/mvn__CM_Document_Relationship__c/a0R0R000002bFuoUAE
            mvn__CM_Document_Version_1__c: a0W0R000005TVyoUAG
            Id: a0R0R000002bFuoUAE
            mvn__CM_Category__c: Document
            mvn__CM_Type__c: CM_Bundle
            mvn__CM_Document_Version_2__c: a0W0R000005TVypUAG
          - attributes:
              type: mvn__CM_Document_Relationship__c
              url: /services/data/v53.0/sobjects/mvn__CM_Document_Relationship__c/a0R0R000002ilisUAA
            mvn__CM_Document_Version_1__c: a0W0R000005TVyoUAG
            Id: a0R0R000002ilisUAA
            mvn__CM_Category__c: Product
            MED_Product__c: a0v0R00000314ZRQAY
            MED_Product__r:
              attributes:
                type: MED_Product__c
                url: /services/data/v53.0/sobjects/MED_Product__c/a0v0R00000314ZRQAY
              Id: a0v0R00000314ZRQAY
              Name: Labrinone
          MED_Custom_Response__c: false
          mvn__CM_Version_Number__c: "6.0"
          mvn__CM_Title__c: Labrinone - FAQ - Is Labrinone safe for children
          mvn__CM_Thumbnail__c: /sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB120BY90&versionId=0680R000001ckrdQAA&operationContext=CHATTER&page=0
          mvn__CM_Thumbnail_URL__c: /sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB120BY90&versionId=0680R000001ckrdQAA&operationContext=CHATTER&page=0
          mvn__CM_Status__c: CM_Published
          mvn__CM_Status_Custom_Label__c: CM_Document_State_Published
          mvn__CM_Minor_Version_Number__c: 0
          mvn__CM_Metadata_Last_Modified_Date__c: 2022-01-05T16:36:34.000Z
          mvn__CM_Metadata_Last_Modified_By__c: 0050R00000AZap7QAD
          mvn__CM_Major_Version_Number__c: 6
          mvn__CM_Latest_Version_Title__c: Labrinone - FAQ - Is Labrinone safe for children (v6.0)
          mvn__CM_Latest_Version_Number__c: "6.0"
          mvn__CM_Latest_Document_Version_ID__c: a0W0R000005TVyo
          mvn__CM_Language__c: en_US
          mvn__CM_Is_Latest_Version__c: true
          mvn__CM_Fully_Qualified_Name__c: Labrinone - FAQ - Is Labrinone safe for children (v6.0)
          mvn__CM_File_Size__c: 178144
          mvn__CM_File_Id__c: 0690R000001LiL0QAK
          mvn__CM_File_Extension__c: pdf
          mvn__CM_External_File__c: false
          mvn__CM_Expiration_Reminder_Date__c: 2022-12-06
          mvn__CM_Expiration_Date__c: 2023-01-05T16:36:34.000Z
          mvn__CM_Document__c: a0X0R000002hHQFUA2
          mvn__CM_Document_Type__c: CM_Medical_Information_Response
          mvn__CM_Document_Subtype__c: CM_FAQ
          mvn__CM_Document_Number__c: DOC-0000012
          mvn__CM_Document_Lifecycle__c: CM_Default
          mvn__CM_Description__c: Non architecto ratione enim et exercitationem. Consequatur qui officiis consequatur molestias ea quae hic voluptatem. Dolor impedit sequi officiis deleniti.
          mvn__CM_Delivery_Option__c: Merge Into Package
          mvn__CM_Content_Version_Id__c: 0680R000001ckrdQAA
          mvn__CM_Checked_Out__c: false
          mvn__CM_Allowed_Audience__c: Employee;HCP;Non-HCP
          LastReferencedDate: 2022-01-27T16:48:16.000Z
          LastViewedDate: 2022-01-27T16:48:16.000Z
          SystemModstamp: 2022-01-27T16:48:16.000Z
          LastModifiedById: 0050R00000AZap7QAD
          LastModifiedDate: 2022-01-27T16:48:16.000Z
          CreatedById: 0050R00000AZap7QAD
          CreatedDate: 2022-01-05T16:36:34.000Z
          Name: DOCV-000012
          IsDeleted: false
          OwnerId: 0050R00000AZap7QAD
          Id: a0W0R000005TVyoUAG
    DocumentVersionSearchResponse:
      value:
        totalRecords: 1
        status: SUCCESS
        pageRecords: 1
        pageLimit: 2
        documents:
        - sourceUrl: /services/data/v50.0/connect/files/0690R000001LiL0QAK/content
          renditions:
          - url: /services/data/v50.0/sobjects/ContentVersion/0680R000001Sd3iQAC/VersionData
            type: CM_Viewable_Rendition
            id: a0V0R000003U197UAC
            fileSize: 178144
            fileName: Labrinone - FAQ - Is Labrinone safe for children
            fileExtension: pdf
            createdDate: 2022-02-01T18:01:28.000Z
            createdById: 0050R00000AZap7QAD
          document:
            mvn__CM_Region__c: []
            mvn__CM_Product__c: []
            mvn__CM_Document_Relationships_2__r:
            - attributes:
                type: mvn__CM_Document_Relationship__c
                url: /services/data/v53.0/sobjects/mvn__CM_Document_Relationship__c/a0R0R000002bFupUAE
              mvn__CM_Document_Version_2__c: a0W0R000005TVyoUAG
              Id: a0R0R000002bFupUAE
              mvn__CM_Category__c: Document
              mvn__CM_Type__c: CM_Bundle
              mvn__CM_Document_Version_1__c: a0W0R000005TVynUAG
            mvn__CM_Document_Relationships_1__r:
            - attributes:
                type: mvn__CM_Document_Relationship__c
                url: /services/data/v53.0/sobjects/mvn__CM_Document_Relationship__c/a0R0R000002bFuoUAE
              mvn__CM_Document_Version_1__c: a0W0R000005TVyoUAG
              Id: a0R0R000002bFuoUAE
              mvn__CM_Category__c: Document
              mvn__CM_Type__c: CM_Bundle
              mvn__CM_Document_Version_2__c: a0W0R000005TVypUAG
            MED_Custom_Response__c: false
            mvn__CM_Version_Number__c: "6.0"
            mvn__CM_Title__c: Labrinone - FAQ - Is Labrinone safe for children
            mvn__CM_Thumbnail__c: /sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB120BY90&versionId=0680R000001Sd3iQAC&operationContext=CHATTER&page=0
            mvn__CM_Thumbnail_URL__c: /sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB120BY90&versionId=0680R000001Sd3iQAC&operationContext=CHATTER&page=0
            mvn__CM_Status__c: CM_Published
            mvn__CM_Status_Custom_Label__c: CM_Document_State_Published
            mvn__CM_Minor_Version_Number__c: 0
            mvn__CM_Metadata_Last_Modified_Date__c: 2022-01-05T16:36:34.000Z
            mvn__CM_Metadata_Last_Modified_By__c: 0050R00000AZap7QAD
            mvn__CM_Major_Version_Number__c: 6
            mvn__CM_Latest_Version_Title__c: Labrinone - FAQ - Is Labrinone safe for children (v6.0)
            mvn__CM_Latest_Version_Number__c: "6.0"
            mvn__CM_Latest_Document_Version_ID__c: a0W0R000005TVyo
            mvn__CM_Language__c: en_US
            mvn__CM_Is_Latest_Version__c: true
            mvn__CM_Fully_Qualified_Name__c: Labrinone - FAQ - Is Labrinone safe for children (v6.0)
            mvn__CM_File_Size__c: 178144
            mvn__CM_File_Id__c: 0690R000001LiL0QAK
            mvn__CM_File_Extension__c: pdf
            mvn__CM_External_File__c: false
            mvn__CM_Expiration_Reminder_Date__c: 2022-12-06
            mvn__CM_Expiration_Date__c: 2023-01-05T16:36:34.000Z
            mvn__CM_Document__c: a0X0R000002hHQFUA2
            mvn__CM_Document_Type__c: CM_Medical_Information_Response
            mvn__CM_Document_Subtype__c: CM_FAQ
            mvn__CM_Document_Number__c: DOC-0000012
            mvn__CM_Document_Lifecycle__c: CM_Default
            mvn__CM_Description__c: Non architecto ratione enim et exercitationem. Consequatur qui officiis consequatur molestias ea quae hic voluptatem. Dolor impedit sequi officiis deleniti.
            mvn__CM_Delivery_Option__c: Merge Into Package
            mvn__CM_Content_Version_Id__c: 0680R000001ckrdQAA
            mvn__CM_Checked_Out__c: false
            mvn__CM_Allowed_Audience__c: Employee;HCP;Non-HCP
            LastReferencedDate: 2022-02-01T18:01:34.000Z
            LastViewedDate: 2022-02-01T18:01:34.000Z
            SystemModstamp: 2022-02-01T18:01:34.000Z
            LastModifiedById: 0050R00000AZap7QAD
            LastModifiedDate: 2022-02-01T18:01:34.000Z
            CreatedById: 0050R00000AZap7QAD
            CreatedDate: 2022-01-05T16:36:34.000Z
            Name: DOCV-000012
            IsDeleted: false
            OwnerId: 0050R00000AZap7QAD
            Id: a0W0R000005TVyoUAG
    simple_search_criteria:
      value:
        pageLimit: 50
        documentFilters:
        - fieldName: mvn__CM_Document_Type__c
          operator: Equals
          value: CM_Medical_Information_Response
        productFilters:
        - fieldName: MED_Status__c
          operator: Equals
          value: Active
        regionFilters:
        - fieldName: mvn__Country__c
          operator: NotEquals
          value: France
        keyword: children
        sortBy: mvn__CM_Title__c
        sortDirection: asc
        includeOutwardRelationships: true
        includeInwardRelationships: true
