{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spoofy-social/json-schema/spoofy-social-service-schema.json",
  "title": "Service",
  "description": "Something you can buy: one metric on one platform at one quality tier.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spoofy-social-openapi.json#/components/schemas/Service",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Service id — pass it as `service` when quoting or ordering."
    },
    "platform": {
      "type": "string"
    },
    "platformLabel": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "enum": [
        "profile",
        "post",
        "video",
        "channel",
        "group",
        "token",
        "site",
        "track",
        "stream",
        "server"
      ],
      "description": "What kind of link it takes."
    },
    "metric": {
      "type": "string"
    },
    "metricLabel": {
      "type": "string"
    },
    "tier": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "linkHint": {
      "type": "string",
      "description": "An example of the link this service takes."
    },
    "minQty": {
      "type": "integer"
    },
    "maxQty": {
      "type": "integer"
    },
    "kind": {
      "type": "string",
      "enum": [
        "count",
        "time",
        "manual"
      ],
      "description": "`count`: units delivered (followers, views…). `time`: live viewers for `minutes` — `quantity` is how many at most; stopping early refunds the minutes that did not run. `manual`: done-for-you work (a listing), one per order, with a form to fill in (`form`)."
    },
    "minutes": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Time-based services: how long one order runs."
    },
    "linkPlatforms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Link platforms it takes besides its own (\"*\" = any link)."
    },
    "form": {
      "type": [
        "array",
        "null"
      ],
      "description": "Done-for-you services: what to send as `details` when ordering. Image fields take an upload id (POST /api/v1/uploads).",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "text",
              "textarea",
              "url",
              "email"
            ]
          },
          "label": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "hint": {
            "type": "string"
          },
          "max": {
            "type": "integer",
            "description": "Text: at most this many characters."
          },
          "image": {
            "type": "object",
            "properties": {
              "minWidth": {
                "type": "integer"
              },
              "minHeight": {
                "type": "integer"
              },
              "ratio": {
                "type": "number",
                "description": "Width ÷ height (1 = square)."
              },
              "maxBytes": {
                "type": "integer"
              }
            }
          }
        }
      }
    },
    "input": {
      "$ref": "#/$defs/ServiceInput"
    },
    "pricePer1k": {
      "type": "string",
      "pattern": "^\\d+\\.\\d{2,4}$",
      "description": "Price per 1,000 units. USD as a decimal string."
    },
    "pricePer1kMicros": {
      "type": "string",
      "description": "Same price in micro-USD (1 USD = 1,000,000), as a string."
    },
    "pricePerUnit": {
      "type": "string",
      "description": "Price of one unit (one viewer for `minutes`, one listing), USD."
    },
    "cancelable": {
      "type": "boolean"
    },
    "startTime": {
      "type": [
        "string",
        "null"
      ]
    },
    "speed": {
      "type": [
        "string",
        "null"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "startEstimate": {
      "type": [
        "string",
        "null"
      ],
      "description": "When delivery usually starts, in words (\"Usually starts within 1 h\") when we have a real basis (our delivery history, a published average, the service's own words); \"Start time varies\" otherwise. Null for done-for-you work."
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2 code (upper case) when the accounts are from one country, e.g. \"US\", \"BR\"."
    },
    "region": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "EU",
        "ASIA",
        "ARAB",
        "AFRICA",
        "LATAM",
        "EN",
        "US+GB",
        "MULTI",
        null
      ],
      "description": "When the accounts are from a region rather than one country."
    },
    "geoGroup": {
      "type": [
        "string",
        "null"
      ],
      "description": "The same for every country / region variant of one service: group by it to offer a country choice."
    },
    "warning": {
      "type": [
        "string",
        "null"
      ],
      "description": "What to know before buying, in words (\"Mixed accounts: quality varies from one account to the next.\"); null when there is nothing to warn about. On every service, counts can drop after delivery and drops are not replaced."
    },
    "delivery": {
      "type": [
        "object",
        "null"
      ],
      "description": "The delivery estimate as numbers, to work out the time for any quantity: minutes = startMinutes + quantity ÷ perDay × 1440; without a speed, avgMinutesPer1k × max(1, quantity ÷ 1000). Null until there is an estimate.",
      "properties": {
        "startMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Typical wait before delivery starts."
        },
        "perDay": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Typical units delivered per day once started."
        },
        "avgMinutesPer1k": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Typical minutes for 1,000 units, used when the speed is unknown."
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "history",
            "supplier",
            "name",
            "similar",
            "history+similar",
            "supplier+similar",
            "name+similar",
            null
          ],
          "description": "What the numbers come from: our delivery history, a published average, the service's own words, or (similar) the median of comparable services."
        }
      }
    },
    "packages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "quantity": {
            "type": "integer"
          },
          "price": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2,4}$",
            "description": "Package total. USD as a decimal string."
          },
          "eta": {
            "type": [
              "string",
              "null"
            ],
            "description": "Estimated time until fully delivered, in words (\"~2 days\")."
          },
          "etaMinutes": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The same estimate in minutes."
          }
        }
      }
    }
  },
  "$defs": {
    "ServiceInput": {
      "type": "object",
      "description": "What a service needs besides a link and a quantity — send the fields in an order’s `inputs`. `shape`: default (link + quantity), package (one, link only), custom_comments (your comments, one per line), mentions_custom_list (accounts to mention), mentions_hashtag, mentions_user_followers, comment_likes, poll (which option), subscription (auto-engagement on future posts).",
      "properties": {
        "shape": {
          "type": "string",
          "enum": [
            "default",
            "package",
            "custom_comments",
            "mentions_custom_list",
            "mentions_hashtag",
            "mentions_user_followers",
            "comment_likes",
            "poll",
            "subscription"
          ]
        },
        "quantity": {
          "type": "string",
          "enum": [
            "given",
            "count",
            "fixed",
            "per_post"
          ],
          "description": "given: you send `quantity` · count: one unit per comment / username sent · fixed: one per order · per_post: subscriptions, charged for max × (posts + old_posts) up front, the unused part refunded when it ends."
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "description": "The key in `inputs`."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "lines",
                  "handles",
                  "handle",
                  "hashtag",
                  "integer",
                  "choice",
                  "date"
                ]
              },
              "label": {
                "type": "string"
              },
              "required": {
                "type": "boolean"
              },
              "hint": {
                "type": "string"
              },
              "min": {
                "type": "integer"
              },
              "max": {
                "type": "integer"
              },
              "maxLength": {
                "type": "integer",
                "description": "lines: characters per line."
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "spread": {
          "type": "boolean",
          "description": "The order can be spread over `runs`, `interval` minutes apart."
        },
        "perRun": {
          "type": "object",
          "properties": {
            "min": {
              "type": "integer"
            },
            "max": {
              "type": "integer"
            }
          },
          "description": "Spread over `runs`: what `quantity` (one run) can be — what the service’s sources that deliver in runs take, which can be narrower than `minQty`–`maxQty`. A run outside it is refused naming these limits."
        },
        "linksAllowed": {
          "type": "boolean",
          "description": "Your text may carry links."
        }
      }
    }
  }
}