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

# GetOrder

> GetOrder returns one of the reseller's orders by id, with its lines and
 current status. A live key reads live orders and a test key reads its own
 sandbox orders; an id that is not the caller's is reported as not found.



## OpenAPI

````yaml /api-reference/sodacards.yaml get /v1/orders/{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/orders/{id}:
    get:
      tags:
        - PublicAPIService
      summary: GetOrder
      description: |-
        GetOrder returns one of the reseller's orders by id, with its lines and
         current status. A live key reads live orders and a test key reads its own
         sandbox orders; an id that is not the caller's is reported as not found.
      operationId: PublicAPIService_GetOrder
      parameters:
        - name: id
          in: path
          description: id is the order id, from PlaceOrder.
          required: true
          schema:
            type: string
            title: id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/sodacards.devpublic.v1.GetOrderResponse'
components:
  schemas:
    sodacards.devpublic.v1.GetOrderResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Order'
          title: order
          description: order is the requested order.
      title: GetOrderResponse
      additionalProperties: false
    sodacards.devpublic.v1.Order:
      type: object
      properties:
        id:
          type: string
          title: id
          description: id identifies the order.
        status:
          type: string
          title: status
          description: >-
            status is the order's current state: "pending", "processing",
            "completed",
             "failed" or "refunded".
        total:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Money'
          title: total
          description: total is the amount charged for the order, in FCFA.
        createdAt:
          type: string
          title: created_at
          description: created_at is when the order was placed (RFC 3339).
        reference:
          type: string
          title: reference
          description: reference is the identifier you attached at creation, empty if none.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/sodacards.devpublic.v1.OrderItem'
          title: lines
          description: lines are the ordered products.
      title: Order
      additionalProperties: false
      description: >-
        Order is a placed order with its lines and current status. It never
        carries the
         supplier cost.
    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.
    sodacards.devpublic.v1.OrderItem:
      type: object
      properties:
        productId:
          type: string
          title: product_id
          description: product_id is the product ordered on this line.
        name:
          type: string
          title: name
          description: name is the product name at order time.
        unitPrice:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Money'
          title: unit_price
          description: unit_price is the price of one unit, in FCFA.
        quantity:
          type: integer
          title: quantity
          format: int32
          description: quantity is how many units were ordered.
        lineTotal:
          $ref: '#/components/schemas/sodacards.devpublic.v1.Money'
          title: line_total
          description: line_total is unit_price times quantity, in FCFA.
        inputFields:
          type: object
          title: input_fields
          additionalProperties:
            type: string
            title: value
          description: input_fields are the purchase-form values submitted for this line.
      title: OrderItem
      additionalProperties: false
      description: OrderItem is one line of an order.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Your API key, prefixed sc_live_ or sc_test_.
      name: X-API-Key
      in: header

````