{
  "openapi": "3.1.0",
  "info": {
    "title": "Stillleaf",
    "version": "1",
    "description": "Request correction, printing and delivery of an existing memorial program. Supply exact changes, a secure file link or file-to-follow instructions, finished quantity, destination and requested arrival. Stillleaf reviews the file, resolves questions and develops a completion plan and pricing by email. A receipt is not a proof, accepted order or confirmed delivery. Use private request status and continuation for later changes."
  },
  "servers": [
    {
      "url": "https://stillleaf.forevenza.com"
    }
  ],
  "paths": {
    "/_c/requests/{id}": {
      "get": {
        "operationId": "request_status",
        "summary": "Resume your recorded requirement and linked offers",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}": {
      "get": {
        "operationId": "inspect_offer",
        "summary": "Authorized terms, order and processor payment state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/accept": {
      "post": {
        "operationId": "accept_offer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "accept",
                  "name"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "accept": {
                    "const": true
                  },
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "purchase_order": {
                    "type": "string",
                    "maxLength": 80
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/decline": {
      "post": {
        "operationId": "decline_offer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/offers/{id}/release": {
      "post": {
        "operationId": "release_payment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": true,
            "description": "Private receipt/link token. Never publish it.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{48}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "terms_sha256",
                  "payment",
                  "confirm"
                ],
                "properties": {
                  "terms_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "Exact terms_sha256 returned by inspect_offer"
                  },
                  "payment": {
                    "type": "string"
                  },
                  "confirm": {
                    "const": true
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Current customer-visible state; payment links are not proof of payment"
          },
          "400": {
            "description": "Invalid input"
          },
          "404": {
            "description": "Unknown resource or invalid credentials"
          },
          "409": {
            "description": "State or terms conflict"
          }
        }
      }
    },
    "/_c/request": {
      "post": {
        "operationId": "submit_request",
        "summary": "Send a requirement to Stillleaf",
        "description": "Your correction and delivery request is recorded and receives a reference number. If no secure link was given, the next step is yours: reply to Stillleaf's first email with the file attached. When the file arrives, Stillleaf reviews it with the correction, resolves open details, and establishes printing and delivery feasibility. We reply by email when you leave an address, with a proposed completion plan and pricing for review. Nothing is ordered or committed until you agree terms; timing and availability are confirmed before acceptance. Contact details are kept apart from the requirement, while we correspond or do business and for 24 months after, so a later request picks up where it left off; ask us to delete them at any time.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "need"
                ],
                "properties": {
                  "continuation": {
                    "type": "object",
                    "required": [
                      "id",
                      "token"
                    ],
                    "description": "Optional receipt credentials to continue an existing requirement with this business",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "token": {
                        "type": "string"
                      }
                    }
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "buy",
                      "source",
                      "quote",
                      "verify",
                      "lease",
                      "license",
                      "hire",
                      "retrieve",
                      "convert",
                      "other"
                    ],
                    "description": "What you want done"
                  },
                  "need": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The requirement in your own words"
                  },
                  "specifications": {
                    "type": "object",
                    "properties": {
                      "file_name": {
                        "type": "string",
                        "description": "Customer-reported original filename or version; does not establish transfer.",
                        "x-facet": "identifier"
                      },
                      "file_url": {
                        "type": "string",
                        "description": "Customer-provided secure https link to the current original. Access remains to be reviewed.",
                        "x-facet": "specification"
                      },
                      "file_state": {
                        "type": "string",
                        "description": "Secure link supplied or file to follow in the email conversation. Never infer file receipt from a filename.",
                        "x-facet": "specification"
                      },
                      "correction": {
                        "type": "string",
                        "description": "Current exact corrections, panel or location, unchanged-content instructions and any unresolved contradictory wording.",
                        "x-facet": "specification"
                      },
                      "quantity": {
                        "type": "number",
                        "minimum": 1,
                        "description": "Number of finished programs, not PDF pages or panels.",
                        "x-facet": "quantity"
                      },
                      "destination": {
                        "type": "string",
                        "description": "Delivery address or supplied partial location; do not infer a state from Lancaster alone.",
                        "x-facet": "geography"
                      },
                      "arrival": {
                        "type": "string",
                        "description": "Requested arrival in customer's own wording, including time and timezone; not a confirmed delivery.",
                        "x-facet": "timing"
                      },
                      "arrival_date": {
                        "type": "string",
                        "format": "date",
                        "description": "Optional YYYY-MM-DD arrival date. Non-date words are retained and remain missing/open; they do not establish a dated request.",
                        "x-facet": "timing"
                      },
                      "service": {
                        "type": "string",
                        "description": "Service time, distinct from requested arrival.",
                        "x-facet": "timing"
                      },
                      "receiving": {
                        "type": "string",
                        "description": "Receiving hours and delivery instructions; preserve conflicts with requested arrival.",
                        "x-facet": "timing"
                      },
                      "approval": {
                        "type": "string",
                        "description": "Who approves the corrected proof and any approval still pending. A request is not proof approval.",
                        "x-facet": "specification"
                      },
                      "appearance": {
                        "type": "string",
                        "description": "Current appearance requirement as one plain sentence: keep edge-to-edge, margins acceptable, or not settled when the written note and a carried choice disagree.",
                        "x-facet": "specification"
                      },
                      "appearance_note": {
                        "type": "string",
                        "description": "What the customer wrote about appearance, verbatim.",
                        "x-facet": "specification"
                      },
                      "appearance_choice": {
                        "type": "string",
                        "description": "A choice carried from the printing guidance page (edge-to-edge or border acceptable). If it disagrees with appearance_note, the question stays open and the artwork is kept to the edge.",
                        "x-facet": "specification"
                      },
                      "layout": {
                        "type": "string",
                        "description": "Known flat and finished dimensions, fold and source PDF layout; do not equate panels with PDF page count.",
                        "x-facet": "specification"
                      },
                      "note_for_stillleaf": {
                        "type": "string",
                        "description": "Later customer sentences that match no field, kept verbatim for Stillleaf to read. Never part of the wording correction and never typeset.",
                        "x-facet": "specification"
                      },
                      "wording_question": {
                        "type": "string",
                        "description": "A later wording or spelling instruction that could not be applied with confidence, verbatim. While present, the final spelling is unresolved and nothing is typeset with it.",
                        "x-facet": "specification"
                      },
                      "open_questions": {
                        "type": "string",
                        "description": "Distinct unresolved factual, approval, address, receiving or feasibility decisions with next owner.",
                        "x-facet": "specification"
                      },
                      "proposed_work": {
                        "type": "string",
                        "description": "Stillleaf-owned next work, not completed work: file review, correction clarification, proof preparation and printing/delivery plan and pricing.",
                        "x-facet": "specification"
                      },
                      "source_history": {
                        "type": "string",
                        "description": "Labelled historical original note and changes. Current explicit fields supersede historical wording.",
                        "x-facet": "specification"
                      }
                    },
                    "description": "Details you already know. The business helps resolve missing specifications in the continuing engagement."
                  },
                  "quantity": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "unit": {
                        "type": "string"
                      },
                      "per": {
                        "type": "string"
                      }
                    }
                  },
                  "timing": {
                    "type": "object",
                    "properties": {
                      "earliest": {
                        "type": "string"
                      },
                      "latest": {
                        "type": "string"
                      },
                      "recurrence": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  },
                  "geography": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "from": {
                        "type": "string"
                      },
                      "to": {
                        "type": "string"
                      }
                    }
                  },
                  "budget": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string",
                        "description": "ISO 4217, default USD"
                      },
                      "per": {
                        "type": "string",
                        "description": "total, unit, month, year, load, ..."
                      }
                    }
                  },
                  "requested_fields": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 30,
                    "description": "Result fields you need"
                  },
                  "contact": {
                    "type": "object",
                    "description": "Optional; stored apart from the requirement, kept while we correspond or do business and for 24 months after, then deleted; you can ask us to delete it sooner",
                    "properties": {
                      "email": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organization": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Recorded, with a reference number"
          },
          "400": {
            "description": "What to fix"
          }
        }
      }
    }
  }
}