# Restore raw collection content

Source: https://holofolder.com/app/docs/reference/collection/restore-raw-collection-content

POST https://app.holofolder.com/app/api/v1/storage/restores/raw-content

OpenAPI operation (parameters, authentication, request body and responses):

```json
{
  "operationId": "restore_raw_collection_content",
  "summary": "Restore raw collection content",
  "description": "Bounded explicit same-owner raw content reconciliation of one existing collection, same stable slot IDs, no copied manifest/configuration change. Version 4 is the only command version: it carries the exact current copied manifest, per-slot origins and slotOrder.before/after (identical, or a permutation that also advances the layout revision). Content and origins bind by ID; slot versions advance. At most 1025 slots/manifest entries, 2050 distinct raw-copy refs, 100 wants/slot, 8192 work units (2S+I+W) and 1.75 MiB UTF-8/JSONB command text plus a 2.5 MiB complete prospective audit/undo graph. SQL independently refuses oversized graphs before writes with invalid_input, never a terminal rejection proof. Other command versions return invalid_input. Receipts and dedicated rejections carry version:4. These bounds do not establish production full-Dex availability. Current actor/owner/session or credential and partner preconditions are required, file IDs never prove provenance. Exact item/slot/placement/content/layout versions bind review. Explicit releases retain ownership in Unassigned; copies placed elsewhere cannot move. SQL checks the complete actual graph and its undo before commit. No acquisition, metadata replacement, graded copies, structural slot-set/configuration/grid, multi-collection/settings/assets/CSV restore. Lifetime exact accepted/rejected replay precedes mutable reconstruction after current authority checks. Only committed dedicated inventory/collection/content predicate rejection yields REST409 storage_restore_rejected or MCP isError with error.rejection. MCP outputSchema describes accepted receipts only; holofolder.com/errorSchemas declares errors. Arbitrary conflicts, cancellation and failed COMMIT remain unknown; retain original intent and require a fresh complete read plus explicit reconciliation.\n\nRequired permissions: `collection:write`, `binders:write`. MCP tool: `restore_raw_collection_content`.",
  "tags": [
    "Collection"
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "parameters": [],
  "x-max-body-bytes": 1835008,
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 4
            },
            "operationId": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100
            },
            "inventoryRevision": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "slotOrder": {
              "type": "object",
              "properties": {
                "before": {
                  "minItems": 1,
                  "maxItems": 1025,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "after": {
                  "minItems": 1,
                  "maxItems": 1025,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                }
              },
              "required": [
                "before",
                "after"
              ],
              "additionalProperties": false
            },
            "manifest": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "id",
                        "version"
                      ],
                      "additionalProperties": false
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "entries": {
                      "maxItems": 4096,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "target": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "pokemon"
                                      },
                                      "pokemonId": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "pokemonId"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "card"
                                      },
                                      "cardId": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      "language": {
                                        "type": "string",
                                        "enum": [
                                          "en",
                                          "fr",
                                          "de",
                                          "es",
                                          "it",
                                          "pt-br",
                                          "ja",
                                          "ko"
                                        ]
                                      },
                                      "finish": {
                                        "type": "string",
                                        "enum": [
                                          "normal",
                                          "holo",
                                          "reverse_holo",
                                          "double_rare",
                                          "ultra_rare",
                                          "illustration_rare",
                                          "special_illustration_rare",
                                          "secret_rare",
                                          "hyper_rare",
                                          "radiant_rare",
                                          "ace_spec",
                                          "amazing_rare",
                                          "shiny_rare",
                                          "jumbo"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "cardId"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "target"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "setScope": {
                      "type": "object",
                      "properties": {
                        "setId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "setName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "language": {
                          "type": "string",
                          "enum": [
                            "en",
                            "fr",
                            "de",
                            "es",
                            "it",
                            "pt-br",
                            "ja",
                            "ko"
                          ]
                        },
                        "finishes": {
                          "maxItems": 4,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "normal",
                              "holo",
                              "reverse_holo",
                              "jumbo"
                            ]
                          }
                        },
                        "capturedAt": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "officialCardCount": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cards": {
                          "maxItems": 4096,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "cardId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "setId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "localId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "languageConfirmed": {
                                "type": "boolean"
                              },
                              "verifiedFinishes": {
                                "maxItems": 4,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "enum": [
                                    "normal",
                                    "holo",
                                    "reverse_holo",
                                    "jumbo"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "cardId",
                              "setId",
                              "localId",
                              "name",
                              "languageConfirmed",
                              "verifiedFinishes"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "promoCardIds": {
                          "maxItems": 4096,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        },
                        "excludedCardIds": {
                          "maxItems": 4096,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        },
                        "warnings": {
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 1000
                          }
                        }
                      },
                      "required": [
                        "setId",
                        "setName",
                        "language",
                        "finishes",
                        "capturedAt",
                        "officialCardCount",
                        "cards",
                        "promoCardIds",
                        "excludedCardIds",
                        "warnings"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "source",
                    "name",
                    "entries"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "planning": {
              "type": "object",
              "properties": {
                "actorUserId": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "ownerUserId": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "app",
                    "rest",
                    "mcp"
                  ]
                },
                "credentialId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "authSessionId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "partnershipId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "partnerUserId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "actorUserId",
                "ownerUserId",
                "source",
                "credentialId",
                "authSessionId",
                "partnershipId",
                "partnerUserId"
              ],
              "additionalProperties": false
            },
            "collection": {
              "type": "object",
              "properties": {
                "collectionId": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "version": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "layoutRevision": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "collectionId",
                "version",
                "layoutRevision"
              ],
              "additionalProperties": false
            },
            "configuration": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "binder",
                    "slab",
                    "custom"
                  ]
                },
                "defaultPresentation": {
                  "type": "string",
                  "enum": [
                    "binder",
                    "slabs",
                    "list"
                  ]
                },
                "location": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rows": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 8
                },
                "cols": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 8
                }
              },
              "required": [
                "name",
                "kind",
                "defaultPresentation",
                "location",
                "rows",
                "cols"
              ],
              "additionalProperties": false
            },
            "slots": {
              "minItems": 1,
              "maxItems": 1025,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "before": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "version": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "inventoryItemId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "itemVersion": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "placementVersion": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "version",
                      "inventoryItemId",
                      "itemVersion",
                      "placementVersion"
                    ],
                    "additionalProperties": false
                  },
                  "after": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "target": {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "pokemon"
                                  },
                                  "pokemonId": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "kind",
                                  "pokemonId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "card"
                                  },
                                  "cardId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "language": {
                                    "type": "string",
                                    "enum": [
                                      "en",
                                      "fr",
                                      "de",
                                      "es",
                                      "it",
                                      "pt-br",
                                      "ja",
                                      "ko"
                                    ]
                                  },
                                  "finish": {
                                    "type": "string",
                                    "enum": [
                                      "normal",
                                      "holo",
                                      "reverse_holo",
                                      "double_rare",
                                      "ultra_rare",
                                      "illustration_rare",
                                      "special_illustration_rare",
                                      "secret_rare",
                                      "hyper_rare",
                                      "radiant_rare",
                                      "ace_spec",
                                      "amazing_rare",
                                      "shiny_rare",
                                      "jumbo"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "cardId"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "collected",
                              "finalized",
                              "considering",
                              "wishlisted"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "wantedCards": {
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "card_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "card_name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "added_at": {
                              "type": "string"
                            },
                            "card_language": {
                              "type": "string",
                              "enum": [
                                "en",
                                "fr",
                                "de",
                                "es",
                                "it",
                                "pt-br",
                                "ja",
                                "ko"
                              ]
                            },
                            "card_finish": {
                              "type": "string",
                              "enum": [
                                "normal",
                                "holo",
                                "reverse_holo",
                                "double_rare",
                                "ultra_rare",
                                "illustration_rare",
                                "special_illustration_rare",
                                "secret_rare",
                                "hyper_rare",
                                "radiant_rare",
                                "ace_spec",
                                "amazing_rare",
                                "shiny_rare",
                                "jumbo"
                              ]
                            },
                            "card_image": {
                              "type": "string"
                            },
                            "card_set": {
                              "type": "string"
                            },
                            "rarity": {
                              "type": "string"
                            },
                            "local_id": {
                              "type": "string"
                            },
                            "illustrator": {
                              "type": "string"
                            },
                            "set_total": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "wanted_by": {
                              "maxItems": 2,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              }
                            }
                          },
                          "required": [
                            "card_id",
                            "card_name",
                            "added_at"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "inventoryItemId": {
                        "anyOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "presetOrigin": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "version": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  }
                                },
                                "required": [
                                  "id",
                                  "version"
                                ],
                                "additionalProperties": false
                              },
                              "entryId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "source",
                              "entryId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "target",
                      "status",
                      "wantedCards",
                      "inventoryItemId",
                      "presetOrigin"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "before",
                  "after"
                ],
                "additionalProperties": false
              }
            },
            "items": {
              "maxItems": 2050,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "itemId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "itemVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "placement": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "collectionId": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          "slot": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "version": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "inventoryItemId": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "itemVersion": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "placementVersion": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "version",
                              "inventoryItemId",
                              "itemVersion",
                              "placementVersion"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "collectionId",
                          "slot"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "itemId",
                  "itemVersion",
                  "placement"
                ],
                "additionalProperties": false
              }
            },
            "releaseItemIds": {
              "maxItems": 2050,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            }
          },
          "required": [
            "version",
            "operationId",
            "inventoryRevision",
            "slotOrder",
            "manifest",
            "planning",
            "collection",
            "configuration",
            "slots",
            "items",
            "releaseItemIds"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "version": {
                "type": "number",
                "const": 4
              },
              "inventoryRevision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "changed": {
                "type": "boolean",
                "const": true
              },
              "collectionId": {
                "type": "string",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              "collectionVersion": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "layoutRevision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "slotOrder": {
                "type": "object",
                "properties": {
                  "before": {
                    "maxItems": 1025,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "after": {
                    "maxItems": 1025,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  }
                },
                "required": [
                  "before",
                  "after"
                ],
                "additionalProperties": false
              },
              "slotIds": {
                "maxItems": 1025,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "releasedItemIds": {
                "maxItems": 2050,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              }
            },
            "required": [
              "version",
              "inventoryRevision",
              "changed",
              "collectionId",
              "collectionVersion",
              "layoutRevision",
              "slotOrder",
              "slotIds",
              "releasedItemIds"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "401": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "402": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "403": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "404": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "409": {
      "description": "Only the bound terminal ledger rejection carries proof; ordinary conflicts do not.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "requestId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "requestId"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "error"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "const": "storage_restore_rejected"
                      },
                      "message": {
                        "type": "string",
                        "const": "The original restore did not commit. Read current storage before explicit reconciliation."
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "rejection": {
                        "type": "object",
                        "properties": {
                          "version": {
                            "type": "number",
                            "const": 4
                          },
                          "outcome": {
                            "type": "string",
                            "const": "rejected"
                          },
                          "operationId": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 100
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "inventory_revision_conflict",
                              "raw_restore_collection_conflict",
                              "raw_restore_content_conflict"
                            ]
                          },
                          "inventoryRevision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "version",
                          "outcome",
                          "operationId",
                          "code",
                          "inventoryRevision"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "requestId",
                      "rejection"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "error"
                ],
                "additionalProperties": false
              }
            ]
          }
        }
      }
    },
    "413": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "422": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "429": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "503": {
      "description": "See the API conventions page.",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "requestId": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "requestId"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "error"
            ],
            "additionalProperties": false
          }
        }
      }
    }
  }
}
```
