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

# Get several catalog products

> Return the full details of up to 20 catalog products for a country in one call, in the order requested, each with its variants and per-supplier stock in that country. Use it after `searchCatalogProducts` to compare products, instead of calling `getCatalogProduct` once per product. One call per country: prices and stock depend on it. A product with no variant in the country comes back with an empty `variants` list and a discontinued one with `isDiscontinued`; ids that match no product are listed in `notFound`.

<span className="badge-read">Key: Read</span><span className="badge-company">Scope: Company</span>


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /catalog/{countryCode}/products/by-ids
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /catalog/{countryCode}/products/by-ids:
    post:
      tags:
        - Catalog
      summary: Get several catalog products
      description: >-
        Return the full details of up to 20 catalog products for a country in
        one call, in the order requested, each with its variants and
        per-supplier stock in that country. Use it after `searchCatalogProducts`
        to compare products, instead of calling `getCatalogProduct` once per
        product. One call per country: prices and stock depend on it. A product
        with no variant in the country comes back with an empty `variants` list
        and a discontinued one with `isDiscontinued`; ids that match no product
        are listed in `notFound`.
      operationId: getCatalogProducts
      parameters:
        - name: countryCode
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetCatalogProductsBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCatalogProducts_Output'
components:
  schemas:
    GetCatalogProductsBody:
      type: object
      properties:
        productIds:
          description: >-
            Catalog product ids, as returned by searchCatalogProducts (e.g.
            product_<uuid>), at most 20 per call
          minItems: 1
          maxItems: 20
          type: array
          items:
            type: string
            pattern: ^product_[0-9a-f-]{36}$
      required:
        - productIds
    GetCatalogProducts_Output:
      type: object
      properties:
        data:
          type: array
          description: >-
            The requested products in request order, each with its variants and
            per-supplier stock in the country. A product with no variant there
            has an empty `variants` list; a deleted or unpublished one has
            `isDiscontinued`.
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              description:
                type: string
              brand:
                anyOf:
                  - type: string
                  - type: 'null'
              images:
                description: Product image URLs
                type: array
                items:
                  type: string
              variations:
                description: >-
                  Variation dimensions available for this product (e.g. ram,
                  storage)
                type: array
                items:
                  type: string
              specifications:
                description: Product specifications keyed by specification name
                anyOf:
                  - type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  - type: 'null'
              price:
                description: Current price for the requested country
                anyOf:
                  - type: object
                    properties:
                      amount:
                        description: >-
                          Price amount in the smallest currency unit (e.g.
                          cents)
                        type: number
                      currency:
                        description: ISO 4217 currency code
                        type: string
                    required:
                      - amount
                      - currency
                    additionalProperties: false
                  - type: 'null'
              isDiscontinued:
                description: >-
                  Whether the product is discontinued (deleted or no longer
                  published)
                type: boolean
              hasZTD:
                description: Whether at least one variant supports zero-touch deployment
                type: boolean
              hasFastDelivery:
                description: Whether at least one variant supports fast delivery
                type: boolean
              createdAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              updatedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              countryCodes:
                type: array
                description: Country codes where this product is available
                items:
                  type: string
              variants:
                type: array
                description: Variants with per-supplier stock information
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    composition:
                      description: >-
                        The variation values that define this variant (e.g.
                        ram=16GB, storage=512GB)
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                          value:
                            type: string
                        required:
                          - type
                          - value
                        additionalProperties: false
                    reference:
                      anyOf:
                        - type: string
                        - type: 'null'
                    stocks:
                      type: array
                      items:
                        type: object
                        properties:
                          supplierId:
                            description: >-
                              Supplier id — pass this as products[].supplierId
                              when creating an order
                            type: string
                          supplierName:
                            type: string
                          isZTD:
                            description: >-
                              Whether this stock entry supports zero-touch
                              deployment
                            type: boolean
                          status:
                            type: string
                            enum:
                              - out_of_stock
                              - in_stock
                              - low_stock
                              - unknown
                              - coming_soon
                          quantity:
                            description: Available quantity, or null when unknown
                            anyOf:
                              - type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              - type: 'null'
                          daysToDelivery:
                            anyOf:
                              - type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              - type: 'null'
                        required:
                          - supplierId
                          - supplierName
                          - isZTD
                          - status
                        additionalProperties: false
                  required:
                    - id
                    - composition
                    - stocks
                  additionalProperties: false
            required:
              - id
              - name
              - description
              - images
              - variations
              - isDiscontinued
              - hasZTD
              - hasFastDelivery
              - createdAt
              - updatedAt
              - countryCodes
              - variants
            additionalProperties: false
        notFound:
          type: array
          description: Requested ids that match no catalog product
          items:
            type: string
      required:
        - data
        - notFound
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

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