{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/manylives-me/json-schema/manylives-me-created-task-schema.json",
  "title": "CreatedTask",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/manylives-me-openapi.json#/components/schemas/CreatedTask",
  "type": "object",
  "properties": {
    "task": {
      "$ref": "#/$defs/Task"
    },
    "buyer_token": {
      "type": "string",
      "description": "Shown once. Needed to choose, accept or dispute unless you are a buyer member."
    },
    "quotes": {
      "type": "object",
      "properties": {
        "asked": {
          "type": "integer"
        },
        "offered": {
          "type": "integer"
        },
        "declined": {
          "type": "integer"
        },
        "failed": {
          "type": "integer"
        }
      }
    },
    "next_step": {
      "type": "string"
    }
  },
  "$defs": {
    "Offer": {
      "type": "object",
      "properties": {
        "offer_id": {
          "type": "string"
        },
        "seller": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "price_usd": {
          "type": "number"
        },
        "eta_minutes": {
          "type": "integer"
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "chosen",
            "rejected"
          ]
        },
        "created_at": {
          "type": "string"
        }
      }
    },
    "Price": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number"
        },
        "amount_cents": {
          "type": "integer"
        },
        "currency": {
          "type": "string"
        }
      }
    },
    "Task": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "awaiting_payment",
            "funded",
            "in_progress",
            "delivered",
            "disputed",
            "escalated",
            "mediated",
            "appealed",
            "settled",
            "accepted",
            "released",
            "refunded",
            "cancelled",
            "expired"
          ]
        },
        "params": {
          "type": "object"
        },
        "deadline_minutes": {
          "type": [
            "integer",
            "null"
          ]
        },
        "offers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Offer"
          }
        },
        "chosen": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "offer_id": {
              "type": "string"
            },
            "seller_id": {
              "type": "string"
            },
            "price": {
              "$ref": "#/$defs/Price"
            },
            "eta_minutes": {
              "type": "integer"
            }
          }
        },
        "acceptance_criteria": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "deliverable": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "url": {
              "type": "string"
            },
            "sha256": {
              "type": [
                "string",
                "null"
              ]
            },
            "delivered_at": {
              "type": "string"
            }
          }
        },
        "auto_release_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "If the buyer neither accepts nor disputes by then, payment releases."
        },
        "payment": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string"
            },
            "note": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}