> ## 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.

# RevealOrderCodes

> RevealOrderCodes returns the delivered codes of a completed order. Codes are
 available once the order is completed; a still-processing order reports that
 it is not ready. Reveals are rate-limited per order.



## OpenAPI

````yaml /api-reference/sodacards.yaml get /v1/orders/{order_id}/codes
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/orders/{order_id}/codes:
    get:
      summary: RevealOrderCodes
      description: >-
        RevealOrderCodes returns the delivered codes of a completed order. Codes
        are
         available once the order is completed; a still-processing order reports that
         it is not ready. Reveals are rate-limited per order.
      operationId: revealOrderCodes
      parameters:
        - name: order_id
          in: path
          description: order_id is the order whose codes to reveal.
          required: true
          schema:
            type: string
            title: order_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/sodacards.devpublic.v1.RevealOrderCodesResponse
      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))

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


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


            const codes = await sodacards.revealOrderCodes({ orderId: "ord_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")}})

            codes, _, err := client.DefaultAPI.RevealOrderCodes(auth,
            "ord_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);


            $codes = $client->revealOrderCodes("ord_123");
components:
  schemas:
    sodacards.devpublic.v1.RevealOrderCodesResponse:
      type: object
      properties:
        codes:
          type: array
          items:
            $ref: '#/components/schemas/sodacards.devpublic.v1.RevealedCode'
          title: codes
          description: codes are the delivered codes of the order.
      title: RevealOrderCodesResponse
      additionalProperties: false
    sodacards.devpublic.v1.RevealedCode:
      type: object
      properties:
        label:
          type: string
          title: label
          description: label names what the code is for (e.g. the product line).
        code:
          type: string
          title: code
          description: 'code is the delivered value. Treat it as a secret: do not log it.'
      title: RevealedCode
      additionalProperties: false
      description: RevealedCode is one delivered code of an order.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Your API key, prefixed sc_live_ or sc_test_.
      name: X-API-Key
      in: header

````