Skip to content

quote

Save a statement of work

PUT/v1/quotes/{quoteId}/sow

Replaces the quote's live statement of work, or creates it on the first save. The replaced content stays in the SOW's version history, but the SOW on the quote, its PDF and the client's view change immediately. The statement of work is saved as HTML, which is what the editor, the PDF and the client's view show. Send Markdown in content and it is converted: # and ## headings become sections, and lists, bold, italic and links carry over. With sections (HTML bodies), content must be exactly the HTML they flatten to. To propose a change for a person to review instead, use quote.sow_draft.

Parameters

NameInRequiredTypeDescription
quoteIdpathYesstring—
Idempotency-KeyheaderYesstringOpaque idempotency key, at most 255 characters, scoped to (tenant, principal, operation). A missing key is validation_failed.

Request body

  • content (required): string — The whole statement of work, at most 2 MB. It is saved as HTML: each section is an <h2> heading followed by its body, and a body can use <p>, <h3>, <ul>, <ol>, <li>, <strong>, <em> and <a>. Markdown is converted: a # or ## heading starts a new section, text before the first heading becomes an untitled introduction, ### and smaller headings stay inside their section, and lists (nested ones included), bold, italic and links carry over. With sections, content must be exactly the HTML the sections flatten to.
  • contentFormat: string — How content is written: markdown, html or plain. Left out, content containing HTML tags is read as html and anything else as markdown. Markdown and plain text are converted to HTML before saving, so the saved statement of work is always HTML.
  • sections: array

Responses and errors

  • 200

    Save a statement of work

    • quoteId (required): string
    • url (required): string
    • sow (required): object
  • 202

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ApprovalRequiredError:
    • allOf: ErrorEnvelope
  • 400

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ValidationFailedError:
    • allOf: ErrorEnvelope
  • 401

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • UnauthorizedError:
    • allOf: ErrorEnvelope
  • 403

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ForbiddenError:
    • allOf: ErrorEnvelope
  • 404

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • NotFoundError:
    • allOf: ErrorEnvelope
  • 409

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ConflictError:
    • allOf: ErrorEnvelope
  • 429

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • RateLimitedError:
    • allOf: ErrorEnvelope
  • 503

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • UnavailableError:
    • allOf: ErrorEnvelope

Example

curl --request PUT \
  --url 'https://api.scopable.io/v1/quotes/{quoteId}/sow' \
  --header 'Authorization: Bearer $SCOPABLE_API_KEY' \
  --data '<JSON request body>'

Replace $SCOPABLE_API_KEY with a key created in Settings, API; replace the request body placeholder with JSON matching the schema above.

View the OpenAPI 3.1 source

Need help with the API? …