Skip to content

Reimport a customer's history

POST
/v1/customers/:id/reimport
curl -X POST "https://api.summerbase.com/v1/customers/:id/reimport" \
-H "Authorization: Bearer sb_..." \
-H "Content-Type: application/json" \
-d '{
"history": [
{
"effective_at": "2025-11-03T16:20:00Z",
"properties": {
"name": "Northwind Labs",
"seats": 20
}
},
{
"effective_at": "2026-06-12T15:47:00Z",
"properties": {
"seats": 25
}
}
]
}'

Replace everything your source has said about a customer with its history, sent all at once and oldest first — the one way to write the past.

Each entry is a patch onto the one before it, applied through the same rules as an update; the first is applied to a customer holding nothing of yours. Your properties on the customer are replaced; other sources’ properties and every identity stay, and identities adds to them. Lands whole or not at all.

What it replaces is deleted for good: gone from every answer within moments, and from every copy Summerbase keeps within a day.

A customer that does not exist yet is created by its first entry.

id
required
string
>= 1 characters <= 320 characters

The customer — a Summerbase id, or a source identity like stripe:cus_123.

Example

backend:acct_4821
expand[]
Array<string>
<= 10 items
Allowed values: country erasures subscriptions

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.

Media typeapplication/json
object
history
required

The customer’s history, oldest first. At most 10,000 entries.

Array<object>
object
effective_at
required

When this became true. Later than the entry before it.

string format: date-time
properties

Properties in your source that changed at this moment; null clears one.

object
key
additional properties
Any of:
string
identities

What other sources call this customer, as source:id. Attached once, beside the history — an identity is an address rather than a value and has no moment. One that already identifies another record is refused.

What each source calls this record, as <source>:<id in that source>. Any entry addresses it — stripe:cus_123.

Array<string>

Example

{
"history": [
{
"effective_at": "2025-11-03T16:20:00Z",
"properties": {
"name": "Northwind Labs",
"seats": 20
}
},
{
"effective_at": "2026-06-12T15:47:00Z",
"properties": {
"seats": 25
}
}
]
}

Returns the customer object.

Media typeapplication/json

Example

{
"arr": "15000.00",
"churned_at": null,
"country_code": "US",
"created_at": "2025-11-03T16:20:04Z",
"email": "billing@northwind.example.com",
"first_paying_at": "2025-12-01T10:04:00Z",
"first_seen_at": "2025-11-03T16:20:00Z",
"first_subscribed_at": "2025-11-17T10:04:00Z",
"id": "0199a7c2-4e1b-7f38-b9d2-5a6c8e0f1d73",
"identities": [
"stripe:cus_QX7bN2kLp4Rt9v",
"backend:acct_4821"
],
"mrr": "1250.00",
"name": "Northwind Labs",
"object": "customer",
"properties": {
"seats": 25
},
"properties_by_source": {
"backend": {
"seats": 25
},
"stripe": {
"email": "billing@northwind.example.com",
"name": "Northwind Labs"
}
},
"signed_up_at": "2025-11-03T16:20:00Z",
"status": "paying"
}