oddly Prescriptions API

Margin-aware prescriptive recommendations and held-mutate previews.

GitHub OpenAPI

Operations 2

GET /api/v1/prescriptions List margin-aware prescriptions for a brand #
POST /api/v1/prescriptions/dry-run Preview acting on a prescription (held-mutate, no execution) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/myoddly-com:myoddly-com-prescriptions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

myoddly-com-prescriptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Oddly Platform Prescriptions API
  version: 1.0.0
  description: 'Programmatic access to oddly''s deterministic commerce primitives for agents, automations, and partner tools. Authenticate with a bearer key minted at /dashboard/developers. Receipts are the rail: every response is traceable to the exact rule that produced it, so an answer is auditable, cacheable, and reproducible. All v1 endpoints are deterministic: same inputs, same outputs, no model in the hot path.'
servers:
- url: https://myoddly.com
security:
- bearerAuth: []
tags:
- name: Prescriptions
  description: Margin-aware prescriptive recommendations and held-mutate previews.
paths:
  /api/v1/prescriptions:
    get:
      operationId: listPrescriptions
      tags:
      - Prescriptions
      summary: List margin-aware prescriptions for a brand
      description: Ads-vs-margin, promo-vs-margin and budget-wasting-keyword recommendations, computed live from the rule read-functions and ranked by severity then dollar impact. Deterministic and read-only; nothing executes. Autopilot tier and up.
      parameters:
      - name: brand_id
        in: query
        required: false
        description: Brand to scope the read to. Required when the account owns more than one brand.
        schema:
          type: string
      - name: family
        in: query
        required: false
        schema:
          type: string
          enum:
          - ads_vs_margin
          - promo_vs_margin
          - budget_wasting_keyword
      - name: limit
        in: query
        required: false
        description: Page size after ranking.
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: Prescriptions plus a summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Tier upgrade required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Brand not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/prescriptions/dry-run:
    post:
      operationId: dryRunPrescription
      tags:
      - Prescriptions
      summary: Preview acting on a prescription (held-mutate, no execution)
      description: Names a prescription by its dedupe_key; the server recomputes it and returns the projected impact. A dispatchable operation routes through the logging dispatcher (writes an audit row, origin='api', never calls a connector); an advisory recommendation writes nothing. Nothing executes. POST because the logging path writes that audit row. Autopilot tier and up.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrescriptionDryRunRequest'
      responses:
        '200':
          description: Dry-run projection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Tier upgrade required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Prescription or brand not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - type
          - code
          - message
          - request_id
          properties:
            type:
              type: string
              enum:
              - invalid_request
              - auth_invalid
              - tier_required
              - not_found
              - rate_limited
              - server_error
            code:
              type: string
            message:
              type: string
            details:
              type: object
              nullable: true
            request_id:
              type: string
    PrescriptionDryRunRequest:
      type: object
      required:
      - brand_id
      - dedupe_key
      properties:
        brand_id:
          type: string
        dedupe_key:
          type: string
          description: The dedupe_key of the prescription to preview, from a /api/v1/prescriptions response.
    Envelope:
      type: object
      required:
      - data
      - meta
      properties:
        data:
          type: object
          description: The resource payload. Shape depends on the endpoint.
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      required:
      - request_id
      - api_version
      - tier
      properties:
        request_id:
          type: string
          description: Echoed in the X-Request-Id header. Quote it in support tickets.
        api_version:
          type: string
          enum:
          - v1
        tier:
          type: string
          description: The caller's tier at request time.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: oddly_live_*
      description: 'API key minted at /dashboard/developers. Send as: Authorization: Bearer oddly_live_...'