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

# GetProduct

> GetProduct returns a single product by its id, priced for the reseller. The
 id is the one carried by a catalog entry. A product the reseller may not see
 (unlisted, hidden or inactive) is reported as not found, so an id cannot be
 probed to learn what exists outside the reseller's catalog.



## OpenAPI

````yaml /api-reference/sodacards.yaml get /v1/products/{id}
openapi: 3.1.0
info:
  title: SODACARDS Developer API
  description: Sell gift cards and game top-ups from your own systems.
  version: 1.0.0
servers:
  - url: https://api.sodacards.com
security:
  - ApiKeyAuth: []
tags:
  - name: PublicAPIService
    description: >-
      PublicAPIService is the public developer API a reseller calls with an API
      key.
       It is served as REST (via HTTP transcoding) so developers use GET /v1/... and
       curl, and its OpenAPI 3.1 spec is generated from this one file. Every method is
       authenticated by the API-key gateway that fronts it.
paths:
  /v1/products/{id}:
    get:
      summary: GetProduct
      description: >-
        GetProduct returns a single product by its id, priced for the reseller.
        The
         id is the one carried by a catalog entry. A product the reseller may not see
         (unlisted, hidden or inactive) is reported as not found, so an id cannot be
         probed to learn what exists outside the reseller's catalog.
      operationId: getProduct
      parameters:
        - name: id
          in: path
          description: id is the product id, taken from a catalog entry.
          required: true
          schema:
            type: string
            title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sodacards.devpublic.v1.GetProductResponse'
      x-codeSamples:
        - lang: python
          label: Python
          source: |
            import os, sodacards

            config = sodacards.Configuration(host="https://api.sodacards.com")
            config.api_key["ApiKeyAuth"] = os.environ["SODACARDS_API_KEY"]
            client = sodacards.DefaultApi(sodacards.ApiClient(config))

            product = client.get_product("prod_123")
        - lang: typescript
          label: TypeScript
          source: >
            import { Sodacards } from "@sodacards/sdk";


            const sodacards = new Sodacards({ apiKeyAuth:
            process.env.SODACARDS_API_KEY });


            const product = await sodacards.getProduct({ id: "prod_123" });
        - lang: go
          label: Go
          source: >
            client := sodacards.NewAPIClient(sodacards.NewConfiguration())

            auth := context.WithValue(context.Background(),
            sodacards.ContextAPIKeys,
                map[string]sodacards.APIKey{"ApiKeyAuth": {Key: os.Getenv("SODACARDS_API_KEY")}})

            product, _, err := client.DefaultAPI.GetProduct(auth,
            "prod_123").Execute()
        - lang: php
          label: PHP
          source: >
            $config = Sodacards\Configuration::getDefaultConfiguration()
                ->setApiKey('X-API-Key', getenv('SODACARDS_API_KEY'));
            $client = new Sodacards\Api\DefaultApi(new GuzzleHttp\Client(),
            $config);


            $product = $client->getProduct("prod_123");
components:
  schemas:
    sodacards.devpublic.v1.GetProductResponse:
      type: object
      properties:
        product:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Product'
          title: product
          description: product is the requested product, priced for the reseller.
      title: GetProductResponse
      additionalProperties: false
    sodacards.devpublic.v1.Product:
      type: object
      properties:
        id:
          type: string
          title: id
          description: id identifies the product; use it to place an order for this item.
        name:
          type: string
          title: name
          description: name is the human-readable product name.
        faceValue:
          $ref: '#/components/schemas/sodacards.devpublic.v1.ProductFaceValue'
          title: face_value
          description: >-
            face_value is the nominal value printed on the item (e.g. a 10 USD
            card),
             which may differ from the currency the reseller pays in.
        price:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Money'
          title: price
          description: >-
            price is what the reseller pays, in FCFA. It is absent when the item
            is not
             yet priced (listed but not purchasable).
        strikePrice:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Money'
          title: strike_price
          description: >-
            strike_price is an optional reference (pre-discount) price, in FCFA,
            for
             display. Absent when there is none.
        bonus:
          type: string
          title: bonus
          description: >-
            bonus describes any extra value granted with the item, e.g. "+10%".
            Empty
             when there is none.
        minQuantity:
          type: integer
          title: min_quantity
          format: int32
          description: >-
            min_quantity and max_quantity bound how many units an order line may
            buy.
        maxQuantity:
          type: integer
          title: max_quantity
          format: int32
        purchasable:
          type: boolean
          title: purchasable
          description: >-
            purchasable is true when the item has a price and can be ordered
            now.
      title: Product
      additionalProperties: false
      description: >-
        Product is one sellable item in the reseller catalog. Its id is what an
        order
         line references. It never carries the supplier cost or routing.
    sodacards.devpublic.v1.ProductFaceValue:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: amount is the face value as an exact decimal string, e.g. "10.00".
        currency:
          type: string
          title: currency
          description: currency is the ISO-4217 code of the face value, e.g. "USD".
      title: ProductFaceValue
      additionalProperties: false
      description: >-
        ProductFaceValue is the nominal value printed on a product. amount is a
        decimal
         string (e.g. "10.00") so fractional face values are exact.
    sodacards.devpublic.v1.Money:
      type: object
      properties:
        amount:
          type:
            - integer
            - string
          title: amount
          format: int64
          description: amount is the value in the currency's minor units.
        currency:
          type: string
          title: currency
          description: currency is the ISO-4217 code, e.g. "XOF".
      title: Money
      additionalProperties: false
      description: >-
        Money is an amount in the currency's minor units together with its
        ISO-4217
         code. XOF (the West-African CFA franc) has no minor unit, so for XOF amount is
         the whole franc value.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Your API key, prefixed sc_live_ or sc_test_.
      name: X-API-Key
      in: header

````