AppDirect checkoutItemDetails API

Retrieves product details such as branding, pricing, and so on.

OpenAPI Specification

appdirect-checkoutitemdetails-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: The Companies API allows developers to manage marketplace companies and their user memberships.
  title: Companies AI Embed checkoutItemDetails API
  license:
    name: Apache License, Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: checkoutItemDetails
  description: Retrieves product details such as branding, pricing, and so on.
  x-displayName: Checkout Items
paths:
  /api/v3/checkout/items:
    post:
      tags:
      - checkoutItemDetails
      x-appdirect-api-stage: Early Access
      summary: Get item details
      description: Retrieves product details such as branding, pricing, and so on.
      operationId: getCheckoutItemDetails
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutItemsDetailsRequest'
        required: true
      responses:
        '200':
          description: Item details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutItemDetails'
              examples:
                response:
                  value:
                    id: 098357e5-7a88-45fe-82d3-843bfd6bcbd1
                    type: PRODUCT
                    branding:
                      name: Sample Application
                      vendor: AppDirect
                      desc: Sample Application description
                      iconUrl: https://appdirect.cloudfront.net/app_resources/1111/thumbs_64/img1111.png
                      href: https://marketplace.appdirect.com/api/marketplace/v1/products/1111
                      storefrontUrl: https://marketplace.appdirect.com/apps/1111
                    stacked: false
                    editions:
                    - id: 45b79e06-1ac6-11e5-90d8-ca7e16f380a7
                      freeTrialTerms:
                        freeTrialDuration: 1
                        freeTrialDurationPeriod: MONTH
                        freeTrialGracePeriod: 10
                      name: Sample Edition
                      revenueModel: RECURRING
                      pricingPlans:
                      - id: b794c2a1-69a7-40bc-9bf7-75a2f945a5fc
                        currency: USD
                        pricingPeriod: MONTHLY
                        pricingSources:
                        - source: BASE_CATALOG
                          pricingDefinitions:
                          - costTypeCategory: RECURRING
                            costType: RECURRING_PER_UNIT
                            pricingStrategy: UNIT
                            unit: USER
                            priceRanges:
                            - min: 0
                              max: 5
                              salePrice: '4.0000000000'
                              wholeSalePrice: null
                            unitAllowsDecimals: false
                            increment: 5
                            allowsMeteredUsage: true
                            displaysPricePerIncrement: true
                        - source: CHANNEL_CATALOG
                          pricingDefinitions:
                          - costTypeCategory: ONE_TIME
                            costType: ONE_TIME_FLAT
                            pricingStrategy: FLAT
                            salePrice: '3.0000000000'
                            wholeSalePrice: null
      x-codeSamples:
      - lang: Shell + Curl
        source: "curl --request POST \\\n  --url https://marketplace.appdirect.com/api/api/v3/checkout/items \\\n  --header 'content-type: application/json' \\\n  --data '{\"ownerUserId\":\"19d7343b-b8ab-464a-a893-8b107d77137d\",\"ownerCompanyId\":\"b0410709-8333-43e2-84d6-3228f6b9998b\",\"buyerUserId\":\"55144410-a14a-43a1-9e0a-062c6cf31770\",\"buyerCompanyId\":\"6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324\",\"currency\":\"USD\",\"productIds\":[\"100\",\"200\"],\"pricingPlanIds\":[\"a12bcf2e-d27e-4808-aae0-6099cc828664\",\"3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a\"],\"bundleIds\":[\"300\",\"400\"],\"subscriptionIds\":[\"915a6558-5a1b-446a-8ec6-334cc60e3d37\",\"8569269e-4c7f-4238-807c-513c718be135\"]}'"
      - lang: Node + Request
        source: "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://marketplace.appdirect.com/api/api/v3/checkout/items',\n  headers: {'content-type': 'application/json'},\n  body: {\n    ownerUserId: '19d7343b-b8ab-464a-a893-8b107d77137d',\n    ownerCompanyId: 'b0410709-8333-43e2-84d6-3228f6b9998b',\n    buyerUserId: '55144410-a14a-43a1-9e0a-062c6cf31770',\n    buyerCompanyId: '6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324',\n    currency: 'USD',\n    productIds: ['100', '200'],\n    pricingPlanIds: ['a12bcf2e-d27e-4808-aae0-6099cc828664', '3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a'],\n    bundleIds: ['300', '400'],\n    subscriptionIds: ['915a6558-5a1b-446a-8ec6-334cc60e3d37', '8569269e-4c7f-4238-807c-513c718be135']\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
      - lang: Java + Okhttp
        source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"ownerUserId\\\":\\\"19d7343b-b8ab-464a-a893-8b107d77137d\\\",\\\"ownerCompanyId\\\":\\\"b0410709-8333-43e2-84d6-3228f6b9998b\\\",\\\"buyerUserId\\\":\\\"55144410-a14a-43a1-9e0a-062c6cf31770\\\",\\\"buyerCompanyId\\\":\\\"6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324\\\",\\\"currency\\\":\\\"USD\\\",\\\"productIds\\\":[\\\"100\\\",\\\"200\\\"],\\\"pricingPlanIds\\\":[\\\"a12bcf2e-d27e-4808-aae0-6099cc828664\\\",\\\"3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a\\\"],\\\"bundleIds\\\":[\\\"300\\\",\\\"400\\\"],\\\"subscriptionIds\\\":[\\\"915a6558-5a1b-446a-8ec6-334cc60e3d37\\\",\\\"8569269e-4c7f-4238-807c-513c718be135\\\"]}\");\nRequest request = new Request.Builder()\n  .url(\"https://marketplace.appdirect.com/api/api/v3/checkout/items\")\n  .post(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"
components:
  schemas:
    CheckoutItemDetails:
      type: object
      title: CheckoutItemDetails
      description: Checkout item details
      properties:
        id:
          type: string
          description: Product ID
        type:
          $ref: '#/components/schemas/CheckoutItemType'
        stacked:
          type: boolean
          description: Indicates whether the product is stacked. Customers can have multiple subscriptions to stacked products.
        branding:
          $ref: '#/components/schemas/Branding'
        editions:
          type: array
          items:
            $ref: '#/components/schemas/Edition'
          description: List of editions of the product
      example:
        id: 098357e5-7a88-45fe-82d3-843bfd6bcbd1
        type: PRODUCT
        branding:
          name: Sample Application
          vendor: AppDirect
          desc: Sample Application Description
          iconUrl: https://appdirect.cloudfront.net/app_resources/1111/thumbs_64/img1111.png
          href: https://marketplace.appdirect.com/api/marketplace/v1/products/1111
          storefrontUrl: https://marketplace.appdirect.com/apps/1111
        stacked: false
        editions:
        - id: 45b79e06-1ac6-11e5-90d8-ca7e16f380a7
          freeTrialTerms:
            freeTrialDuration: 1
            freeTrialDurationPeriod: MONTH
            freeTrialGracePeriod: 10
          name: Sample Edition
          revenueModel: RECURRING
          pricingPlans:
          - id: b794c2a1-69a7-40bc-9bf7-75a2f945a5fc
            currency: USD
            pricingPeriod: MONTHLY
            pricingSources:
            - source: BASE_CATALOG
              pricingDefinitions:
              - costTypeCategory: RECURRING
                costType: RECURRING_PER_UNIT
                pricingStrategy: UNIT
                unit: USER
                priceRanges:
                - min: 0
                  max: 5
                  salePrice: '4.0000000000'
                  wholeSalePrice: null
                unitAllowsDecimals: false
                increment: 5
                allowsMeteredUsage: true
                displaysPricePerIncrement: true
            - source: CHANNEL_CATALOG
              pricingDefinitions:
              - costTypeCategory: ONE_TIME
                costType: ONE_TIME_FLAT
                pricingStrategy: FLAT
                salePrice: '3.0000000000'
                wholeSalePrice: null
    RevenueModel:
      type: string
      title: RevenueModel
      description: Revenue model
      enum:
      - FREE
      - ONE_TIME
      - RECURRING
      - TIERED
    PriceRange:
      type: object
      title: PriceRange
      description: Price definition for an explicit unit range.
      required:
      - min
      - price
      properties:
        min:
          type: number
        max:
          type: number
        price:
          type: number
        salePrice:
          type: string
          format: amount
          description: Regular sale price
        wholesalePrice:
          type: string
          format: amount
          description: Wholesale sale price
      example:
        min: 1
        max: 5
        salePrice: '4.0000000000'
        wholeSalePrice: null
    CheckoutItemsDetailsRequest:
      type: object
      title: CheckoutItemsDetailsRequest
      description: Items Details request
      required:
      - ownerUserId
      - ownerCompanyId
      - buyerUserId
      - buyerCompanyId
      - currency
      - productIds
      properties:
        ownerUserId:
          description: The owner user ID. The owner owns the product after the purchase is complete.
          type: string
        ownerCompanyId:
          description: The owner's company's ID.
          type: string
        buyerUserId:
          description: The buyer user ID. The buyer is the person who is making the purchase. In assisted sales or reseller scenarios, the buyer can be different than the owner.
          type: string
        buyerCompanyId:
          description: The buyer's company's ID. In assisted sales or reseller scenarios, the buyer's company can be different than the owner's company.
          type: string
        currency:
          description: Three-letter code, such as USD, that determines the currency in which to display item pricing details.
          type: string
          minLength: 3
          maxLength: 3
        productIds:
          description: List of product IDs to retrieve details for.
          type: array
          items:
            type: string
        pricingPlanIds:
          description: List of pricing plan IDs to retrieve details for.
          type: array
          items:
            type: string
        bundleIds:
          description: List of bundle IDs to retrieve details for. (Currently not supported)
          type: array
          items:
            type: string
        subscriptionIds:
          description: List of subscription IDs to retrieve details for. (Currently not supported)
          type: array
          items:
            type: string
      example:
        ownerUserId: 19d7343b-b8ab-464a-a893-8b107d77137d
        ownerCompanyId: b0410709-8333-43e2-84d6-3228f6b9998b
        buyerUserId: 55144410-a14a-43a1-9e0a-062c6cf31770
        buyerCompanyId: 6e5a0af2-e6be-4a86-a1b0-ffabcc2c6324
        currency: USD
        productIds:
        - '100'
        - '200'
        pricingPlanIds:
        - a12bcf2e-d27e-4808-aae0-6099cc828664
        - 3e0a22d3-dafb-4b3d-a487-7f4e7a94b32a
        bundleIds:
        - '300'
        - '400'
        subscriptionIds:
        - 915a6558-5a1b-446a-8ec6-334cc60e3d37
        - 8569269e-4c7f-4238-807c-513c718be135
    Branding:
      type: object
      title: Branding
      description: Branding
      properties:
        name:
          type: string
          description: Product name
        vendor:
          type: string
          description: Product vendor
        desc:
          type: string
          description: Product description
        iconUrl:
          type: string
          format: uri
          description: Product icon URL
        href:
          type: string
          format: uri
          description: URL of the API to use to retrieve detailed product information
        storefrontUrl:
          type: string
          format: uri
          description: URL of the product profile in the marketplace
      example:
        name: Sample Application
        vendor: AppDirect
        desc: Sample Application Description
        iconUrl: https://appdirect.cloudfront.net/app_resources/1111/thumbs_64/img1111.png
        href: https://marketplace.appdirect.com/api/marketplace/v1/products/1111
        storefrontUrl: https://marketplace.appdirect.com/apps/1111
    EditionPricingPlan:
      type: object
      title: EditionPricingPlan
      description: Pricing plan
      properties:
        id:
          type: string
          description: Pricing plan ID
        currency:
          type: string
          description: Pricing plan currency
        pricingPeriod:
          $ref: '#/components/schemas/PricingPeriod'
        pricingSources:
          type: array
          items:
            $ref: '#/components/schemas/PricingSource'
          description: The source of the pricing plan
      example:
        id: b794c2a1-69a7-40bc-9bf7-75a2f945a5fc
        currency: USD
        pricingPeriod: MONTHLY
        pricingSources:
          source: BASE_CATALOG
          pricingDefinitions:
          - costTypeCategory: RECURRING
            costType: RECURRING_PER_UNIT
            pricingStrategy: UNIT
            unit: USER
            priceRanges:
            - min: 0
              max: 5
              salePrice: '4.0000000000'
              wholeSalePrice: null
            unitAllowsDecimals: false
            increment: 5
            allowsMeteredUsage: true
            displaysPricePerIncrement: true
    CostType:
      type: string
      title: CostType
      description: Type of cost
      enum:
      - RECURRING_FLAT
      - ONE_TIME_FLAT
      - INCLUDED
      - SETUP_PER_UNIT
      - RECURRING_PER_UNIT
      - ONE_TIME_PER_UNIT
      - SETUP_FEE
      - CONTRACT_FEE
      - DISCOUNT_PER_UNIT
      - DISCOUNT_FLAT
      - METERED_USAGE
      example: RECURRING_PER_UNIT
    CostTypeCategory:
      type: string
      title: CostTypeCategory
      description: Category of cost
      enum:
      - RECURRING
      - ONE_TIME
      example: ONE_TIME
    PricingPeriod:
      type: string
      title: PricingPeriod
      description: The pricing period. The billing frequency for the pricing plan.
      enum:
      - ONE_TIME
      - DAILY
      - MONTHLY
      - QUARTERLY
      - SIX_MONTHS
      - YEARLY
      - TWO_YEARS
      - THREE_YEARS
      example: ONE_TIME
    PricingSource:
      type: object
      title: PricingSource
      description: Pricing source
      properties:
        source:
          $ref: '#/components/schemas/PricingSourceType'
        pricingDefinitions:
          type: array
          items:
            $ref: '#/components/schemas/PricingDefinition'
          description: The details of the pricing plan definition
      example:
        source: BASE_CATALOG
        pricingDefinitions:
        - costTypeCategory: RECURRING
          costType: RECURRING_PER_UNIT
          pricingStrategy: UNIT
          unit: USER
          priceRanges:
          - min: 0
            max: 5
            salePrice: '4.0000000000'
            wholeSalePrice: null
          unitAllowsDecimals: false
          increment: 5
          allowsMeteredUsage: true
          displaysPricePerIncrement: true
    FreeTrialDurationPeriod:
      type: string
      title: FreeTrialDurationPeriod
      description: Free trial duration period
      enum:
      - DAY
      - MONTH
    FreeTrialTerms:
      type: object
      title: FreeTrialTerms
      description: Free Trial terms
      properties:
        freeTrialDuration:
          type: integer
          description: Duration of free trial, in days or months depending on the specified period
        freeTrialDurationPeriod:
          $ref: '#/components/schemas/FreeTrialDurationPeriod'
        freeTrialGracePeriod:
          type: integer
          description: Length of grace period after free trial expiration, in days
      example:
        freeTrialDuration: 1
        freeTrialDurationPeriod: MONTH
        freeTrialGracePeriod: 10
    Edition:
      type: object
      title: Edition
      description: Edition
      properties:
        id:
          type: string
          description: Edition ID
        name:
          type: string
          description: Edition name
        revenueModel:
          $ref: '#/components/schemas/RevenueModel'
        freeTrialTerms:
          $ref: '#/components/schemas/FreeTrialTerms'
        pricingPlans:
          type: array
          items:
            $ref: '#/components/schemas/EditionPricingPlan'
          description: List of edition pricing plans
      example:
      - id: 45b79e06-1ac6-11e5-90d8-ca7e16f380a7
        freeTrialTerms:
          freeTrialDuration: 1
          freeTrialDurationPeriod: MONTH
          freeTrialGracePeriod: 10
        name: Sample Edition
        revenueModel: RECURRING
        pricingPlans:
        - id: 3333
          currency: USD
          pricingPeriod: MONTHLY
          pricingSources:
          - source: BASE_CATALOG
            pricingDefinitions:
            - costTypeCategory: RECURRING
              costType: RECURRING_PER_UNIT
              pricingStrategy: UNIT
              unit: USER
              priceRanges:
              - min: 0
                max: 5
                salePrice: '4.0000000000'
                wholeSalePrice: null
              unitAllowsDecimals: false
              increment: 5
              allowsMeteredUsage: true
              displaysPricePerIncrement: true
          - source: CHANNEL_CATALOG
            pricingDefinitions:
            - costTypeCategory: ONE_TIME
              costType: ONE_TIME_FLAT
              pricingStrategy: FLAT
              salePrice: '3.0000000000'
              wholeSalePrice: null
    PricingDefinition:
      type: object
      title: PricingDefinition
      description: Pricing definition
      properties:
        costTypeCategory:
          $ref: '#/components/schemas/CostTypeCategory'
        costType:
          $ref: '#/components/schemas/CostType'
        pricingStrategy:
          $ref: '#/components/schemas/PricingStrategy'
        unit:
          type: string
          description: The unit type, USER, CARTRIDGE, and so on
        priceRanges:
          type: array
          items:
            $ref: '#/components/schemas/PriceRange'
          description: Price ranges
        unitAllowsDecimals:
          type: boolean
          description: Indicates whether decimals are allowed when purchasing units
        increment:
          type: number
          format: amount
          description: The minimum increment in number of units to purchase
        allowsMeteredUsage:
          type: boolean
          description: Indicates whether metered usage is allowed
        displaysPricePerIncrement:
          type: boolean
          description: Indicates whether to display the price per unit increment
      example:
        costTypeCategory: RECURRING
        costType: RECURRING_PER_UNIT
        pricingStrategy: UNIT
        unit: USER
        priceRanges:
        - min: 0
          max: 5
          salePrice: '4.0000000000'
          wholeSalePrice: null
        unitAllowsDecimals: false
        increment: 5
        allowsMeteredUsage: true
        displaysPricePerIncrement: true
    PricingSourceType:
      type: string
      title: PricingSourceType
      enum:
      - PURCHASE_CHANNEL
      - PURCHASE_RESELLER_COMPANY
      - RESELLER_COMPANY_CATALOG
      - CHANNEL_CATALOG
      - BASE_CATALOG
    CheckoutItemType:
      type: string
      title: CheckoutItemType
      description: Checkout item type
      enum:
      - PRODUCT
      - ADDON
      - BUNDLE
    PricingStrategy:
      description: Pricing strategy
      type: string
      title: PricingStrategy
      enum:
      - FREE
      - FLAT
      - UNIT
      - TIERED
      - VOLUME
      - VARIABLE_PRICE_STRATEGIES
      - UNLIMITED
      - CUSTOM