Update a plan
curl -X PATCH "https://api.summerbase.com/v1/plans/:id" \ -H "Authorization: Bearer sb_..." \ -H "Content-Type: application/json" \ -d '{ "properties": { "name": "Growth" } }'const response = await fetch("https://api.summerbase.com/v1/plans/:id", { method: "PATCH", headers: { Authorization: "Bearer sb_...", "Content-Type": "application/json", }, body: JSON.stringify({ "properties": { "name": "Growth" } }),})const data = await response.json()Rename a plan, or archive it. Only what you mention changes, and any
source may attach properties and identities.
A plan is renamed with properties.name and archived with
properties.archived, in your source: the plan takes each from the
highest-priority source that says one, so a source ranked below another
decides only where the other says nothing.
Archiving is how a plan goes: it stays here, and stays on every subscription that is on it, because what a customer paid for last year does not stop being true when you withdraw it.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The plan’s Summerbase id, or an identity ref: a source slug and that
source’s own id for it, joined by a colon — stripe:prod_123.
Example
backend:growthQuery Parameters
Section titled “Query Parameters”Relationships to include in the response instead of fetching separately. A dotted path expands what an expanded record can expand in turn — at most 4 deep, 10 paths a request, and never back to a record already on the path.
Request Body
Section titled “Request Body”object
What other sources call this plan, as source:id — ["stripe:cus_123"]. One that already identifies another plan is refused.
What each source calls this record, as <source>:<id in that source>. Any entry addresses it — stripe:cus_123.
What to do about the parts of this write that cannot be applied as sent, or that would merge two records together.
warn applies everything it can and reports the rest in warnings, so
one unusable property never costs you a subscription’s amounts. error
applies none of it unless all of it applies: the write is rolled back
and every warning comes back as an error instead.
Send error from a form, where somebody is waiting to be told what to
fix, and where folding two customers together is a thing to confirm
rather than to discover afterwards. Leave it alone in an ingest client,
which wants the revenue to land either way.
Properties to record in your source.
Property keys and the values to set. Only the keys named here change; null clears one.
object
object
What to do with the value. Defaults to setting it.
What this value is. Given here, it is not inferred; omitted, the key’s existing definition decides, and a new key takes the type its first value looks like.
The value, as a string. Parsed into the key’s type — which type states
outright, or which the key’s existing definition decides. Null clears the
key.
Example
{ "properties": { "name": "Growth" }}Response
Section titled “Response”Returns the plan object, with response_metadata about this request.
object
About this request rather than about the record. Absent when there is nothing to say.
object
Parts of this write that were skipped — a property whose value did not fit its type — and things it did that were worth saying, like merging two customers. The rest of the write landed. Absent when there is nothing to report.
Send on_warning: "error" to have these refuse the write instead,
and come back as error.errors with the same codes.
object
What kind of thing was skipped, for a client to branch on.
The input it came from, like properties.seats.
What was skipped and why, in a sentence.
Example
{ "archived": false, "created_at": "2025-09-08T14:12:30Z", "id": "0198f1a4-1d2e-7a40-9b31-5c6d7e8f9a0b", "identities": [ "stripe:prod_QhR2sT4uV6wX8y" ], "name": "Growth", "object": "plan", "price_count": 2, "properties": { "tier": "mid" }, "properties_by_source": { "backend": { "tier": "mid" } }}