# Execute inventory commands

Source: https://holofolder.com/app/docs/reference/collection/execute-inventory-commands

POST https://app.holofolder.com/app/api/v1/storage/inventory/commands

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

```json
{
  "operationId": "execute_inventory_commands",
  "summary": "Execute inventory commands",
  "description": "A committed terminal ledger rejection returns REST 409 storage_command_rejected or MCP isError with the same error.rejection: outcome, original operationId, known code and inventoryRevision. Other conflicts/timeouts are not rejection proof. MCP outputSchema describes accepted receipts only; holofolder.com/errorSchemas metadata declares errors. Atomic insertAssign, owned-copy add/edit/remove/unassign/assign/move or collection deletion through the trusted executor. insertAssign creates one stable slot before an exact existing slot reference or appends with before:null, retaining explicit target:null/free or target intent. selection:null creates no ownership; existing requires an exact Unassigned item/version, new explicitly creates that stable item. It never auto-selects a grade or moves an assigned copy. Maximum 4096 slots and 8192 insertion work rows per request, 100 commands, 256 affected selected entities, 256 KiB ordinary request, 1 MiB ordinary receipt and unchanged 16 MiB/16384 audit bounds and 10s deadline; oversized evidence rejects atomically. Full selected-copy/destination and revision preconditions are mandatory. Only explicit removeOwned (a command, or removeOwned:true on deleteCollection, which deletes the raw copies in that collection and leaves graded copies Unassigned) deletes ownership; idempotent receipts require a fresh complete read before reconciliation. Set privateFields=preserve for add, explicit removeOwned, unassign or placement with fulfillWant:null; patchGrading updates only declared public fields on existing grading; setFinish corrects the recorded finish of a card copy in place (migration 114) and must still match the target of its pocket; selected-want expectedPublic compares the exact locked slot/index public projection. Hidden certificates/assets/provenance and unrelated wants are retained by migration 090 after original-intent replay lookup. Omitted or replace retains full-replacement semantics.\n\nRequired permissions: `collection:write`, `binders:write`. MCP tool: `execute_inventory_commands`.",
  "tags": [
    "Collection"
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "parameters": [],
  "x-max-body-bytes": 8388608,
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "operationId": {
              "type": "string",
              "minLength": 8,
              "maxLength": 100
            },
            "inventoryRevision": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "privateFields": {
              "description": "preserve allows public patchGrading and exact selected-want expectedPublic; rejects full grading/wants replacement and slot/collection removal. replace (also the legacy default when omitted) retains full-replacement semantics; never rebuild replacements from redacted reads.",
              "type": "string",
              "enum": [
                "preserve",
                "replace"
              ]
            },
            "expectedOwnerUserId": {
              "description": "Recipient precondition, required with privateFields=preserve. Must match the current authenticated owner scope; never selects or grants authority. Retain across retries.",
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            },
            "collections": {
              "maxItems": 32,
              "type": "array",
              "items": {
                "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
              }
            },
            "commands": {
              "minItems": 1,
              "maxItems": 100,
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "insertAssign"
                      },
                      "collectionId": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      "slotId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "before": {
                        "anyOf": [
                          {
                            "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
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "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"
                          }
                        ]
                      },
                      "selection": {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "existing"
                                  },
                                  "inventoryItemId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "itemVersion": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "kind",
                                  "inventoryItemId",
                                  "itemVersion"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "new"
                                  },
                                  "itemId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 200
                                  },
                                  "identity": {
                                    "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
                                      }
                                    ]
                                  },
                                  "grading": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "provider": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "known"
                                                  },
                                                  "id": {
                                                    "type": "string",
                                                    "enum": [
                                                      "psa",
                                                      "ace",
                                                      "cgc",
                                                      "beckett"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "id"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "kind": {
                                                    "type": "string",
                                                    "const": "custom"
                                                  },
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 500
                                                  }
                                                },
                                                "required": [
                                                  "kind",
                                                  "name"
                                                ],
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          "grade": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "scale": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "designation": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "subgrades": {
                                            "maxItems": 20,
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "properties": {
                                                "name": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                },
                                                "grade": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 500
                                                }
                                              },
                                              "required": [
                                                "name",
                                                "grade"
                                              ],
                                              "additionalProperties": false
                                            }
                                          },
                                          "certificate": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "holder": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "minLength": 1,
                                                "maxLength": 500
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "label": {
                                            "type": "object",
                                            "properties": {
                                              "variant": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "assetIds": {
                                                "maxItems": 20,
                                                "type": "array",
                                                "items": {
                                                  "type": "string",
                                                  "minLength": 1,
                                                  "maxLength": 200
                                                }
                                              }
                                            },
                                            "required": [
                                              "variant",
                                              "assetIds"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "required": [
                                          "provider",
                                          "grade",
                                          "scale",
                                          "designation",
                                          "subgrades",
                                          "certificate",
                                          "holder",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "acquiredAt": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "itemId",
                                  "identity",
                                  "grading",
                                  "acquiredAt"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "collectionId",
                      "slotId",
                      "before",
                      "target",
                      "selection"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "add"
                      },
                      "itemId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "identity": {
                        "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
                          }
                        ]
                      },
                      "grading": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "known"
                                      },
                                      "id": {
                                        "type": "string",
                                        "enum": [
                                          "psa",
                                          "ace",
                                          "cgc",
                                          "beckett"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "custom"
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "grade": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scale": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "designation": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "subgrades": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    "grade": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "grade"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "certificate": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "holder": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "label": {
                                "type": "object",
                                "properties": {
                                  "variant": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "assetIds": {
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  }
                                },
                                "required": [
                                  "variant",
                                  "assetIds"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "provider",
                              "grade",
                              "scale",
                              "designation",
                              "subgrades",
                              "certificate",
                              "holder",
                              "label"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "acquiredAt": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "itemId",
                      "identity",
                      "grading",
                      "acquiredAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "edit"
                      },
                      "item": {
                        "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
                      },
                      "grading": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "provider": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "known"
                                      },
                                      "id": {
                                        "type": "string",
                                        "enum": [
                                          "psa",
                                          "ace",
                                          "cgc",
                                          "beckett"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "id"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "kind": {
                                        "type": "string",
                                        "const": "custom"
                                      },
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      }
                                    },
                                    "required": [
                                      "kind",
                                      "name"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              "grade": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "scale": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "designation": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "subgrades": {
                                "maxItems": 20,
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    },
                                    "grade": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 500
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "grade"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "certificate": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "holder": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "label": {
                                "type": "object",
                                "properties": {
                                  "variant": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 500
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "assetIds": {
                                    "maxItems": 20,
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 200
                                    }
                                  }
                                },
                                "required": [
                                  "variant",
                                  "assetIds"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "provider",
                              "grade",
                              "scale",
                              "designation",
                              "subgrades",
                              "certificate",
                              "holder",
                              "label"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "item",
                      "grading"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "setFinish"
                      },
                      "item": {
                        "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
                      },
                      "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",
                      "item",
                      "finish"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "patchGrading"
                      },
                      "item": {
                        "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
                      },
                      "patch": {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "known"
                                  },
                                  "id": {
                                    "type": "string",
                                    "enum": [
                                      "psa",
                                      "ace",
                                      "cgc",
                                      "beckett"
                                    ]
                                  }
                                },
                                "required": [
                                  "kind",
                                  "id"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "const": "custom"
                                  },
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 500
                                  }
                                },
                                "required": [
                                  "kind",
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "grade": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scale": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "designation": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "subgrades": {
                            "maxItems": 20,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                },
                                "grade": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500
                                }
                              },
                              "required": [
                                "name",
                                "grade"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "holder": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "labelVariant": {
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "kind",
                      "item",
                      "patch"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "removeOwned",
                          "unassign"
                        ]
                      },
                      "item": {
                        "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
                      }
                    },
                    "required": [
                      "kind",
                      "item"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "assign"
                      },
                      "selection": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "existing"
                              },
                              "inventoryItemId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              "itemVersion": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "kind",
                              "inventoryItemId",
                              "itemVersion"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "const": "catalog"
                              },
                              "identity": {
                                "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
                                  }
                                ]
                              },
                              "newItemId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "required": [
                              "kind",
                              "identity",
                              "newItemId"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "destination": {
                        "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
                      },
                      "occupied": {
                        "type": "string",
                        "enum": [
                          "cancel",
                          "unassign"
                        ]
                      },
                      "fulfillWant": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 99
                                  },
                                  "expected": {
                                    "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
                                  }
                                },
                                "required": [
                                  "index",
                                  "expected"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 99
                                  },
                                  "expectedPublic": {
                                    "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_set": {
                                        "type": "string"
                                      },
                                      "rarity": {
                                        "type": "string"
                                      },
                                      "local_id": {
                                        "type": "string"
                                      },
                                      "illustrator": {
                                        "type": "string"
                                      },
                                      "set_total": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "card_id",
                                      "card_name",
                                      "added_at"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "index",
                                  "expectedPublic"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "selection",
                      "destination",
                      "occupied",
                      "fulfillWant"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "move"
                      },
                      "item": {
                        "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
                      },
                      "destination": {
                        "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
                      },
                      "occupied": {
                        "type": "string",
                        "enum": [
                          "cancel",
                          "unassign",
                          "swap"
                        ]
                      },
                      "fulfillWant": {
                        "anyOf": [
                          {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 99
                                  },
                                  "expected": {
                                    "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
                                  }
                                },
                                "required": [
                                  "index",
                                  "expected"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "index": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 99
                                  },
                                  "expectedPublic": {
                                    "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_set": {
                                        "type": "string"
                                      },
                                      "rarity": {
                                        "type": "string"
                                      },
                                      "local_id": {
                                        "type": "string"
                                      },
                                      "illustrator": {
                                        "type": "string"
                                      },
                                      "set_total": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "card_id",
                                      "card_name",
                                      "added_at"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "index",
                                  "expectedPublic"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "kind",
                      "item",
                      "destination",
                      "occupied",
                      "fulfillWant"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "removeSlots"
                      },
                      "slots": {
                        "minItems": 1,
                        "maxItems": 256,
                        "type": "array",
                        "items": {
                          "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
                        }
                      }
                    },
                    "required": [
                      "kind",
                      "slots"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "deleteCollection"
                      },
                      "collectionId": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      "slots": {
                        "maxItems": 4096,
                        "type": "array",
                        "items": {
                          "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
                        }
                      },
                      "replacementDefaultCollectionId": {
                        "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"
                          }
                        ]
                      },
                      "removeOwned": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "required": [
                      "kind",
                      "collectionId",
                      "slots",
                      "replacementDefaultCollectionId"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          },
          "required": [
            "operationId",
            "inventoryRevision",
            "collections",
            "commands"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "inventoryRevision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "changed": {
                "type": "boolean"
              },
              "selectedItemIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "acquiredItemIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              }
            },
            "required": [
              "inventoryRevision",
              "changed",
              "selectedItemIds",
              "acquiredItemIds"
            ],
            "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_command_rejected"
                      },
                      "message": {
                        "type": "string",
                        "const": "The original storage command was rejected. Refresh current storage before explicit reconciliation."
                      },
                      "requestId": {
                        "type": "string"
                      },
                      "rejection": {
                        "type": "object",
                        "properties": {
                          "outcome": {
                            "type": "string",
                            "const": "rejected"
                          },
                          "operationId": {
                            "type": "string",
                            "minLength": 8,
                            "maxLength": 100
                          },
                          "code": {
                            "type": "string",
                            "enum": [
                              "slot_revision_conflict",
                              "inventory_revision_conflict",
                              "inventory_collection_conflict",
                              "slot_conflict",
                              "item_conflict",
                              "placement_conflict",
                              "inventory_want_conflict",
                              "inventory_copy_choice_required",
                              "inventory_destination_empty",
                              "inventory_destination_occupied"
                            ]
                          },
                          "inventoryRevision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "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
          }
        }
      }
    }
  }
}
```
