{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/another-directory/json-schema/another-directory-submission-schema.json",
  "title": "Submission",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/another-directory-openapi.yml#/components/schemas/Submission",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Where the listing is, in a sentence or two."
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "awaiting_badge",
        "awaiting_payment",
        "live",
        "rejected"
      ]
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "pro",
        "boost"
      ]
    },
    "listing": {
      "type": "object",
      "description": "The listing as stored. Once it's in the maker's account, only `website` and `page_url`."
    },
    "actions": {
      "type": "object",
      "description": "`verify_badge` and `checkout`, when available: method, url and body to send."
    },
    "status_label": {
      "type": "string"
    },
    "badge": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "where": {
          "type": "string"
        },
        "html": {
          "type": "string"
        }
      }
    },
    "next_steps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "status_url": {
      "type": "string",
      "format": "uri"
    },
    "checkout_url": {
      "type": "string",
      "format": "uri",
      "description": "On creation with plan pro or boost: the Stripe page to pay on."
    },
    "plan_error": {
      "type": "string",
      "enum": [
        "badge_not_verified",
        "checkout_unavailable"
      ],
      "description": "On creation, when the plan sent couldn't be taken. The listing is saved; finish it through actions."
    }
  }
}