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

# Get one of your sales

> An order you bought, like one you are not party to, answers `404`.




## OpenAPI

````yaml /openapi.yaml get /v1/orders/{id}
openapi: 3.1.0
info:
  title: MoonUP Seller API
  version: 1.0.0
  summary: List and manage your offers and deliver your orders from your own tools.
  description: >
    Everything a seller's bot needs to keep a catalogue of listings up to date:

    create a listing, restock it, unpublish it, archive it — and to hand over

    what it sold.


    Each category has its own paths — `/v1/offers/accounts`,

    `/v1/offers/currency` and so on — with its own fields. You integrate with

    the categories you sell in, and a category added to the platform later

    leaves yours untouched.


    This is the public surface. The cabinet's own screens — payouts, disputes,

    cancellations, refunds, account settings — are not part of it and an API

    key does not reach them.


    ## Authentication


    Create a key in the cabinet under **Seller → API keys**. It is shown once.

    Send it on every request:


    ```

    Authorization: Bearer moonup_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    ```


    There is nothing to exchange it for — no short-lived token sits in between.

    HTTPS only. Keep the key in an environment variable or your CI's secret

    store, never in a repository.


    A key may be pinned to a list of addresses when you create it (up to 16

    addresses or subnets). An empty list means any address.


    ## Creating a listing


    Categories do not sell the same thing, so they do not ask for the same

    fields, and each one's create call takes only its own. An accounts listing

    has a price and a picture; a currency listing has a product, a price per

    unit and a stock, and no picture at all; a gift card is a code, so it has

    no manual handover time to promise.


    What every category does share is `attributes` — its own field list, which

    varies by game and is versioned. That one you read at runtime:

        GET /v1/offers/games/{game}/categories/{category_slug}/schema

    A full pass looks like this:


    1. `GET /v1/offers/games` — pick a game, keep its `slug`.

    2. `GET /v1/offers/games/{game}/categories` — pick a category.

    3. `GET /v1/offers/games/{game}/categories/{category_slug}/schema` — read
       `attributes`.
    4. `POST /v1/offers/images` with the picture as the body. Repeat per
       picture, collect the `image_url`s. Skip it for a category with no
       gallery.
    5. `POST /v1/offers/{category}` — the listing is created as a `draft`.

    6. `POST /v1/offers/{category}/{id}/publish` — it goes on the marketplace.


    ## Statuses


    A new listing is a `draft`: yours, and nobody else's to see. `publish`

    makes it `active`, and buyers can buy it from that moment — nothing reviews

    it first. Editing changes nothing about where a listing stands: an `active`

    one stays live, a `draft` stays a draft.


    `unpublish` takes an `active` listing back to `draft`. `archived` is the end
    of

    the line: `DELETE` retires a listing for good and keeps it readable to you.

    `sold` follows orders, not calls: the last unit went to a closed order. A

    listing whose stock is all in open orders stays `active`, and a cancelled

    order puts the stock back.


    Moderation can send a live listing back as `changes_requested`: it leaves

    the marketplace, and `moderation_reason_code` with `moderation_note` say

    what to fix. Your next `PATCH` makes it a `draft`; `publish` it once it is

    fixed. A listing moderation removes for breaking the rules outright is

    deleted: every call on it answers `404`.


    ## Orders


    Your sales, and the one thing a bot does with them: deliver. A listing

    sold by hand (`delivery_type: manual`) waits in `awaiting_delivery` until

    you send what was bought:


    1. `GET /v1/orders/me?status=awaiting_delivery` — poll for new sales.
       `deadline_at` is when an undelivered order cancels itself.
    2. `POST /v1/orders/{id}/deliver` — the goods, one entry per unit bought.
       The order moves to `delivered` and the buyer sees them at once.

    An instant listing never waits: the stock you uploaded goes out on

    payment, and its orders only ever show up here as already `delivered`.


    Cancelling and refunding are cabinet-only — both concern the buyer's money.


    ## Rate limits


    | | Budget |

    |---|---|

    | Reads | 500 requests per minute |

    | Writes | 250 requests per minute |

    | Writes to one offer | 5 per minute and 10 per hour |


    Going over answers `429`. It is temporary: wait and retry, the key stays

    valid. Up to 5 keys per account — create the second one ahead of time so

    you can rotate without downtime.


    ## Errors


    Every failure answers with the same body, a stable snake_case code:


    ```json

    { "error": "delivery_instructions_required" }

    ```


    Branch on `error`, not on the message — there is no message.
servers:
  - url: https://api.moonup.gg
    description: Production
security:
  - api_key: []
tags:
  - name: Catalog
    description: |
      What can be listed, and what each category's fields are. Public: these
      read without a key, so you can explore before you have one.
  - name: Accounts
    description: Game accounts, sold whole — one price, one picture.
  - name: Top-ups
    description: Top-up packs, handed over by one of the platform's delivery methods.
  - name: Gift cards
    description: Fixed-denomination codes, handed over instantly.
  - name: Currency
    description: In-game currency, priced per unit out of a stock you keep.
  - name: Pictures
    description: Where an offer's images come from.
  - name: Orders
    description: What you sold, and handing it over.
paths:
  /v1/orders/{id}:
    get:
      tags:
        - Orders
      summary: Get one of your sales
      description: |
        An order you bought, like one you are not party to, answers `404`.
      operationId: getSale
      parameters:
        - $ref: '#/components/parameters/OrderID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Sale'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    OrderID:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Sale:
      type: object
      description: |
        An order for one of your listings. What it names — title, pictures,
        attributes — is a copy taken at purchase, so it reads the same after
        you edit or archive the listing. Amounts are US cents.
      properties:
        id:
          type: string
          format: uuid
        offer_id:
          type: string
          format: uuid
        offer_title:
          type: string
        game_slug:
          type: string
        category_slug:
          type: string
        buyer_id:
          type: string
          format: uuid
        seller_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - awaiting_delivery
            - delivered
            - completed
            - disputed
            - refunded
            - cancelled
            - failed
          description: |
            `pending` — not paid yet. `awaiting_delivery` — paid, waiting for
            you to deliver. `delivered` — the buyer has the goods and is
            checking them. `completed` — the buyer confirmed, or 5 days passed.
            `disputed` — the buyer raised a problem; delivering again is still
            open to you. `refunded`, `cancelled`, `failed` are final.
        delivery_type:
          type: string
          enum:
            - manual
            - instant
        bulk_quantity:
          type: integer
          format: int64
          description: Currency orders only — the amount bought, in the product's scale.
        subtotal:
          type: integer
          format: int64
          description: The listing's price for what was bought.
        discount:
          type: integer
          format: int64
        warranty_fee:
          type: integer
          format: int64
        warranty_plan:
          type: string
          enum:
            - none
            - months_3
            - months_6
            - lifetime
        processor_fee:
          type: integer
          format: int64
        total:
          type: integer
          format: int64
          description: What the buyer paid, warranty and processing included.
        earnings:
          type: integer
          format: int64
          description: >-
            What you are credited — `subtotal` less the marketplace's
            commission.
        currency:
          type: string
          description: Always `USD`.
        deadline_at:
          type: string
          format: date-time
          description: |
            The deadline running now: payment on `pending`, your delivery on
            `awaiting_delivery`, the buyer's check on `delivered`, the hold on
            your earnings on `completed`. Absent otherwise.
        warranty_expires_at:
          type: string
          format: date-time
          description: Until when the buyer may dispute. Absent on a lifetime plan.
        created_at:
          type: string
          format: date-time
        buyer_fields:
          type: object
          additionalProperties: true
          description: >-
            What the buyer filled in at checkout — a player id, an in-game name
            — keyed as the delivery method asks.
        seller_instructions:
          type: string
          description: Your listing's instructions to the buyer, as they read at purchase.
        offer_description:
          type: string
        offer_images:
          type: array
          items:
            type: string
            format: uri
        offer_attributes:
          type: object
          additionalProperties: true
        offer_delivery_method:
          type: string
          description: The delivery method key the listing handed over by.
        dispute_reason_code:
          type: string
          enum:
            - not_working
            - wrong_item
            - recovered
            - banned_locked
            - order_not_completed
            - invalid_code
            - got_banned
            - seller_no_answer
            - other
          description: Why the buyer disputed. Absent on an order never disputed.
        dispute_details:
          type: string
          description: The buyer's own words on the dispute.
        cancel_reason:
          type: string
          enum:
            - out_of_stock
          description: >-
            Set when nobody chose to cancel — `out_of_stock` is a payment that
            arrived after the last unit sold.
    Error:
      type: object
      description: The one failure shape this API answers with.
      properties:
        error:
          type: string
          description: A stable snake_case code. Branch on this.
          examples:
            - delivery_instructions_required
      required:
        - error
  responses:
    BadRequest:
      description: |
        The body or a parameter is wrong. `error` names which rule — e.g.
        `delivery_instructions_required`, `bulk_fields_required`,
        `instant_requires_activation_code`, `title_too_short`,
        `invalid_attributes`, `invalid_image`, `invalid_tags`, or
        `unknown_game` for a `game` that does not exist or has no such
        category.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_field:
              value:
                error: delivery_instructions_required
    Unauthorized:
      description: |
        The key is unknown, revoked, or the request came from an address
        outside the key's list. Which check failed is not disclosed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              value:
                error: unauthorized
    NotFound:
      description: >-
        No such thing — or none you may know about, which answers the same on
        purpose.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              value:
                error: not_found
    RateLimited:
      description: One of the budgets is spent. Wait and retry; the key stays valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rate_limited:
              value:
                error: rate_limited
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: Your API key, from the cabinet under **Seller → API keys**.

````