Plan a customer customization schema change
Declarative schema workflow, shared by channels, blogs, product and customer customizations and checkout profiles:
GET .../schemaexports the current schema (target attributes plus ordinary fields).POST .../plandiffs a desired document against the target and returns the ops, drift, warnings and afingerprint. Nothing is written.POST .../applywith the same document plus thatfingerprintwrites the change. It fails with 409 when the target changed since the plan (a fresh plan is returned), with 422 when the plan has blocked ops or warnings, and with 422 when it has destructive ops andconfirm_destructiveis not true.
Fields absent from the document are kept and reported as drift unless prune: true removes them (destructive).
Planning or applying a channel, blog or checkout profile slug that does not exist yet creates it on apply.
See the channel endpoints for full request and response examples.
Personal access token tied to a user account. Requires the X-Nimbu-Site header to scope requests.
In: header
Identifier of the site context when authenticating with a personal access token.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/customers/customizations/plan" \ -H "Content-Type: application/json" \ -d '{ "fields": [ { "name": "string" } ] }'{
"target": "string",
"fingerprint": "string",
"exists": true,
"ops": [
{
"kind": "create_target",
"risk": "safe",
"field": "string",
"attr": "string",
"option": "string",
"type": "string",
"from": null,
"to": null,
"entries": 0,
"entries_with_value": 0,
"reason": "string"
}
],
"drift": [
{
"field": "string",
"type": "string",
"option": "string",
"note": "string"
}
],
"warnings": [
"string"
],
"info": [
"string"
]
}{
"message": "string",
"plan": {
"target": "string",
"fingerprint": "string",
"exists": true,
"ops": [
{
"kind": "create_target",
"risk": "safe",
"field": "string",
"attr": "string",
"option": "string",
"type": "string",
"from": null,
"to": null,
"entries": 0,
"entries_with_value": 0,
"reason": "string"
}
],
"drift": [
{
"field": "string",
"type": "string",
"option": "string",
"note": "string"
}
],
"warnings": [
"string"
],
"info": [
"string"
]
}
}