{
  "openapi": "3.1.0",
  "info": {
    "title": "Moku Seller Platform API",
    "version": "1.0.0-beta.2",
    "summary": "Public seller integrations for catalog, inventory, orders, and synchronization",
    "description": "Seller Platform API v1 is the production contract for seller-owned automation and marketplace connectors. It includes explicit Connection roles and per-domain Authority, idempotent writes, optimistic concurrency, reservations, imported orders, sticky fulfillment ownership, events, webhooks, reconciliation jobs, and conflict tracking. Personal access tokens are vendor-bound; WooCommerce pairing accepts a narrow discovery credential; seller-authorized operational scope and reviewed activation are separate gates."
  },
  "servers": [
    {
      "url": "https://moku.cl/api/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Vendors",
      "description": "Vendor identity and effective source-of-truth ownership."
    },
    {
      "name": "Products",
      "description": "Catalog content and publication lifecycle."
    },
    {
      "name": "Inventory",
      "description": "Physical stock and available-to-sell quantities."
    },
    {
      "name": "Connections",
      "description": "External sales channels, independent domain roles, health, and activity."
    },
    {
      "name": "Listings",
      "description": "Stable mappings between Moku inventory and channel listings."
    },
    {
      "name": "Reservations",
      "description": "Short-lived Moku-owned inventory holds."
    },
    {
      "name": "External orders",
      "description": "Immutable channel order observations imported into Moku."
    },
    {
      "name": "Seller orders",
      "description": "Paid fulfillment projections, including delivery PII."
    },
    {
      "name": "Events",
      "description": "Durable vendor event log and controlled replay."
    },
    {
      "name": "Webhooks",
      "description": "HTTPS event delivery subscriptions and signing secrets."
    },
    {
      "name": "Sync jobs",
      "description": "Asynchronous reconciliation validation and apply jobs."
    },
    {
      "name": "Bulk operations",
      "description": "Bounded asynchronous inventory adjustments with durable per-record outcomes."
    },
    {
      "name": "Conflicts",
      "description": "Integration conflict records and operator resolution notes."
    },
    {
      "name": "Stock effects",
      "description": "Reviewed cross-channel source stock commands and correlated observations."
    },
    {
      "name": "WooCommerce sync",
      "description": "Narrow paired discovery; operational writes require a separate seller acceptance and reviewed activation."
    }
  ],
  "paths": {
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApiDocument",
        "summary": "Download the OpenAPI document",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/vendors": {
      "get": {
        "operationId": "listVendors",
        "summary": "List granted vendors",
        "x-required-scope": "vendors.read",
        "description": "Personal access tokens are currently bound to one vendor, so this list contains one item. The list shape remains stable for future multi-vendor OAuth grants.",
        "tags": [
          "Vendors"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Granted vendors",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Vendor"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}": {
      "get": {
        "operationId": "getVendor",
        "summary": "Get a granted vendor",
        "x-required-scope": "vendors.read",
        "tags": [
          "Vendors"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          }
        ],
        "responses": {
          "200": {
            "description": "Vendor summary",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Vendor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/authority": {
      "get": {
        "operationId": "getVendorAuthority",
        "summary": "Get effective source-of-truth ownership",
        "description": "Returns the current catalog and base-price masters plus Inventory Authority for each Stock Pool. Order origin and fulfillment ownership are immutable Order state, not vendor-wide authority.",
        "tags": [
          "Vendors"
        ],
        "x-required-scope": "connections.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VendorAuthority"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/products": {
      "get": {
        "operationId": "listProducts",
        "summary": "List catalog products",
        "x-required-scope": "products.read",
        "description": "Returns every seller-owned lifecycle state in stable cursor order. Pages are not snapshot-isolated from concurrent catalog changes.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductPageSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createProduct",
        "summary": "Create a catalog draft",
        "x-required-scope": "products.write",
        "description": "Creates one draft with opaque stable variation identities and zeroed inventory buckets. Replaying an identical Idempotency-Key returns the same product while its receipt is retained for 30 days.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ProductConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/products/{product_id}": {
      "get": {
        "operationId": "getProduct",
        "summary": "Get a catalog product",
        "x-required-scope": "products.read",
        "description": "Returns the current revision and lifecycle state used by optimistic writes.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ProductId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "operationId": "updateProduct",
        "summary": "Replace editable catalog fields",
        "x-required-scope": "products.write",
        "description": "Replaces editable fields using expected_revision. Product kind and existing variation IDs are immutable. New variations receive server-generated IDs and zeroed inventory; retiring a variation requires zero on-hand stock and no active holds.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ProductId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ProductConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/products/{product_id}/publish": {
      "post": {
        "operationId": "publishProduct",
        "summary": "Publish a product",
        "x-required-scope": "products.write",
        "description": "Transitions a complete draft to published. Replaying against a published product at its current revision is a no-op.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ProductId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ProductTransition"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ProductConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/products/{product_id}/unpublish": {
      "post": {
        "operationId": "unpublishProduct",
        "summary": "Unpublish a product",
        "x-required-scope": "products.write",
        "description": "Transitions published to draft without archiving or changing inventory. Replaying against a draft at its current revision is a no-op.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ProductId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ProductTransition"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ProductConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/products/{product_id}/archive": {
      "post": {
        "operationId": "archiveProduct",
        "summary": "Archive a product",
        "x-required-scope": "products.write",
        "description": "Transitions a draft or published product to archived without changing inventory. Replaying against an archived product at its current revision is a no-op.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ProductId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ProductTransition"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ProductConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/products/{product_id}/restore": {
      "post": {
        "operationId": "restoreProduct",
        "summary": "Restore an archived product",
        "x-required-scope": "products.write",
        "description": "Transitions archived to draft without changing inventory. Replaying against a draft at its current revision is a no-op.",
        "tags": [
          "Products"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ProductId"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ProductTransition"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductSuccess"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/ProductConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/media/{sha256}": {
      "put": {
        "operationId": "putSellerMedia",
        "summary": "Upload an immutable seller product image",
        "description": "Send raw JPEG, PNG or WebP bytes, never JSON, multipart, a URL or base64. The lowercase path digest must match SHA-256 of those original bytes. Input and canonical WebP output are each limited to 2 MiB, with one frame and at most 16 megapixels. Pixels are decoded and re-encoded without metadata. Authentication and vendor authorization precede reading or decoding. Repeated content is idempotent across tokens; no Idempotency-Key is needed. The vendor has a persistent 256 MiB and 1000-object admission budget including pending uploads; 409 MEDIA_QUOTA_EXCEEDED requires operator review, not blind retry. Images have no automatic expiry or public deletion. A failed upload retains its conservative admission; retry identical bytes at this same path. 400 INVALID_MEDIA includes digest/format/decode failure; 413 MEDIA_TOO_LARGE includes oversized output. Missing storage configuration fails closed with 503.",
        "tags": [
          "Products"
        ],
        "x-required-scope": "products.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/MediaSha256"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SellerMedia"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "description": "MEDIA_TOO_LARGE: uploaded or sanitized image exceeds 2 MiB.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "Raw image bytes, at most 2097152 bytes (2 MiB).",
                "x-max-bytes": 2097152
              }
            },
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "Raw image bytes, at most 2097152 bytes (2 MiB).",
                "x-max-bytes": 2097152
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary",
                "description": "Raw image bytes, at most 2097152 bytes (2 MiB).",
                "x-max-bytes": 2097152
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-items": {
      "get": {
        "operationId": "listInventoryItems",
        "summary": "List inventory items",
        "x-required-scope": "inventory.read",
        "description": "Returns stable, cursor-paginated stock identities at the Vendor's explicit default Inventory Location. location_id is currently default for every item and is scoped by vendor_id. Existing item IDs remain unchanged. Pages use stable ordering but are not snapshot-isolated from catalog changes; missing authoritative buckets fail closed.",
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Inventory page",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InventoryItem"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-items/{inventory_item_id}": {
      "get": {
        "operationId": "getInventoryItem",
        "summary": "Get an inventory item",
        "x-required-scope": "inventory.read",
        "description": "Use this operation to refresh the current version after a write conflict.",
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/InventoryItemId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current inventory item",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryItem"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-items/{inventory_item_id}/adjustments": {
      "post": {
        "operationId": "adjustInventoryItem",
        "summary": "Set physical on-hand stock",
        "x-required-scope": "inventory.write",
        "description": "Changes on_hand without allowing clients to overwrite Moku reservations. expected_version provides optimistic concurrency. Replaying the same Idempotency-Key and input returns the original result while its receipt is retained for 30 days.",
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/InventoryItemId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryAdjustmentRequest"
              },
              "example": {
                "target_on_hand": 8,
                "expected_version": 2
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated or replayed inventory item",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryItem"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/InventoryConflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-reservations": {
      "get": {
        "operationId": "listInventoryReservations",
        "summary": "List public inventory reservations",
        "tags": [
          "Reservations"
        ],
        "x-required-scope": "reservations.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InventoryReservation"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createInventoryReservation",
        "summary": "Reserve Moku-owned inventory",
        "description": "Only active connections with Moku inventory authority may reserve. External-order-owned reservations are controlled through the external order state machine.",
        "tags": [
          "Reservations"
        ],
        "x-required-scope": "reservations.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReservationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryReservation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-reservations/{reservation_id}": {
      "get": {
        "operationId": "getInventoryReservation",
        "summary": "Get an inventory reservation",
        "tags": [
          "Reservations"
        ],
        "x-required-scope": "reservations.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ReservationId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryReservation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-reservations/{reservation_id}/renew": {
      "post": {
        "operationId": "renewInventoryReservation",
        "summary": "Renew an inventory reservation",
        "tags": [
          "Reservations"
        ],
        "x-required-scope": "reservations.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ReservationId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReservationRenewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryReservation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-reservations/{reservation_id}/commit": {
      "post": {
        "operationId": "commitInventoryReservation",
        "summary": "Commit an inventory reservation",
        "tags": [
          "Reservations"
        ],
        "x-required-scope": "reservations.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ReservationId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryReservation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/inventory-reservations/{reservation_id}/release": {
      "post": {
        "operationId": "releaseInventoryReservation",
        "summary": "Release an inventory reservation",
        "tags": [
          "Reservations"
        ],
        "x-required-scope": "reservations.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ReservationId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryReservation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections": {
      "get": {
        "operationId": "listConnections",
        "summary": "List channel connections",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChannelConnection"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createConnection",
        "summary": "Create a channel connection",
        "description": "Source roles claim Authority and are rejected on ownership collisions or unsettled Inventory activity. Destination roles never claim Authority. Providers that have not passed Connector Acceptance cannot create active Connections.",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelConnection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}": {
      "get": {
        "operationId": "getConnection",
        "summary": "Get a channel connection",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelConnection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "operationId": "updateConnection",
        "summary": "Rename, pause, or resume a connection",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelConnection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/roles": {
      "put": {
        "operationId": "replaceConnectionRoles",
        "summary": "Replace a connection's domain roles",
        "description": "Source roles claim domain Authority; destination roles never do. The transition requires zero active listings, reservations, unresolved orders, channel fulfillment, and any affected Moku Inventory activity.",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionRolesReplaceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelConnection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/disconnect": {
      "post": {
        "operationId": "disconnectConnection",
        "summary": "Disconnect a settled connection",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelConnection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/reconnect": {
      "post": {
        "operationId": "reconnectConnection",
        "summary": "Reconnect and reclaim available source roles",
        "tags": [
          "Connections"
        ],
        "x-required-scope": "connections.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelConnection"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/channel-listings": {
      "get": {
        "operationId": "listChannelListings",
        "summary": "List channel listing mappings",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ChannelListing"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createChannelListing",
        "summary": "Create a channel listing mapping",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelListingCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelListing"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/channel-listings/{listing_id}": {
      "get": {
        "operationId": "getChannelListing",
        "summary": "Get a channel listing mapping",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelListing"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "operationId": "updateChannelListing",
        "summary": "Update channel listing state or source revision",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelListingUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelListing"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/pricing": {
      "get": {
        "operationId": "previewChannelPricing",
        "summary": "Preview one page of desired channel pricing",
        "description": "Reads at most 100 existing mappings. Keep the same pricing_revision for every page. Fingerprints bind source, mapping, configuration and observed provider state. A complete paginated manifest and separate operator approval are required before live synchronization; this endpoint grants neither. Native prices and active provider promotions are never overwritten by this preview.",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "page_after",
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          },
          {
            "in": "query",
            "name": "pricing_revision",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelPricingPreview"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/channel-listings/{listing_id}/pricing": {
      "get": {
        "operationId": "getChannelListingPricing",
        "summary": "Read observed and intended listing prices",
        "description": "Returns the selected canonical reference, separate provider observation, optional listing override and current blockers. It does not authorize a remote write. Current owner, mapping and reference authority are rechecked.",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ListingId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelListingPricing"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/channel-listings/{listing_id}/pricing/observations": {
      "post": {
        "operationId": "observeChannelListingPrice",
        "summary": "Record an observed provider price",
        "description": "An idempotent observation advances only with current listing and observation versions and a later observed_at. It never edits the Product reference, promotion or desired policy. Active promotions retain separate regular and effective prices. Unexpected versions require rereading and review, not a blind retry.",
        "tags": [
          "Listings"
        ],
        "x-required-scope": "listings.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ListingId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ChannelPriceObservation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChannelPriceObservationInput"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/pairing": {
      "get": {
        "operationId": "getWooPairing",
        "summary": "Read the paired WooCommerce account and credential capability",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooPairingState"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "operationId": "pairWooCommerce",
        "summary": "Pair this narrow credential to the exact existing WooCommerce installation",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooPairing"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooPairingRequest"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/discoveries": {
      "post": {
        "operationId": "startWooDiscovery",
        "summary": "Start resumable private WooCommerce discovery without channel Authority",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PrivateSyncDiscoveryRun"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooDiscoveryStartRequest"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/discoveries/{run_id}/pages": {
      "post": {
        "operationId": "ingestWooDiscoveryPage",
        "summary": "Observe a bounded page of existing physical items and listing aliases",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^ds_[a-f0-9]{32}$"
            }
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PrivateSyncDiscoveryRun"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooDiscoveryPageRequest"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/discoveries/{run_id}/page-receipts": {
      "get": {
        "operationId": "getWooDiscoveryPageReceipt",
        "summary": "Prove a prior exact page without replaying its old credential generation",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "expected_account_generation",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740990
            }
          },
          {
            "name": "expected_credential_generation",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740990
            }
          },
          {
            "name": "expected_configuration_revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740990
            }
          },
          {
            "name": "page_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^ds_[a-f0-9]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooDiscoveryPageReceipt"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/discoveries/current": {
      "get": {
        "operationId": "getCurrentWooDiscovery",
        "summary": "Read the current owner-requested private discovery run",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/PrivateSyncDiscoveryRun"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/memberships": {
      "get": {
        "operationId": "listWooSyncMemberships",
        "summary": "Read a bounded page of this paired account’s reviewed existing memberships",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "page_after",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "maxItems": 25,
                      "items": {
                        "$ref": "#/components/schemas/WooSyncMembership"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/source-observations": {
      "post": {
        "operationId": "observeWooSourceBatch",
        "summary": "Observe up to25 current native source balances without applying or settling stock effects",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 25,
                      "items": {
                        "$ref": "#/components/schemas/WooSourceObservationResult"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooSourceObservationBatch"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/projections": {
      "get": {
        "operationId": "getPendingWooProjection",
        "summary": "Recover the exact pending physical destination operation",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "in": "query",
            "name": "connection_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "in": "query",
            "name": "channel_listing_id",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "in": "query",
            "name": "field",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "stock",
                "regular_price"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/WooProjectionOperation"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "prepareWooProjection",
        "summary": "Freeze the current reviewed destination target before native I/O",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "operation",
                        "unchanged",
                        "review_required"
                      ],
                      "properties": {
                        "operation": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/WooProjectionOperation"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "unchanged": {
                          "type": "boolean"
                        },
                        "review_required": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "PROMOTION_ACTIVE",
                                "NATIVE_PRICE_CHANGED",
                                "SYNC_PRICE_REVIEW_REQUIRED",
                                "KEEP_NATIVE_PRICES"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "connection_id",
                  "channel_listing_id",
                  "expected_configuration_revision",
                  "observation"
                ],
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "channel_listing_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "expected_configuration_revision": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "observation": {
                    "$ref": "#/components/schemas/WooProjectionObservation"
                  },
                  "delivery_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$",
                    "description": "Owned delivery identity; the server resolves its original event privately. Capture metadata is never accepted from a caller."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/projections/{projection_id}": {
      "get": {
        "operationId": "getWooProjection",
        "summary": "Read exact native projection recovery state",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "in": "path",
            "name": "projection_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooProjectionOperation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/projections/{projection_id}/authorize": {
      "post": {
        "operationId": "authorizeWooProjection",
        "summary": "Recheck current permission immediately before first native execution",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          },
          {
            "in": "path",
            "name": "projection_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooProjectionCommand"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/projections/{projection_id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeWooProjection",
        "summary": "Acknowledge an exact native receipt or retain uncertainty",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          },
          {
            "in": "path",
            "name": "projection_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooProjectionOperation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version",
                  "outcome",
                  "proof"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "confirmed",
                      "rejected",
                      "unknown"
                    ]
                  },
                  "proof": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/WooProjectionProof"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/capabilities": {
      "post": {
        "operationId": "checkWooCapabilities",
        "summary": "Inspect native account compatibility without activating writes",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "discovery.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooCapabilityCheck"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooCapabilityCheckInput"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/runtime": {
      "get": {
        "operationId": "getWooSyncRuntime",
        "summary": "Read the exact paired reviewed runtime and pause epoch",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooSyncRuntime"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/order-journal": {
      "post": {
        "operationId": "ingestWooOrderJournal",
        "summary": "Observe an immutable native order through its exact paired membership",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          },
          {
            "name": "X-Moku-Native-Pause-Nonce",
            "in": "header",
            "required": false,
            "description": "Exact current closed native journal epoch, verified against the server-retained entry manifest. It never permits new post-fence orders.",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooOrderJournalReceipt"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooOrderJournalInput"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/order-journal/{entry_id}": {
      "get": {
        "operationId": "getWooOrderJournalReceipt",
        "summary": "Read the actual canonical receipt for an original native observation",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooOrderJournalReceipt"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/journal-health": {
      "post": {
        "operationId": "reportWooJournalHealth",
        "summary": "Report actual native order queue and bounded recovery inspection",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooJournalHealthResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooJournalHealthInput"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/journal-fences": {
      "post": {
        "operationId": "recordWooJournalFencePage",
        "summary": "Record a bounded page of the exact closed native journal",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooJournalFenceProgress"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooJournalFencePage"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/journal-fences/{pause_nonce}/verify": {
      "post": {
        "operationId": "verifyWooJournalFence",
        "summary": "Verify at most 25 native entries against their actual canonical receipts",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          },
          {
            "in": "path",
            "name": "pause_nonce",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooJournalFenceProgress"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooJournalFenceVerify"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/journal-fences/{pause_nonce}": {
      "get": {
        "operationId": "getWooJournalFence",
        "summary": "Read current closed native journal progress",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "in": "path",
            "name": "pause_nonce",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{32}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooJournalFenceProgress"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/projections/{projection_id}/observations": {
      "post": {
        "operationId": "observeWooProjection",
        "summary": "Record a fresh canonical stock read separately from write acknowledgement",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          },
          {
            "in": "path",
            "name": "projection_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "observed"
                      ],
                      "properties": {
                        "observed": {
                          "const": true,
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "observation"
                ],
                "properties": {
                  "observation": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "field",
                      "quantity",
                      "provider_version",
                      "observed_at"
                    ],
                    "properties": {
                      "field": {
                        "type": "string",
                        "const": "stock"
                      },
                      "quantity": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "provider_version": {
                        "oneOf": [
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 160
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "observed_at": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Uses the retained exact command scope through pause or credential repair. Equality never acknowledges, retries or settles uncertain application. No operational qualification is granted."
      }
    },
    "/vendors/{vendor_id}/woocommerce/projection-wakeups": {
      "get": {
        "operationId": "listWooProjectionWakeups",
        "summary": "Read targeted native projection delivery intents",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "page_after",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "maxItems": 25,
                      "items": {
                        "$ref": "#/components/schemas/WooProjectionWakeup"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "description": "Bounded current-account delivery queue produced by committed Inventory and reference events. Source event time is not claimed to be native change time; delivery does not prove destination convergence."
      }
    },
    "/vendors/{vendor_id}/woocommerce/projection-wakeups/{wakeup_id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeWooProjectionWakeup",
        "summary": "Acknowledge durable native delivery without claiming API convergence",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          },
          {
            "in": "path",
            "name": "wakeup_id",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "delivered"
                      ],
                      "properties": {
                        "delivered": {
                          "const": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expected_version"
                ],
                "properties": {
                  "expected_version": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/native-products/{native_product_id}/memberships": {
      "get": {
        "operationId": "listWooNativeProductMemberships",
        "summary": "List reviewed memberships for one native WooCommerce parent",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "page_after",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25
            }
          },
          {
            "name": "native_product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,17}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "maxItems": 25,
                      "items": {
                        "$ref": "#/components/schemas/WooSyncMembership"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/connections/{connection_id}/listings/{listing_id}/membership": {
      "get": {
        "operationId": "getWooSyncMembership",
        "summary": "Read current reviewed WooCommerce source membership and revisions",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooSyncMembership"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/connections/{connection_id}/listings/{listing_id}/catalog-observations": {
      "post": {
        "operationId": "observeWooCatalogSource",
        "summary": "Observe native source descriptions without changing Moku Offer terms or media",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooCatalogSourceResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooCatalogSourceObservation"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/woocommerce/connections/{connection_id}/listings/{listing_id}/reference-observations": {
      "post": {
        "operationId": "observeWooReferenceSource",
        "summary": "Observe the native regular reference price independently of Moku Offer and sale prices",
        "tags": [
          "WooCommerce sync"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "name": "listing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WooReferenceSourceResult"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WooReferenceSourceObservation"
              }
            }
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/external-orders": {
      "get": {
        "operationId": "listExternalOrders",
        "summary": "List imported external order observations",
        "description": "External orders are source-channel observations; seller orders are separate paid fulfillment projections.",
        "tags": [
          "External orders"
        ],
        "x-required-scope": "orders.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ExternalOrder"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/external-orders/{external_order_id}": {
      "get": {
        "operationId": "getExternalOrder",
        "summary": "Get an imported external order",
        "tags": [
          "External orders"
        ],
        "x-required-scope": "orders.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          },
          {
            "$ref": "#/components/parameters/ExternalOrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExternalOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "operationId": "upsertExternalOrder",
        "summary": "Import or advance an external order observation",
        "description": "Returns 200 for both first import and later observations. Lines, totals, customer, and delivery data become immutable after first import. Paid terminal observations require explicit terminal resolution. Generic vendor PAT mutation is limited to unmanaged connections and their original admitted legacy order drain. Managed WooCommerce/Mercado Libre observations and source obligations require the current paired or hosted bridge grant.",
        "tags": [
          "External orders"
        ],
        "x-required-scope": "orders.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          },
          {
            "$ref": "#/components/parameters/ExternalOrderId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalOrderUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExternalOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/external-orders/{external_order_id}/terminal-resolution": {
      "post": {
        "operationId": "resolveExternalOrderTerminal",
        "summary": "Resolve a paid cancelled or failed order",
        "description": "Cancels the fulfillment projection, releases authority fences, and optionally restocks inventory consumed under Moku authority. Generic vendor PAT mutation is limited to unmanaged connections and their original admitted legacy order drain. Managed WooCommerce/Mercado Libre observations and source obligations require the current paired or hosted bridge grant.",
        "tags": [
          "External orders"
        ],
        "x-required-scope": "orders.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          },
          {
            "$ref": "#/components/parameters/ExternalOrderId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalOrderTerminalResolutionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExternalOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/connections/{connection_id}/external-orders/{external_order_id}/reservation-renewals": {
      "post": {
        "operationId": "renewExternalOrderReservation",
        "summary": "Renew a pending external-order inventory lease",
        "description": "Extends only an unexpired Moku-owned reservation on an active or paused connection. The expected version belongs to the external order. Returns both updated versions and the authoritative reservation deadline. No commercial or source-observation fields change and no stock or activity counters are consumed. Expired, released, paid, terminal, manually reviewed or channel-owned orders cannot renew. The deadline is at least its current value and otherwise now plus the requested seconds. Exact idempotent replays do not extend it again and are historical results: reread the current reservation before starting another payment attempt. Renewal cannot guarantee inventory through a later outage or delayed payment callback. Generic vendor PAT mutation is limited to unmanaged connections and their original admitted legacy order drain. Managed WooCommerce/Mercado Libre observations and source obligations require the current paired or hosted bridge grant.",
        "tags": [
          "External orders"
        ],
        "x-required-scope": "orders.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConnectionId"
          },
          {
            "$ref": "#/components/parameters/ExternalOrderId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalOrderReservationRenewalRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ExternalOrderReservationRenewal"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/orders": {
      "get": {
        "operationId": "listSellerOrders",
        "summary": "List paid seller fulfillment orders",
        "description": "Contains delivery work and customer PII. PAT issuance currently grants either all read scopes or all read/write scopes; protect every token with read access accordingly.",
        "tags": [
          "Seller orders"
        ],
        "x-required-scope": "orders.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/SellerOrderStatus"
          },
          {
            "$ref": "#/components/parameters/SellerOrderLimit"
          },
          {
            "$ref": "#/components/parameters/SellerOrderPageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SellerOrderSummary"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/orders/{order_id}": {
      "get": {
        "operationId": "getSellerOrder",
        "summary": "Get paid seller order details",
        "tags": [
          "Seller orders"
        ],
        "x-required-scope": "orders.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/OrderId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SellerOrder"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/orders/{order_id}/fulfillment-transitions": {
      "post": {
        "operationId": "transitionSellerOrderFulfillment",
        "summary": "Advance fulfillment monotonically",
        "description": "Channel-owned orders require their sticky authority_connection_id. This coordination guard does not isolate multiple PATs belonging to the same vendor.",
        "tags": [
          "Seller orders"
        ],
        "x-required-scope": "orders.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/OrderId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FulfillmentTransitionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SellerOrderSummary"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/events": {
      "get": {
        "operationId": "listPlatformEvents",
        "summary": "List durable platform events",
        "description": "Events carry resource metadata, target 90-day retention with eventual TTL cleanup, and may add future types that clients must ignore.",
        "tags": [
          "Events"
        ],
        "x-required-scope": "events.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlatformEvent"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/events/{event_id}": {
      "get": {
        "operationId": "getPlatformEvent",
        "summary": "Get a platform event",
        "tags": [
          "Events"
        ],
        "x-required-scope": "events.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/EventId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlatformEvent"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/events/{event_id}/replay": {
      "post": {
        "operationId": "replayPlatformEvent",
        "summary": "Queue a replay to active subscriptions",
        "description": "Returns 202 after durably queuing a replay, not after delivery. Poll the replay status resource. Each POST starts a new replay; no Idempotency-Key is accepted. Replay is at-least-once and may create duplicates; event and delivery ids remain stable.",
        "tags": [
          "Events"
        ],
        "x-required-scope": "webhooks.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/EventId"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookReplay"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/events/{event_id}/replays/{replay_id}": {
      "get": {
        "operationId": "getPlatformEventReplay",
        "summary": "Get asynchronous replay progress",
        "description": "total is null until fanout finishes. Disabled or removed subscriptions are skipped. A failed replay can have successful deliveries; counters describe its individual destinations.",
        "tags": [
          "Events"
        ],
        "x-required-scope": "webhooks.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/EventId"
          },
          {
            "$ref": "#/components/parameters/ReplayId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookReplay"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/webhook-subscriptions": {
      "get": {
        "operationId": "listWebhookSubscriptions",
        "summary": "List webhook subscriptions",
        "tags": [
          "Webhooks"
        ],
        "x-required-scope": "webhooks.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookSubscription"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createWebhookSubscription",
        "summary": "Create an HTTPS webhook subscription",
        "description": "The signing secret is returned once. URLs must use public HTTPS on port 443 and pass DNS-pinned SSRF checks. Deliveries are HMAC signed, time out after 5 seconds, and retry at least once semantics up to 10 attempts.",
        "tags": [
          "Webhooks"
        ],
        "x-required-scope": "webhooks.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatedWebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/webhook-subscriptions/{subscription_id}": {
      "get": {
        "operationId": "getWebhookSubscription",
        "summary": "Get a webhook subscription",
        "tags": [
          "Webhooks"
        ],
        "x-required-scope": "webhooks.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/SubscriptionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "operationId": "updateWebhookSubscription",
        "summary": "Update URL, event filters, or status",
        "tags": [
          "Webhooks"
        ],
        "x-required-scope": "webhooks.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/SubscriptionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookSubscription",
        "summary": "Delete a webhook subscription",
        "description": "Requires a JSON body containing expected_version and returns the deleted subscription.",
        "tags": [
          "Webhooks"
        ],
        "x-required-scope": "webhooks.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/SubscriptionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/webhook-subscriptions/{subscription_id}/rotate-secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "summary": "Rotate and reveal a new signing secret",
        "tags": [
          "Webhooks"
        ],
        "x-required-scope": "webhooks.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/SubscriptionId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatedWebhookSubscription"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/sync-jobs": {
      "get": {
        "operationId": "listSyncJobs",
        "summary": "List reconciliation jobs",
        "tags": [
          "Sync jobs"
        ],
        "x-required-scope": "jobs.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SyncJob"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createSyncJob",
        "summary": "Queue a reconciliation job",
        "tags": [
          "Sync jobs"
        ],
        "x-required-scope": "jobs.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncJobCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SyncJob"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/sync-jobs/{job_id}": {
      "get": {
        "operationId": "getSyncJob",
        "summary": "Get reconciliation job status and results",
        "tags": [
          "Sync jobs"
        ],
        "x-required-scope": "jobs.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SyncJob"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/bulk-operations": {
      "get": {
        "operationId": "listBulkOperations",
        "summary": "List bulk operations",
        "description": "List bounded inventory batches and their durable per-record outcomes. Failed background execution never remains presented as a healthy queued operation.",
        "tags": [
          "Bulk operations"
        ],
        "x-required-scope": "jobs.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BulkOperationPageResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createBulkOperation",
        "summary": "Queue a bulk inventory operation",
        "description": "Accept 1 to 25 structurally valid stock adjustments, in input order. Requires both jobs.write and inventory.write. Records use the same Authority, optimistic version and idempotency semantics as adjustInventoryItem. The batch is not atomic: business conflicts are individual outcomes and do not roll back successful records. The original grant, owner, capabilities and write-rate slot are rechecked for each record; bulk is not a quota bypass. Repeating this POST with the same Idempotency-Key returns its original acknowledgement, not current progress. Poll the returned ID. A completed notification is a hint; canonical GET remains the source of truth.",
        "tags": [
          "Bulk operations"
        ],
        "x-required-scope": "jobs.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkOperationCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkOperationResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/bulk-operations/{bulk_operation_id}": {
      "get": {
        "operationId": "getBulkOperation",
        "summary": "Get a bulk operation and its results",
        "description": "Results are retained for at least 30 days after completion. succeeded and failed are known individual outcomes; unknown means the worker lost a conclusive durable outcome, so reconcile current inventory before a new operation. not_attempted records were stopped before execution. Results are historical snapshots, not fresh inventory reads. Revoking or rotating a credential never silently transfers a queued batch to the replacement credential.",
        "tags": [
          "Bulk operations"
        ],
        "x-required-scope": "jobs.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/BulkOperationId"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BulkOperationResponse"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/integration-conflicts": {
      "get": {
        "operationId": "listIntegrationConflicts",
        "summary": "List integration conflicts",
        "tags": [
          "Conflicts"
        ],
        "x-required-scope": "conflicts.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IntegrationConflict"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createIntegrationConflict",
        "summary": "Record an integration conflict",
        "tags": [
          "Conflicts"
        ],
        "x-required-scope": "conflicts.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IntegrationIdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConflictCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IntegrationConflict"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/integration-conflicts/{conflict_id}": {
      "get": {
        "operationId": "getIntegrationConflict",
        "summary": "Get an integration conflict",
        "tags": [
          "Conflicts"
        ],
        "x-required-scope": "conflicts.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConflictId"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IntegrationConflict"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/integration-conflicts/{conflict_id}/resolve": {
      "post": {
        "operationId": "resolveIntegrationConflict",
        "summary": "Resolve an integration conflict with an operator note",
        "description": "This records resolution metadata; resource-specific state machines still require their own resolution operation.",
        "tags": [
          "Conflicts"
        ],
        "x-required-scope": "conflicts.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/ConflictId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConflictResolveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IntegrationConflict"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/stock-effects": {
      "get": {
        "operationId": "listStockEffects",
        "summary": "List durable effects for the exact paired source account",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/PageAfter"
          },
          {
            "name": "source_connection_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "name": "include_completed",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "page"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StockEffect"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "description": "List durable effects for the exact paired source account"
      }
    },
    "/vendors/{vendor_id}/stock-effects/{effect_id}": {
      "get": {
        "operationId": "getStockEffect",
        "summary": "Read one durable source effect",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.read",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "effect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockEffect"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        },
        "description": "Read one durable source effect"
      }
    },
    "/vendors/{vendor_id}/stock-effects/{effect_id}/claim": {
      "post": {
        "operationId": "claimStockEffect",
        "summary": "Lease the next source effect; unknown commands permit reconciliation only",
        "description": "Lease the next source effect; unknown commands permit reconciliation only",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "effect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockEffectClaimRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockEffectClaim"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/stock-effects/{effect_id}/prepare": {
      "post": {
        "operationId": "prepareStockEffect",
        "summary": "Persist the exact command as uncertain before native source I/O",
        "description": "Persist the exact command as uncertain before native source I/O",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "effect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockEffectObservationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockEffect"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/stock-effects/{effect_id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeStockEffect",
        "summary": "Record exact native receipt, definite rejection, or unknown outcome",
        "description": "Record exact native receipt, definite rejection, or unknown outcome",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "effect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockEffectAcknowledgeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockEffect"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/stock-effects/{effect_id}/observe": {
      "post": {
        "operationId": "observeStockEffect",
        "summary": "Complete a leased fresh source read after any known application",
        "description": "Complete a leased fresh source read after any known application",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "name": "effect_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockEffectObservationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockEffect"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/vendors/{vendor_id}/stock-observations": {
      "post": {
        "operationId": "createStockObservation",
        "summary": "Queue an idempotent source reread; no client absolute stock is accepted",
        "description": "Queue an idempotent source reread; no client absolute stock is accepted",
        "tags": [
          "Stock effects"
        ],
        "x-required-scope": "sync.write",
        "security": [
          {
            "sellerBearerToken": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VendorId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockObservationRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful response",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StockEffect"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/InsufficientScope"
          },
          "404": {
            "$ref": "#/components/responses/ResourceNotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sellerBearerToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "MokuPAT",
        "description": "Use a vendor-bound personal access token created in the seller panel. OAuth is not available in v1.",
        "x-scopes": {
          "conflicts.read": "List integration conflicts; Get an integration conflict",
          "conflicts.write": "Record an integration conflict; Resolve an integration conflict with an operator note",
          "connections.read": "Get effective source-of-truth ownership; List channel connections; Get a channel connection",
          "connections.write": "Create a channel connection; Rename, pause, or resume a connection; Replace a connection's domain roles; Disconnect a settled connection; Reconnect and reclaim available source roles",
          "discovery.read": "Read the paired WooCommerce account and credential capability; Prove a prior exact page without replaying its old credential generation; Read the current owner-requested private discovery run",
          "discovery.write": "Pair this narrow credential to the exact existing WooCommerce installation; Start resumable private WooCommerce discovery without channel Authority; Observe a bounded page of existing physical items and listing aliases; Inspect native account compatibility without activating writes",
          "events.read": "List durable platform events; Get a platform event",
          "inventory.read": "List inventory items; Get an inventory item",
          "inventory.write": "Set physical on-hand stock",
          "jobs.read": "List reconciliation jobs; Get reconciliation job status and results; List bulk operations; Get a bulk operation and its results",
          "jobs.write": "Queue a reconciliation job; Queue a bulk inventory operation",
          "listings.read": "List channel listing mappings; Get a channel listing mapping; Preview one page of desired channel pricing; Read observed and intended listing prices",
          "listings.write": "Create a channel listing mapping; Update channel listing state or source revision; Record an observed provider price",
          "orders.read": "List imported external order observations; Get an imported external order; List paid seller fulfillment orders; Get paid seller order details",
          "orders.write": "Import or advance an external order observation; Resolve a paid cancelled or failed order; Renew a pending external-order inventory lease; Advance fulfillment monotonically",
          "products.read": "List catalog products; Get a catalog product",
          "products.write": "Create a catalog draft; Replace editable catalog fields; Publish a product; Unpublish a product; Archive a product; Restore an archived product; Upload an immutable seller product image",
          "reservations.read": "List public inventory reservations; Get an inventory reservation",
          "reservations.write": "Reserve Moku-owned inventory; Renew an inventory reservation; Commit an inventory reservation; Release an inventory reservation",
          "sync.read": "Read a bounded page of this paired account’s reviewed existing memberships; Recover the exact pending physical destination operation; Read exact native projection recovery state; Read the exact paired reviewed runtime and pause epoch; Read the actual canonical receipt for an original native observation; Read current closed native journal progress; Read targeted native projection delivery intents; List reviewed memberships for one native WooCommerce parent; Read current reviewed WooCommerce source membership and revisions; List durable effects for the exact paired source account; Read one durable source effect",
          "sync.write": "Observe up to25 current native source balances without applying or settling stock effects; Freeze the current reviewed destination target before native I/O; Recheck current permission immediately before first native execution; Acknowledge an exact native receipt or retain uncertainty; Observe an immutable native order through its exact paired membership; Report actual native order queue and bounded recovery inspection; Record a bounded page of the exact closed native journal; Verify at most 25 native entries against their actual canonical receipts; Record a fresh canonical stock read separately from write acknowledgement; Acknowledge durable native delivery without claiming API convergence; Observe native source descriptions without changing Moku Offer terms or media; Observe the native regular reference price independently of Moku Offer and sale prices; Lease the next source effect; unknown commands permit reconciliation only; Persist the exact command as uncertain before native source I/O; Record exact native receipt, definite rejection, or unknown outcome; Complete a leased fresh source read after any known application; Queue an idempotent source reread; no client absolute stock is accepted",
          "vendors.read": "List granted vendors; Get a granted vendor",
          "webhooks.read": "Get asynchronous replay progress; List webhook subscriptions; Get a webhook subscription",
          "webhooks.write": "Queue a replay to active subscriptions; Create an HTTPS webhook subscription; Update URL, event filters, or status; Delete a webhook subscription; Rotate and reveal a new signing secret"
        }
      }
    },
    "parameters": {
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Number of resources to return.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "PageAfter": {
        "name": "page_after",
        "in": "query",
        "required": false,
        "description": "Opaque cursor from page.next_cursor. It can be bound to the token, resource, vendor, and filters that created it; never decode it or reuse it in another context.",
        "schema": {
          "type": "string",
          "maxLength": 1024
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "Unique to this token, operation, and logical mutation. Exact replays are supported for at least 30 days; never intentionally reuse a key for different work.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{8,128}$"
        }
      },
      "IntegrationIdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "Unique to this token, operation, and logical mutation. Exact replays are supported for at least 30 days; never intentionally reuse a key for different work.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._:-]{8,128}$"
        }
      },
      "VendorId": {
        "name": "vendor_id",
        "in": "path",
        "required": true,
        "description": "Vendor ID returned by GET /vendors.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "ProductId": {
        "name": "product_id",
        "in": "path",
        "required": true,
        "description": "Opaque product identity returned by the product collection.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "MediaSha256": {
        "name": "sha256",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "InventoryItemId": {
        "name": "inventory_item_id",
        "in": "path",
        "required": true,
        "description": "Opaque, stable inventory identity. Persist this value instead of interpreting it.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        }
      },
      "ReservationId": {
        "name": "reservation_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "ConnectionId": {
        "name": "connection_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "ListingId": {
        "name": "listing_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "ExternalOrderId": {
        "name": "external_order_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "OrderId": {
        "name": "order_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        }
      },
      "SellerOrderLimit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50,
          "default": 20
        }
      },
      "SellerOrderStatus": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "pending",
            "processing",
            "shipped",
            "delivered",
            "cancelled"
          ]
        }
      },
      "SellerOrderPageAfter": {
        "name": "page_after",
        "in": "query",
        "required": false,
        "description": "Opaque descending-order cursor from page.next_cursor. It is bound to the status filter and is not a snapshot.",
        "schema": {
          "type": "string",
          "maxLength": 1024
        }
      },
      "EventId": {
        "name": "event_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "ReplayId": {
        "name": "replay_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[a-f0-9]{48}$"
        }
      },
      "SubscriptionId": {
        "name": "subscription_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "JobId": {
        "name": "job_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "BulkOperationId": {
        "name": "bulk_operation_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      },
      "ConflictId": {
        "name": "conflict_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160,
          "pattern": "^[A-Za-z0-9._:-]+$"
        }
      }
    },
    "requestBodies": {
      "ProductTransition": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ProductTransitionRequest"
            }
          }
        }
      }
    },
    "headers": {
      "RequestId": {
        "description": "Server-generated request identifier to include in support requests.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitLimit": {
        "description": "Request allocation assigned to this credential for the current one-minute window. A replacement credential may inherit the same vendor slot.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "RateLimitRemaining": {
        "description": "Requests remaining in the credential's assigned vendor slot for the current window.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "RateLimitReset": {
        "description": "Unix timestamp in seconds when the current window resets.",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "schemas": {
      "Page": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "next_cursor"
        ],
        "properties": {
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Problem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "ExpectedVersionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "Vendor": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "slug"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 128
          },
          "name": {
            "type": "string",
            "maxLength": 500
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "AuthorityOwner": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "connection_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "moku",
              "connection"
            ]
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "VendorAuthority": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "vendor_id",
          "catalog_master",
          "base_price_master",
          "inventory_pools"
        ],
        "properties": {
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "catalog_master": {
            "$ref": "#/components/schemas/AuthorityOwner"
          },
          "base_price_master": {
            "$ref": "#/components/schemas/AuthorityOwner"
          },
          "inventory_pools": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "$ref": "#/components/schemas/InventoryPoolAuthority"
            }
          }
        }
      },
      "InventoryPoolAuthority": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "stock_pool_id",
          "master"
        ],
        "properties": {
          "stock_pool_id": {
            "type": "string",
            "enum": [
              "default"
            ]
          },
          "master": {
            "$ref": "#/components/schemas/AuthorityOwner"
          }
        }
      },
      "ProductEditableFields": {
        "type": "object",
        "required": [
          "kind",
          "name",
          "slug",
          "description",
          "price",
          "category",
          "subcategory",
          "image_urls",
          "options",
          "features",
          "related_product_ids",
          "weight_kg"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "simple",
              "variable"
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "slug": {
            "type": "string",
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 5000
          },
          "price": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000000,
            "description": "When present, must be greater than price."
          },
          "category": {
            "type": "string",
            "maxLength": 120
          },
          "subcategory": {
            "type": "string",
            "maxLength": 120
          },
          "image_urls": {
            "type": "array",
            "maxItems": 12,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            }
          },
          "badge": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sale",
              "new",
              null
            ]
          },
          "options": {
            "type": "object",
            "maxProperties": 8,
            "propertyNames": {
              "maxLength": 64,
              "pattern": "^[^\\r\\n]+$",
              "description": "Option names must be single-line so they round-trip through the seller editor."
            },
            "additionalProperties": {
              "type": "array",
              "maxItems": 50,
              "uniqueItems": true,
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^,\\r\\n]+$",
                "description": "Option values cannot contain commas or line breaks."
              }
            }
          },
          "default_options": {
            "type": [
              "object",
              "null"
            ],
            "maxProperties": 8,
            "propertyNames": {
              "maxLength": 64,
              "pattern": "^[^\\r\\n]+$"
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^,\\r\\n]+$"
            }
          },
          "features": {
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[^\\r\\n]+$",
              "description": "Each feature must be a single line."
            }
          },
          "related_product_ids": {
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "tags": {
            "type": "array",
            "maxItems": 30,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^,\\r\\n]+$",
              "description": "Tags cannot contain commas or line breaks."
            }
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          },
          "weight_kg": {
            "type": "number",
            "minimum": 0,
            "maximum": 2500
          },
          "source_region": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProductVariationCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "options",
          "price"
        ],
        "properties": {
          "options": {
            "type": "object",
            "maxProperties": 8,
            "propertyNames": {
              "maxLength": 64,
              "pattern": "^[^\\r\\n]+$"
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^,\\r\\n]+$"
            }
          },
          "price": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000000,
            "description": "When present, must be greater than this variation price."
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        }
      },
      "ProductVariationExisting": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "options",
          "price"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "retired"
            ]
          },
          "options": {
            "type": "object",
            "maxProperties": 8,
            "propertyNames": {
              "maxLength": 64,
              "pattern": "^[^\\r\\n]+$"
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^,\\r\\n]+$"
            }
          },
          "price": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000000,
            "description": "When present, must be greater than this variation price."
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 100
          }
        }
      },
      "ProductCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductEditableFields"
          },
          {
            "type": "object",
            "properties": {
              "variations": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/ProductVariationCreate"
                }
              },
              "catalog_authority_connection_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9._:-]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Exact Connection that owns Catalog, or null when Moku owns Catalog."
              },
              "base_price_authority_connection_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9._:-]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Exact Connection that owns base price, or null when Moku owns base price."
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "kind": {
                      "const": "simple"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "options": {
                      "maxProperties": 0
                    },
                    "variations": {
                      "maxItems": 0
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "const": "variable"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "sku": {
                      "type": "null"
                    }
                  }
                }
              }
            ]
          }
        ],
        "unevaluatedProperties": false
      },
      "ProductUpdateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductEditableFields"
          },
          {
            "type": "object",
            "required": [
              "expected_revision"
            ],
            "properties": {
              "expected_revision": {
                "type": "integer",
                "minimum": 0
              },
              "variations": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProductVariationExisting"
                    },
                    {
                      "$ref": "#/components/schemas/ProductVariationCreate"
                    }
                  ]
                }
              },
              "catalog_authority_connection_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9._:-]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Exact Connection that owns Catalog, or null when Moku owns Catalog."
              },
              "base_price_authority_connection_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9._:-]+$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Exact Connection that owns base price, or null when Moku owns base price."
              }
            },
            "allOf": [
              {
                "if": {
                  "properties": {
                    "kind": {
                      "const": "simple"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "properties": {
                    "variations": {
                      "maxItems": 0
                    }
                  }
                }
              },
              {
                "if": {
                  "properties": {
                    "kind": {
                      "const": "variable"
                    }
                  },
                  "required": [
                    "kind"
                  ]
                },
                "then": {
                  "required": [
                    "variations"
                  ],
                  "properties": {
                    "sku": {
                      "type": "null"
                    }
                  }
                }
              }
            ]
          }
        ],
        "unevaluatedProperties": false
      },
      "ProductTransitionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_revision"
        ],
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 0
          },
          "catalog_authority_connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact Connection that owns Catalog, or null when Moku owns Catalog."
          },
          "base_price_authority_connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact Connection that owns base price, or null when Moku owns base price."
          }
        },
        "description": "Publish/unpublish controls the Moku Offer and requires the verified Vendor owner grant, independent of Catalog/base-price authority. Archive/restore changes the canonical identity and requires both current source authority bindings."
      },
      "ProductVariation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "options",
          "price",
          "original_price",
          "sku"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "retired"
            ]
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "price": {
            "type": "integer",
            "minimum": 0
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Null or a value greater than this variation price."
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "catalog_status",
          "status",
          "revision",
          "kind",
          "name",
          "slug",
          "description",
          "price",
          "original_price",
          "discount",
          "category",
          "subcategory",
          "image_urls",
          "badge",
          "options",
          "default_options",
          "variations",
          "features",
          "related_product_ids",
          "tags",
          "sku",
          "weight_kg",
          "source_region",
          "created_at",
          "updated_at",
          "published_at",
          "archived_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "vendor_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "archived"
            ],
            "description": "Moku Offer publication state. Draft products remain available to private channel synchronization; archived retires the canonical identity."
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "kind": {
            "type": "string",
            "enum": [
              "simple",
              "variable"
            ]
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "price": {
            "type": "integer",
            "minimum": 0
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Null or a value greater than price."
          },
          "discount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "category": {
            "type": "string"
          },
          "subcategory": {
            "type": "string"
          },
          "image_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "badge": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sale",
              "new",
              null
            ]
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "default_options": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "variations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductVariation"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "related_product_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "weight_kg": {
            "type": "number",
            "minimum": 0
          },
          "source_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "catalog_status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ],
            "description": "Canonical Product availability. Active includes privately synchronized products whose Moku Offer remains draft. Derived only from validated schema-2 lifecycle; archiving retires the shared identity."
          }
        }
      },
      "SellerMedia": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "url",
          "content_type",
          "size_bytes",
          "width",
          "height"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 of the original uploaded bytes, not the re-encoded image."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Immutable public URL in the Moku marketplace media bucket."
          },
          "content_type": {
            "type": "string",
            "const": "image/webp"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2097152
          },
          "width": {
            "type": "integer",
            "minimum": 1,
            "maximum": 16000000
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "maximum": 16000000
          }
        }
      },
      "InventoryItem": {
        "type": "object",
        "additionalProperties": false,
        "x-max-active-reservations": 256,
        "required": [
          "id",
          "vendor_id",
          "location_id",
          "stock_pool_id",
          "product_id",
          "product_name",
          "product_image_url",
          "variation_id",
          "variation_options",
          "sku",
          "on_hand",
          "reserved",
          "available",
          "version",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Opaque inventory identity."
          },
          "vendor_id": {
            "type": "string"
          },
          "location_id": {
            "type": "string",
            "const": "default",
            "description": "Vendor-scoped Inventory Location. The single explicit default location is an accounting identity, not a warehouse-management feature. It does not change the opaque item ID. Other locations and allocation are not supported yet."
          },
          "stock_pool_id": {
            "type": "string",
            "const": "default",
            "description": "Logical sellable Stock Pool. The first Commerce OS generation exposes one default pool without changing the opaque Inventory Item ID."
          },
          "product_id": {
            "type": "string"
          },
          "product_name": {
            "type": "string"
          },
          "product_image_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "variation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "variation_options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "on_hand": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "reserved": {
            "type": "integer",
            "minimum": 0
          },
          "available": {
            "type": "integer",
            "minimum": 0
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "in_stock",
              "low_stock",
              "out_of_stock"
            ]
          }
        },
        "example": {
          "id": "WyJwcm9kdWN0LTEiLCJibHVlLXhsIl0",
          "vendor_id": "vendor-1",
          "location_id": "default",
          "stock_pool_id": "default",
          "product_id": "product-1",
          "product_name": "Tazón azul",
          "product_image_url": "https://example.com/tazon.jpg",
          "variation_id": "blue-xl",
          "variation_options": {
            "color": "Azul",
            "size": "XL"
          },
          "sku": "TAZ-BLU-XL",
          "on_hand": 8,
          "reserved": 2,
          "available": 6,
          "version": 3,
          "status": "low_stock"
        }
      },
      "InventoryAdjustmentRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "target_on_hand",
          "expected_version"
        ],
        "properties": {
          "target_on_hand": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "authority_connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ReservationLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "channel_listing_id",
          "inventory_item_id",
          "quantity"
        ],
        "properties": {
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Opaque inventory identity. Persist this value instead of interpreting or constructing it."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        }
      },
      "InventoryReservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "connection_id",
          "external_reference",
          "state",
          "lines",
          "expires_at",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "external_reference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "state": {
            "type": "string",
            "enum": [
              "reserved",
              "committed",
              "released",
              "expired"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationLine"
            },
            "minItems": 1,
            "maxItems": 20
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ReservationCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connection_id",
          "external_reference",
          "expires_in_seconds",
          "lines"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "external_reference": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "expires_in_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 3600
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "channel_listing_id",
                "quantity"
              ],
              "properties": {
                "channel_listing_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9._:-]+$"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100
                }
              }
            },
            "minItems": 1,
            "maxItems": 20
          }
        }
      },
      "ReservationRenewRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "expires_in_seconds"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "expires_in_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 3600
          }
        }
      },
      "ChannelConnection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "provider",
          "external_account_id",
          "display_name",
          "status",
          "roles",
          "health",
          "active_listing_count",
          "active_reservation_count",
          "unresolved_external_order_count",
          "active_channel_fulfillment_count",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "provider": {
            "type": "string",
            "enum": [
              "woocommerce",
              "mercadolibre",
              "falabella",
              "paris",
              "ripley",
              "walmart_chile"
            ]
          },
          "external_account_id": {
            "type": "string",
            "maxLength": 256,
            "x-max-utf8-bytes": 256,
            "minLength": 1,
            "description": "Trimmed opaque channel account identifier, limited to 256 UTF-8 bytes."
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "disconnected"
            ]
          },
          "roles": {
            "$ref": "#/components/schemas/ConnectionRoles"
          },
          "health": {
            "$ref": "#/components/schemas/ConnectionHealth"
          },
          "active_listing_count": {
            "type": "integer",
            "minimum": 0
          },
          "active_reservation_count": {
            "type": "integer",
            "minimum": 0
          },
          "unresolved_external_order_count": {
            "type": "integer",
            "minimum": 0
          },
          "active_channel_fulfillment_count": {
            "type": "integer",
            "minimum": 0
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ConnectionCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "provider",
          "external_account_id",
          "display_name",
          "roles"
        ],
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "woocommerce",
              "mercadolibre",
              "falabella",
              "paris",
              "ripley",
              "walmart_chile"
            ]
          },
          "external_account_id": {
            "type": "string",
            "maxLength": 256,
            "x-max-utf8-bytes": 256,
            "minLength": 1,
            "description": "Trimmed opaque channel account identifier, limited to 256 UTF-8 bytes."
          },
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "roles": {
            "$ref": "#/components/schemas/ConnectionRoles"
          }
        }
      },
      "ConnectionUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "display_name",
          "status",
          "expected_version"
        ],
        "properties": {
          "display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "ConnectionRoles": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "catalog",
          "base_price",
          "inventory",
          "order_ingress",
          "external_order_fulfillment"
        ],
        "properties": {
          "catalog": {
            "type": "string",
            "enum": [
              "source",
              "destination",
              "disabled"
            ]
          },
          "base_price": {
            "type": "string",
            "enum": [
              "source",
              "destination",
              "disabled"
            ]
          },
          "inventory": {
            "type": "string",
            "enum": [
              "source",
              "destination",
              "disabled"
            ]
          },
          "order_ingress": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ]
          },
          "external_order_fulfillment": {
            "type": "string",
            "enum": [
              "moku",
              "channel"
            ]
          }
        }
      },
      "ConnectionHealth": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "state",
          "last_observed_at",
          "last_success_at",
          "blockers"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "unknown",
              "healthy",
              "degraded",
              "blocked"
            ]
          },
          "last_observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "blockers": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          }
        }
      },
      "ConnectionRolesReplaceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "roles",
          "expected_version"
        ],
        "properties": {
          "roles": {
            "$ref": "#/components/schemas/ConnectionRoles"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "ChannelListing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "connection_id",
          "product_id",
          "variation_id",
          "inventory_item_id",
          "external_listing_id",
          "external_product_id",
          "external_variation_id",
          "external_sku",
          "state",
          "source_revision",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "variation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Opaque inventory identity. Persist this value instead of interpreting or constructing it."
          },
          "external_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "external_product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "external_variation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:/-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_sku": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "ended"
            ]
          },
          "source_revision": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChannelListingCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connection_id",
          "product_id",
          "variation_id",
          "external_listing_id",
          "external_product_id",
          "external_variation_id",
          "external_sku",
          "state",
          "source_revision"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "variation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "external_product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "external_variation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:/-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_sku": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "source_revision": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ChannelListingUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "state",
          "external_sku",
          "source_revision",
          "expected_version"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "ended"
            ]
          },
          "external_sku": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "source_revision": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "ChannelPricingPolicy": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "mode"
            ],
            "properties": {
              "mode": {
                "const": "keep_native",
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "mode",
              "adjustment_basis_points",
              "fixed_clp"
            ],
            "properties": {
              "mode": {
                "const": "managed",
                "type": "string"
              },
              "adjustment_basis_points": {
                "type": "integer",
                "minimum": -10000,
                "maximum": 100000
              },
              "fixed_clp": {
                "type": "integer",
                "minimum": -1000000000,
                "maximum": 1000000000
              }
            }
          }
        ]
      },
      "ChannelPriceObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "revision",
          "regular_price_clp",
          "effective_price_clp",
          "promotion_active",
          "provider_revision",
          "observed_at",
          "received_at"
        ],
        "properties": {
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "regular_price_clp": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000
          },
          "effective_price_clp": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000
          },
          "promotion_active": {
            "type": "boolean"
          },
          "provider_revision": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "received_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ChannelPricingItem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "listing_id",
          "connection_id",
          "listing_version",
          "product_id",
          "variation_id",
          "external_listing_id",
          "external_product_id",
          "external_variation_id",
          "reference",
          "observed",
          "override",
          "intended_regular_price_clp",
          "state",
          "blockers",
          "input_fingerprint",
          "product_name",
          "sku",
          "variation_options"
        ],
        "properties": {
          "listing_id": {
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "listing_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "product_id": {
            "type": "string"
          },
          "variation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_listing_id": {
            "type": "string"
          },
          "external_product_id": {
            "type": "string"
          },
          "external_variation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "price_clp",
                  "product_revision",
                  "source_connection_id",
                  "reference_revision",
                  "source_membership_id"
                ],
                "properties": {
                  "price_clp": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000000
                  },
                  "product_revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "source_connection_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reference_revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  },
                  "source_membership_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "observed": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ChannelPriceObservation"
              }
            ]
          },
          "override": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "revision",
              "price_clp"
            ],
            "properties": {
              "revision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "price_clp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "maximum": 1000000000
              }
            }
          },
          "intended_regular_price_clp": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000000
          },
          "state": {
            "type": "string",
            "enum": [
              "keep_native",
              "unchanged",
              "change",
              "blocked"
            ]
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CONNECTION_INACTIVE",
                "LISTING_INACTIVE",
                "REFERENCE_UNAVAILABLE",
                "REFERENCE_AUTHORITY_INACTIVE",
                "REFERENCE_CYCLE",
                "PRICING_DESTINATION_REQUIRED",
                "OBSERVATION_MISSING",
                "OBSERVATION_STALE",
                "PROMOTION_ACTIVE",
                "PRICE_OUT_OF_RANGE"
              ]
            }
          },
          "input_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "product_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "variation_options": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ChannelListingPricing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connection_id",
          "pricing_revision",
          "policy",
          "listing_id",
          "listing_version",
          "product_id",
          "variation_id",
          "external_listing_id",
          "external_product_id",
          "external_variation_id",
          "reference",
          "observed",
          "override",
          "intended_regular_price_clp",
          "state",
          "blockers",
          "input_fingerprint",
          "product_name",
          "sku",
          "variation_options"
        ],
        "properties": {
          "connection_id": {
            "type": "string"
          },
          "pricing_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "policy": {
            "$ref": "#/components/schemas/ChannelPricingPolicy"
          },
          "listing_id": {
            "type": "string"
          },
          "listing_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "product_id": {
            "type": "string"
          },
          "variation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_listing_id": {
            "type": "string"
          },
          "external_product_id": {
            "type": "string"
          },
          "external_variation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "reference": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "price_clp",
                  "product_revision",
                  "source_connection_id",
                  "reference_revision",
                  "source_membership_id"
                ],
                "properties": {
                  "price_clp": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000000
                  },
                  "product_revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "source_connection_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reference_revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  },
                  "source_membership_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "observed": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ChannelPriceObservation"
              }
            ]
          },
          "override": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "revision",
              "price_clp"
            ],
            "properties": {
              "revision": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "price_clp": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "maximum": 1000000000
              }
            }
          },
          "intended_regular_price_clp": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 1000000000
          },
          "state": {
            "type": "string",
            "enum": [
              "keep_native",
              "unchanged",
              "change",
              "blocked"
            ]
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "CONNECTION_INACTIVE",
                "LISTING_INACTIVE",
                "REFERENCE_UNAVAILABLE",
                "REFERENCE_AUTHORITY_INACTIVE",
                "REFERENCE_CYCLE",
                "PRICING_DESTINATION_REQUIRED",
                "OBSERVATION_MISSING",
                "OBSERVATION_STALE",
                "PROMOTION_ACTIVE",
                "PRICE_OUT_OF_RANGE"
              ]
            }
          },
          "input_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "product_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "variation_options": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ChannelPricingPreview": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connection_id",
          "connection_version",
          "pricing_revision",
          "policy",
          "items",
          "page",
          "page_fingerprint",
          "live_write_authorized"
        ],
        "properties": {
          "connection_id": {
            "type": "string"
          },
          "pricing_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "policy": {
            "$ref": "#/components/schemas/ChannelPricingPolicy"
          },
          "items": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/ChannelPricingItem"
            }
          },
          "page": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "next_cursor",
              "complete"
            ],
            "properties": {
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "complete": {
                "type": "boolean",
                "description": "True only for the terminal page; preceding pages must still be included in the reviewed manifest."
              }
            }
          },
          "page_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "live_write_authorized": {
            "type": "boolean",
            "const": false
          },
          "connection_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "All pages of the reviewed manifest must have the same connection version as well as pricing revision."
          }
        }
      },
      "ChannelPriceObservationInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_listing_version",
          "expected_observation_revision",
          "regular_price_clp",
          "effective_price_clp",
          "promotion_active",
          "provider_revision",
          "observed_at"
        ],
        "properties": {
          "expected_listing_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_observation_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "regular_price_clp": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000
          },
          "effective_price_clp": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000
          },
          "promotion_active": {
            "type": "boolean"
          },
          "provider_revision": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WooPairing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "provider",
          "account_id",
          "site_url",
          "installation_id",
          "account_generation",
          "credential_generation",
          "paired_at",
          "updated_at"
        ],
        "properties": {
          "provider": {
            "const": "woocommerce"
          },
          "account_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          },
          "site_url": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1
          },
          "installation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "credential_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "paired_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WooPairingState": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "pairing",
          "access",
          "scope_generation",
          "configuration_revision"
        ],
        "properties": {
          "status": {
            "enum": [
              "not_connected",
              "paired",
              "reconnect_required"
            ]
          },
          "pairing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WooPairing"
              },
              {
                "type": "null"
              }
            ]
          },
          "access": {
            "enum": [
              "discovery",
              "sync",
              null
            ]
          },
          "scope_generation": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              {
                "type": "null"
              }
            ]
          },
          "configuration_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          }
        }
      },
      "WooPairingRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "site_url",
          "installation_id",
          "expected_account_generation",
          "expected_credential_generation"
        ],
        "properties": {
          "site_url": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1
          },
          "installation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "expected_account_generation": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "expected_credential_generation": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          }
        }
      },
      "WooDiscoveryStartRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_account_generation",
          "expected_credential_generation",
          "expected_configuration_revision"
        ],
        "properties": {
          "expected_account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "expected_credential_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "expected_configuration_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          }
        }
      },
      "PrivateSyncDiscoveryRun": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "provider",
          "status",
          "revision",
          "account_generation",
          "configuration_revision",
          "declared_total",
          "enumerated_listings",
          "scanned_listings",
          "candidate_count",
          "excluded_count",
          "failed_count",
          "pages_scanned",
          "cursor_restarts",
          "blocker_codes",
          "stale",
          "resumable",
          "created_at",
          "updated_at",
          "completed_at",
          "next_attempt_at",
          "capabilities"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1
          },
          "provider": {
            "enum": [
              "woocommerce",
              "mercadolibre"
            ]
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "completed",
              "blocked",
              "cancelled"
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "configuration_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "declared_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740990
              },
              {
                "type": "null"
              }
            ]
          },
          "enumerated_listings": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "scanned_listings": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "candidate_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "excluded_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "failed_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "pages_scanned": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "cursor_restarts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "blocker_codes": {
            "type": "array",
            "maxItems": 30,
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1
            }
          },
          "stale": {
            "type": "boolean"
          },
          "resumable": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "user_products",
                  "warehouse_management",
                  "multiwarehouse"
                ],
                "properties": {
                  "user_products": {
                    "type": "boolean"
                  },
                  "warehouse_management": {
                    "type": "boolean"
                  },
                  "multiwarehouse": {
                    "type": "boolean"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WooDiscoveryObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "product_id",
          "variation_id",
          "title",
          "sku",
          "attributes",
          "image_urls",
          "regular_price_clp",
          "effective_price_clp",
          "promotion_active",
          "stock_quantity",
          "stock_version",
          "stock_owner_id",
          "parent_capacity_exceeded",
          "reason_codes",
          "observed_at"
        ],
        "properties": {
          "product_id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,18}$"
          },
          "variation_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,18}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string",
            "maxLength": 512,
            "minLength": 1
          },
          "sku": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "attributes": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "name",
                "value"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "maxLength": 256,
                  "minLength": 1
                },
                "value": {
                  "type": "string",
                  "maxLength": 2048,
                  "minLength": 1
                }
              }
            }
          },
          "image_urls": {
            "type": "array",
            "maxItems": 12,
            "items": {
              "type": "string",
              "maxLength": 2048,
              "minLength": 1
            }
          },
          "regular_price_clp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_price_clp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "promotion_active": {
            "type": "boolean"
          },
          "stock_quantity": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "stock_version": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]{0,18})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "stock_owner_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,18}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent_capacity_exceeded": {
            "type": "boolean"
          },
          "reason_codes": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 64,
              "minLength": 1
            }
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WooDiscoveryPageRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_account_generation",
          "expected_credential_generation",
          "expected_configuration_revision",
          "expected_revision",
          "page_sequence",
          "items",
          "next_cursor",
          "complete",
          "declared_total",
          "enumerated_item_ids",
          "completed_listings"
        ],
        "properties": {
          "expected_account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "expected_credential_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "expected_configuration_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "page_sequence": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "items": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/WooDiscoveryObservation"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "complete": {
            "type": "boolean"
          },
          "declared_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740990
              },
              {
                "type": "null"
              }
            ]
          },
          "enumerated_item_ids": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,18}$"
            }
          },
          "completed_listings": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,18}$"
            }
          }
        }
      },
      "WooDiscoveryPageReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "accepted",
          "transport_fingerprint",
          "run"
        ],
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "transport_fingerprint": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "run": {
            "$ref": "#/components/schemas/PrivateSyncDiscoveryRun"
          }
        }
      },
      "WooSourceObservationBatch": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "observations"
        ],
        "properties": {
          "observations": {
            "type": "array",
            "minItems": 0,
            "maxItems": 25,
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "connection_id",
                    "channel_listing_id",
                    "observation_id",
                    "quantity",
                    "source_version",
                    "observed_at"
                  ],
                  "properties": {
                    "connection_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "channel_listing_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "observation_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "quantity": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000
                    },
                    "source_version": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,18})$",
                      "maxLength": 19
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lineage": {
                      "$ref": "#/components/schemas/WooStockLineage"
                    }
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "connection_id",
                    "channel_listing_id",
                    "observation_id",
                    "observed_at",
                    "error_code"
                  ],
                  "properties": {
                    "connection_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "channel_listing_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "observation_id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 160
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "error_code": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Z0-9_]{0,99}$"
                    }
                  }
                }
              ]
            }
          },
          "refresh": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "refresh_id",
              "expected_revision",
              "after_id",
              "next_after_id",
              "complete"
            ],
            "properties": {
              "refresh_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "expected_revision": {
                "type": "integer",
                "minimum": 1
              },
              "after_id": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[a-f0-9]{64}$"
              },
              "next_after_id": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[a-f0-9]{64}$"
              },
              "complete": {
                "type": "boolean"
              }
            },
            "description": "Optional initial/resume source inventory scan progress. The server validates the exact next membership page and records completion only with the batch results. It is not a convergence claim."
          }
        },
        "anyOf": [
          {
            "properties": {
              "observations": {
                "minItems": 1
              }
            }
          },
          {
            "required": [
              "refresh"
            ]
          }
        ]
      },
      "WooSourceObservationResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "observation_id",
          "channel_listing_id",
          "inventory_item_id",
          "status",
          "code",
          "observation_revision",
          "inventory_version",
          "unsettled_effects"
        ],
        "properties": {
          "observation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "inventory_item_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "observed",
              "unavailable",
              "failed"
            ]
          },
          "code": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "observation_revision": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "inventory_version": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "unsettled_effects": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WooSyncMembership": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "membership_id",
          "connection_id",
          "channel_listing_id",
          "review_id",
          "product_id",
          "inventory_item_id",
          "external_product_id",
          "product_name",
          "listing_version",
          "configuration_revision",
          "account_generation",
          "product_revision",
          "variation_id",
          "external_variation_id",
          "sku",
          "variation_options",
          "order_ingress_from",
          "state",
          "sources",
          "reference_source",
          "price_write_approved",
          "price_blocker_codes",
          "reference",
          "source_read_error"
        ],
        "properties": {
          "membership_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "review_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "external_product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "product_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "listing_version": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "configuration_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "account_generation": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "product_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "variation_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "external_variation_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "variation_options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "order_ingress_from": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "sources": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "catalog",
              "reference_price",
              "inventory"
            ],
            "properties": {
              "catalog": {
                "type": "string",
                "enum": [
                  "moku",
                  "woocommerce",
                  "mercadolibre"
                ]
              },
              "reference_price": {
                "type": "string",
                "enum": [
                  "moku",
                  "woocommerce",
                  "mercadolibre"
                ]
              },
              "inventory": {
                "type": "string",
                "enum": [
                  "moku",
                  "woocommerce",
                  "mercadolibre"
                ]
              }
            }
          },
          "reference_source": {
            "type": "boolean"
          },
          "price_write_approved": {
            "type": "boolean"
          },
          "price_blocker_codes": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "reference": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "inventory_item_id",
                  "product_id",
                  "variation_id",
                  "price_clp",
                  "reference_revision",
                  "source_provider",
                  "source_connection_id",
                  "source_account_generation",
                  "source_version",
                  "observed_at",
                  "received_at"
                ],
                "properties": {
                  "inventory_item_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "product_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "variation_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "price_clp": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "reference_revision": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "source_provider": {
                    "type": "string",
                    "enum": [
                      "moku",
                      "woocommerce",
                      "mercadolibre"
                    ]
                  },
                  "source_connection_id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source_account_generation": {
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "source_version": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "observed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "received_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "source_read_error": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "observed_at",
                  "received_at"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{0,99}$"
                  },
                  "observed_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "received_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            ]
          }
        }
      },
      "WooProjectionObservation": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "field",
              "quantity",
              "provider_version",
              "observed_at"
            ],
            "properties": {
              "field": {
                "type": "string",
                "const": "stock"
              },
              "quantity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              "provider_version": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "field",
              "regular_price_clp",
              "effective_price_clp",
              "promotion_active",
              "provider_version",
              "observed_at"
            ],
            "properties": {
              "field": {
                "type": "string",
                "const": "regular_price"
              },
              "regular_price_clp": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              "effective_price_clp": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              "promotion_active": {
                "type": "boolean"
              },
              "provider_version": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "observed_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "WooProjectionCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "operation_id",
          "field",
          "target",
          "external_item_id",
          "external_variant_id",
          "before",
          "after",
          "expected_provider_version",
          "input_fingerprint",
          "credential_generation"
        ],
        "properties": {
          "operation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "field": {
            "type": "string",
            "enum": [
              "stock",
              "regular_price"
            ]
          },
          "target": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "provider",
              "product_id",
              "variation_id"
            ],
            "properties": {
              "provider": {
                "const": "woocommerce",
                "type": "string"
              },
              "product_id": {
                "type": "string",
                "pattern": "^[1-9][0-9]*$"
              },
              "variation_id": {
                "oneOf": [
                  {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "external_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "external_variant_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "before": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "after": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "expected_provider_version": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "input_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "credential_generation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "WooProjectionProof": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "operation_id",
          "input_fingerprint",
          "after",
          "provider_version"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "const": "native_receipt"
          },
          "operation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "input_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "after": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "provider_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "WooProjectionOperation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "connection_id",
          "channel_listing_id",
          "review_id",
          "configuration_revision",
          "qualification_revision",
          "pricing_revision",
          "state",
          "version",
          "command",
          "proof",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "review_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "configuration_revision": {
            "type": "integer",
            "minimum": 1
          },
          "qualification_revision": {
            "type": "integer",
            "minimum": 1
          },
          "pricing_revision": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "uncertain",
              "confirmed",
              "rejected"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "command": {
            "$ref": "#/components/schemas/WooProjectionCommand"
          },
          "proof": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WooProjectionProof"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WooNativeInspection": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "protocol",
          "plugin_version",
          "wordpress_version",
          "woocommerce_version",
          "php_version",
          "database_family",
          "database_version",
          "currency",
          "global_stock_management",
          "hpos",
          "product_store",
          "variation_store",
          "schemas",
          "engines",
          "probes",
          "inspected_at"
        ],
        "properties": {
          "protocol": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "plugin_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "wordpress_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "woocommerce_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "php_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "database_family": {
            "type": "string",
            "enum": [
              "mysql",
              "mariadb"
            ]
          },
          "database_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "global_stock_management": {
            "type": "boolean"
          },
          "hpos": {
            "type": "boolean"
          },
          "product_store": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "variation_store": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "schemas": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "transport",
              "stock_receipts",
              "price_receipts",
              "order_journal"
            ],
            "properties": {
              "transport": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "stock_receipts": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "price_receipts": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "order_journal": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          },
          "engines": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "products",
              "product_metadata",
              "product_lookup",
              "transport_records",
              "transport_leases",
              "stock_versions",
              "stock_receipts",
              "price_receipts",
              "order_journal",
              "journal_control"
            ],
            "properties": {
              "products": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "product_metadata": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "product_lookup": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "transport_records": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "transport_leases": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "stock_versions": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "stock_receipts": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "price_receipts": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "order_journal": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              },
              "journal_control": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[A-Za-z0-9_]{1,40}$"
              }
            }
          },
          "probes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "products_read",
              "orders_read",
              "native_stock_hook",
              "transaction_guard"
            ],
            "properties": {
              "products_read": {
                "type": "boolean"
              },
              "orders_read": {
                "type": "boolean"
              },
              "native_stock_hook": {
                "type": "boolean"
              },
              "transaction_guard": {
                "type": "boolean"
              }
            }
          },
          "inspected_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "Bounded facts read by the paired native plugin. Moku derives technical capabilities from the supported protocol and storage contract; this is native attestation, not a hardware attestation or operational soak result."
      },
      "WooCapabilityCheckInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_account_generation",
          "expected_credential_generation",
          "inspection"
        ],
        "properties": {
          "expected_account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "expected_credential_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "inspection": {
            "$ref": "#/components/schemas/WooNativeInspection"
          }
        }
      },
      "WooCapabilityCheck": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "account_generation",
          "qualification_revision",
          "inspection_fingerprint",
          "blocker_codes",
          "checked_at",
          "evidence_kind",
          "operational_soak_qualified"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "compatible",
              "incompatible"
            ]
          },
          "account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "qualification_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "inspection_fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "blocker_codes": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "maxLength": 100
            }
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "evidence_kind": {
            "type": "string",
            "const": "paired_native_inspection"
          },
          "operational_soak_qualified": {
            "type": "boolean",
            "const": false
          }
        }
      },
      "WooSyncRuntime": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "state",
          "account_generation",
          "installation_id",
          "binding",
          "pause",
          "source_refresh"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "awaiting_activation",
              "active",
              "paused"
            ]
          },
          "account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "installation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "binding": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "review_id",
                  "configuration_revision",
                  "connection_id",
                  "order_ingress_from"
                ],
                "properties": {
                  "review_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  },
                  "configuration_revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740990
                  },
                  "connection_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "order_ingress_from": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "pause": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "nonce",
                  "requested_at"
                ],
                "properties": {
                  "nonce": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  },
                  "requested_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "source_refresh": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "id",
                  "state",
                  "revision",
                  "started_at",
                  "next_membership_id",
                  "processed_items",
                  "failed_items"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "state": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "completed"
                    ]
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740990
                  },
                  "started_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "next_membership_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "processed_items": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  },
                  "failed_items": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WooNativeOrderLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "external_product_id",
          "external_variation_id",
          "quantity",
          "unit_price",
          "line_total"
        ],
        "properties": {
          "external_product_id": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,18}$"
          },
          "external_variation_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,18}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "unit_price": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000
          },
          "line_total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          }
        }
      },
      "WooNativeOrderObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_version",
          "source_updated_at",
          "status",
          "currency",
          "order_number",
          "lines",
          "shipping_total",
          "contact_email",
          "delivery_address",
          "source_created_at"
        ],
        "properties": {
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "source_updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$",
            "description": "Canonical UTC timestamp ending in Z, no more than 10 minutes in the future."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "cancelled",
              "failed"
            ]
          },
          "currency": {
            "const": "CLP"
          },
          "order_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/WooNativeOrderLine"
            }
          },
          "shipping_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_email": {
            "type": "null"
          },
          "delivery_address": {
            "type": "null"
          },
          "source_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Actual native creation timestamp. Required for new managed observations; absence in historical observations remains unknown."
          }
        }
      },
      "WooOrderJournalInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entry_id",
          "sequence",
          "captured_at",
          "scope",
          "native",
          "captured_epoch"
        ],
        "properties": {
          "entry_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "sequence": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,18}$"
          },
          "captured_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "review_id",
              "configuration_revision",
              "connection_id",
              "account_generation",
              "installation_id",
              "order_ingress_from"
            ],
            "properties": {
              "review_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{32}$"
              },
              "configuration_revision": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              "connection_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "account_generation": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              "installation_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{32}$"
              },
              "order_ingress_from": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "native": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "external_order_id",
              "order",
              "stock_effect_evidence"
            ],
            "properties": {
              "external_order_id": {
                "type": "string",
                "pattern": "^woo_[a-f0-9]{32}_[1-9][0-9]{0,18}$"
              },
              "order": {
                "$ref": "#/components/schemas/WooNativeOrderObservation"
              },
              "stock_effect_evidence": {
                "type": "array",
                "maxItems": 20,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "external_product_id",
                    "external_variation_id",
                    "occurred_at",
                    "reference",
                    "captured_epoch"
                  ],
                  "properties": {
                    "external_product_id": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]{0,18}$"
                    },
                    "external_variation_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[1-9][0-9]{0,18}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reference": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "captured_epoch": {
                      "anyOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "review_id",
                            "configuration_revision",
                            "connection_id",
                            "account_generation",
                            "installation_id",
                            "order_ingress_from"
                          ],
                          "properties": {
                            "review_id": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{32}$"
                            },
                            "configuration_revision": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740990
                            },
                            "connection_id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 160
                            },
                            "account_generation": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740990
                            },
                            "installation_id": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{32}$"
                            },
                            "order_ingress_from": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "captured_epoch": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "review_id",
                  "configuration_revision",
                  "connection_id",
                  "account_generation",
                  "installation_id",
                  "order_ingress_from"
                ],
                "properties": {
                  "review_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  },
                  "configuration_revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740990
                  },
                  "connection_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  "account_generation": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740990
                  },
                  "installation_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                  },
                  "order_ingress_from": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WooOrderJournalReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entry_id",
          "operation_hash",
          "status",
          "disposition",
          "external_order"
        ],
        "properties": {
          "entry_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "operation_hash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "pending"
            ]
          },
          "disposition": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "observed",
              "unmapped",
              "historical",
              "history_review",
              null
            ]
          },
          "external_order": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalOrder"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WooJournalHealthInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "review_id",
          "configuration_revision",
          "account_generation",
          "installation_id",
          "pending_count",
          "oldest_at",
          "gap",
          "coverage",
          "checked_at"
        ],
        "properties": {
          "review_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "configuration_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "account_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "installation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "pending_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "oldest_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "gap": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code",
                  "at"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z][A-Z0-9_]{0,99}$"
                  },
                  "at": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "coverage": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "from",
                  "through",
                  "completed_at"
                ],
                "properties": {
                  "from": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  },
                  "through": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  },
                  "completed_at": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WooJournalHealthResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "recorded"
        ],
        "properties": {
          "recorded": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "WooJournalFencePage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pause_nonce",
          "closed_cutoff",
          "expected_revision",
          "page_sequence",
          "after_sequence",
          "entries",
          "complete"
        ],
        "properties": {
          "pause_nonce": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "closed_cutoff": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "page_sequence": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "after_sequence": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$"
          },
          "entries": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "entry_id",
                "sequence",
                "operation_hash"
              ],
              "properties": {
                "entry_id": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "sequence": {
                  "type": "string",
                  "pattern": "^(0|[1-9][0-9]{0,18})$"
                },
                "operation_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              }
            }
          },
          "complete": {
            "type": "boolean"
          }
        }
      },
      "WooJournalFenceVerify": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_revision"
        ],
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          }
        }
      },
      "WooJournalFenceProgress": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pause_nonce",
          "revision",
          "state",
          "closed_cutoff",
          "page_sequence",
          "after_sequence",
          "manifest_hash",
          "pending_before_cutoff"
        ],
        "properties": {
          "pause_nonce": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "state": {
            "type": "string",
            "enum": [
              "collecting",
              "closed",
              "drained"
            ]
          },
          "closed_cutoff": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$"
          },
          "page_sequence": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "after_sequence": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$"
          },
          "manifest_hash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "pending_before_cutoff": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          }
        }
      },
      "WooStockLineage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_change_id",
          "source_version",
          "changed_at",
          "provenance",
          "clock_uncertainty_ms",
          "cause_operation_id",
          "native_receipt_at"
        ],
        "description": "Paired native version lineage, outside frozen mutation commands. Unknown timing stays null; receipt time is never the original source clock.",
        "properties": {
          "source_change_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "source_version": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$"
          },
          "changed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provenance": {
            "type": "string",
            "enum": [
              "native_stock_hook",
              "native_receipt_transaction",
              "observation_only"
            ]
          },
          "clock_uncertainty_ms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 60000
          },
          "cause_operation_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[a-f0-9]{64}$"
          },
          "native_receipt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "WooProjectionWakeup": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "version",
          "membership_id",
          "connection_id",
          "channel_listing_id",
          "inventory_item_id",
          "event_id",
          "field",
          "source_event_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "membership_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "event_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "field": {
            "type": "string",
            "enum": [
              "stock",
              "regular_price"
            ]
          },
          "source_event_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WooCatalogSourceObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_product_revision",
          "source_version",
          "observation_id",
          "observed_at",
          "catalog"
        ],
        "properties": {
          "expected_product_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "observation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "maxLength": 32
          },
          "catalog": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "description",
              "image_urls"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 5000
              },
              "image_urls": {
                "type": "array",
                "maxItems": 12,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 2048
                }
              }
            }
          }
        }
      },
      "WooCatalogSourceResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "product_id",
          "product_revision",
          "source_version",
          "changed"
        ],
        "properties": {
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "product_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "changed": {
            "type": "boolean"
          }
        }
      },
      "WooReferenceSourceObservation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_reference_revision",
          "price_clp",
          "source_version",
          "observation_id",
          "observed_at"
        ],
        "properties": {
          "expected_reference_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740990
          },
          "price_clp": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000
          },
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "observation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "maxLength": 32
          }
        }
      },
      "WooReferenceSourceResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "inventory_item_id",
          "product_id",
          "variation_id",
          "price_clp",
          "reference_revision",
          "source_provider",
          "source_connection_id",
          "source_account_generation",
          "source_version",
          "observed_at",
          "received_at"
        ],
        "properties": {
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "variation_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "price_clp": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "reference_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "source_provider": {
            "type": "string",
            "enum": [
              "moku",
              "woocommerce",
              "mercadolibre"
            ]
          },
          "source_connection_id": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "source_account_generation": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "source_version": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "received_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ExternalOrderAddress": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "recipient_name",
          "street",
          "address_line_2",
          "comuna",
          "region",
          "phone"
        ],
        "properties": {
          "recipient_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "street": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "address_line_2": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "comuna": {
            "type": "string",
            "maxLength": 120,
            "x-max-utf8-bytes": 120,
            "minLength": 1
          },
          "region": {
            "type": "string",
            "maxLength": 120,
            "x-max-utf8-bytes": 120,
            "minLength": 1
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ExternalOrderLineInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "channel_listing_id",
          "quantity",
          "unit_price",
          "line_total"
        ],
        "properties": {
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "unit_price": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000,
            "description": "Actual positive native unit price before the line discount, in whole CLP. Do not invent a rounded effective unit price from a discounted line total."
          },
          "line_total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000,
            "description": "Actual final line amount after native line discounts, in whole CLP. May be zero; cannot exceed quantity multiplied by the actual pre-discount unit_price."
          }
        },
        "examples": [
          {
            "channel_listing_id": "listing_discount_example",
            "quantity": 2,
            "unit_price": 10000,
            "line_total": 17001
          },
          {
            "channel_listing_id": "listing_coupon_example",
            "quantity": 2,
            "unit_price": 10000,
            "line_total": 0
          }
        ]
      },
      "ExternalOrderLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "channel_listing_id",
          "quantity",
          "unit_price",
          "line_total",
          "inventory_item_id",
          "product_id",
          "variation_id",
          "sku",
          "product_name",
          "product_image_url",
          "variation_options"
        ],
        "properties": {
          "channel_listing_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "unit_price": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000000,
            "description": "Actual positive native unit price before the line discount, in whole CLP. Do not invent a rounded effective unit price from a discounted line total."
          },
          "line_total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000,
            "description": "Actual final line amount after native line discounts, in whole CLP. May be zero; cannot exceed quantity multiplied by the actual pre-discount unit_price."
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Opaque inventory identity. Persist this value instead of interpreting or constructing it."
          },
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "variation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "type": "string"
          },
          "product_image_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "variation_options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ExternalOrderUpsertRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_version",
          "source_updated_at",
          "status",
          "currency",
          "order_number",
          "lines",
          "shipping_total",
          "contact_email",
          "delivery_address"
        ],
        "properties": {
          "source_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "source_updated_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$",
            "description": "Canonical UTC timestamp ending in Z, no more than 10 minutes in the future."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "cancelled",
              "failed"
            ]
          },
          "currency": {
            "const": "CLP"
          },
          "order_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalOrderLineInput"
            },
            "minItems": 1,
            "maxItems": 20
          },
          "shipping_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "maxLength": 254
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalOrderAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Actual native creation timestamp. Required for new managed observations; absence in historical observations remains unknown."
          }
        }
      },
      "ExternalOrder": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "connection_id",
          "external_order_id",
          "moku_order_id",
          "source_version",
          "source_updated_at",
          "status",
          "currency",
          "order_number",
          "lines",
          "subtotal",
          "shipping_total",
          "total",
          "contact_email",
          "delivery_address",
          "inventory_effect",
          "inventory_authority",
          "fulfillment_authority",
          "reservation_id",
          "manual_review_required",
          "terminal_resolution",
          "terminal_resolved_at",
          "version",
          "created_at",
          "updated_at",
          "source_stock"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "external_order_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "moku_order_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "source_version": {
            "type": "string"
          },
          "source_updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "cancelled",
              "failed"
            ]
          },
          "currency": {
            "const": "CLP"
          },
          "order_number": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalOrderLine"
            }
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "shipping_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "contact_email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivery_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalOrderAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "inventory_effect": {
            "type": "string",
            "enum": [
              "reserved",
              "consumed",
              "released",
              "channel_managed"
            ]
          },
          "inventory_authority": {
            "type": "string",
            "enum": [
              "moku",
              "channel"
            ]
          },
          "fulfillment_authority": {
            "type": "string",
            "enum": [
              "moku",
              "channel"
            ]
          },
          "reservation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "manual_review_required": {
            "type": "boolean"
          },
          "terminal_resolution": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cancel_without_restock",
                  "cancel_and_restock"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "terminal_resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_stock": {
            "$ref": "#/components/schemas/OrderSourceStock"
          },
          "source_created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Actual native creation timestamp. Required for new managed observations; absence in historical observations remains unknown."
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "fulfillment_authority": {
                  "const": "moku"
                }
              }
            },
            "then": {
              "properties": {
                "shipping_total": {
                  "not": {
                    "type": "null"
                  }
                },
                "total": {
                  "not": {
                    "type": "null"
                  }
                },
                "contact_email": {
                  "not": {
                    "type": "null"
                  }
                },
                "delivery_address": {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "ExternalOrderTerminalResolutionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resolution",
          "expected_version"
        ],
        "properties": {
          "resolution": {
            "type": "string",
            "enum": [
              "cancel_without_restock",
              "cancel_and_restock"
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "ExternalOrderReservationRenewalRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "expires_in_seconds"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990,
            "description": "Current external-order version."
          },
          "expires_in_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 3600
          }
        }
      },
      "ExternalOrderReservationRenewal": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "external_order",
          "reservation"
        ],
        "properties": {
          "external_order": {
            "$ref": "#/components/schemas/ExternalOrder"
          },
          "reservation": {
            "$ref": "#/components/schemas/InventoryReservation"
          }
        }
      },
      "Shipment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "carrier",
          "carrier_name",
          "tracking_number"
        ],
        "properties": {
          "carrier": {
            "type": "string",
            "enum": [
              "chilexpress",
              "starken",
              "bluexpress",
              "correos_chile",
              "other"
            ]
          },
          "carrier_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "tracking_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "SellerOrderSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "order_number",
          "status",
          "fulfillment_version",
          "fulfillment_authority",
          "authority_connection_id",
          "manual_review_required",
          "item_count",
          "unit_count",
          "subtotal",
          "shipping_total",
          "total",
          "shipment",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "order_number": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "shipped",
              "delivered",
              "cancelled"
            ]
          },
          "fulfillment_version": {
            "type": "integer",
            "minimum": 0
          },
          "fulfillment_authority": {
            "type": "string",
            "enum": [
              "moku",
              "channel"
            ]
          },
          "authority_connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "manual_review_required": {
            "type": "boolean"
          },
          "item_count": {
            "type": "integer",
            "minimum": 1
          },
          "unit_count": {
            "type": "integer",
            "minimum": 1
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "shipping_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "shipment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Shipment"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "fulfillment_authority": {
                  "const": "moku"
                }
              }
            },
            "then": {
              "properties": {
                "shipping_total": {
                  "not": {
                    "type": "null"
                  }
                },
                "total": {
                  "not": {
                    "type": "null"
                  }
                }
              }
            }
          }
        ]
      },
      "SellerOrder": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "order_number",
          "status",
          "fulfillment_version",
          "fulfillment_authority",
          "authority_connection_id",
          "manual_review_required",
          "item_count",
          "unit_count",
          "subtotal",
          "shipping_total",
          "total",
          "shipment",
          "created_at",
          "updated_at",
          "parent_status",
          "lines",
          "delivery_address",
          "processing_at",
          "shipped_at",
          "delivered_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "order_number": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "shipped",
              "delivered",
              "cancelled"
            ]
          },
          "fulfillment_version": {
            "type": "integer",
            "minimum": 0
          },
          "fulfillment_authority": {
            "type": "string",
            "enum": [
              "moku",
              "channel"
            ]
          },
          "authority_connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "manual_review_required": {
            "type": "boolean"
          },
          "item_count": {
            "type": "integer",
            "minimum": 1
          },
          "unit_count": {
            "type": "integer",
            "minimum": 1
          },
          "subtotal": {
            "type": "integer",
            "minimum": 0
          },
          "shipping_total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "shipment": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Shipment"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "parent_status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "partial",
              "complete",
              "cancelled"
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SellerOrderLine"
            }
          },
          "delivery_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExternalOrderAddress"
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "shipped_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "fulfillment_authority": {
                  "const": "moku"
                }
              }
            },
            "then": {
              "properties": {
                "shipping_total": {
                  "not": {
                    "type": "null"
                  }
                },
                "total": {
                  "not": {
                    "type": "null"
                  }
                },
                "delivery_address": {
                  "type": "object",
                  "properties": {
                    "phone": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "FulfillmentTransitionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "target_status",
          "expected_version"
        ],
        "properties": {
          "target_status": {
            "type": "string",
            "enum": [
              "processing",
              "shipped",
              "delivered"
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 0
          },
          "authority_connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "shipment": {
            "$ref": "#/components/schemas/Shipment"
          }
        }
      },
      "SellerOrderLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "product_id",
          "variation_id",
          "sku",
          "product_name",
          "product_image_url",
          "variation_options",
          "quantity",
          "unit_price",
          "line_total"
        ],
        "properties": {
          "product_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "variation_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "product_name": {
            "type": "string"
          },
          "product_image_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "variation_options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "quantity": {
            "type": "integer",
            "minimum": 1
          },
          "unit_price": {
            "type": "integer",
            "minimum": 0
          },
          "line_total": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PlatformEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "type",
          "event_version",
          "vendor_id",
          "resource",
          "origin",
          "occurred_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "type": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+$",
            "x-known-values": [
              "product.created",
              "product.updated",
              "product.published",
              "product.unpublished",
              "product.archived",
              "product.restored",
              "inventory_item.adjusted",
              "inventory_item.reserved",
              "inventory_item.consumed",
              "inventory_item.released",
              "inventory_item.restocked",
              "inventory_item.reference_price_updated",
              "inventory_item.review_required",
              "inventory_reservation.created",
              "inventory_reservation.renewed",
              "inventory_reservation.committed",
              "inventory_reservation.released",
              "inventory_reservation.expired",
              "connection.created",
              "connection.updated",
              "connection.roles_changed",
              "connection.disconnected",
              "connection.reconnected",
              "channel_listing.created",
              "channel_listing.updated",
              "channel_listing.ended",
              "external_order.created",
              "external_order.updated",
              "external_order.reconciliation_required",
              "external_order.terminal_resolved",
              "external_order.reservation_renewed",
              "seller_order.paid",
              "seller_order.fulfillment_updated",
              "seller_order.cancelled",
              "webhook_subscription.created",
              "webhook_subscription.updated",
              "webhook_subscription.deleted",
              "webhook_subscription.secret_rotated",
              "sync_job.queued",
              "sync_job.succeeded",
              "sync_job.failed",
              "bulk_operation.queued",
              "bulk_operation.completed",
              "integration_conflict.created",
              "integration_conflict.updated",
              "integration_conflict.reopened",
              "integration_conflict.resolved",
              "stock_effect.created",
              "stock_effect.confirmed",
              "stock_effect.blocked"
            ]
          },
          "event_version": {
            "const": "1"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "resource": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "id",
              "version"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9._:-]+$"
              },
              "version": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "origin": {
            "type": "string"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookReplay": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "event_id",
          "replay_id",
          "status",
          "total",
          "delivered",
          "failed",
          "skipped"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "replay_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{48}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "skipped": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "WebhookSubscription": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "url",
          "event_types",
          "status",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100,
              "x-max-utf8-bytes": 100,
              "pattern": "^(?:\\*|[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+)$"
            },
            "minItems": 1,
            "maxItems": 30,
            "uniqueItems": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url",
          "event_types"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100,
              "x-max-utf8-bytes": 100,
              "pattern": "^(?:\\*|[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+)$"
            },
            "minItems": 1,
            "maxItems": 30,
            "uniqueItems": true
          }
        }
      },
      "CreatedWebhookSubscription": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "subscription",
          "signing_secret"
        ],
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/WebhookSubscription"
          },
          "signing_secret": {
            "type": "string",
            "pattern": "^whsec_"
          }
        }
      },
      "WebhookUpdateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url",
          "event_types",
          "status",
          "expected_version"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100,
              "x-max-utf8-bytes": 100,
              "pattern": "^(?:\\*|[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)+)$"
            },
            "minItems": 1,
            "maxItems": 30,
            "uniqueItems": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ]
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "SyncJob": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "connection_id",
          "kind",
          "mode",
          "status",
          "counts",
          "results",
          "created_at",
          "started_at",
          "completed_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "catalog_reconciliation",
              "inventory_reconciliation",
              "order_reconciliation"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "validate",
              "apply"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "counts": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "total",
              "succeeded",
              "failed"
            ],
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "succeeded": {
                "type": "integer",
                "minimum": 0
              },
              "failed": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "key",
                "status",
                "code",
                "detail"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "succeeded",
                    "failed"
                  ]
                },
                "code": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "detail": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SyncJobCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connection_id",
          "kind",
          "mode"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "catalog_reconciliation",
              "inventory_reconciliation",
              "order_reconciliation"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "validate",
              "apply"
            ]
          }
        }
      },
      "BulkOperationCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "items"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "const": "inventory_adjustment"
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/BulkInventoryAdjustment"
            }
          }
        }
      },
      "BulkInventoryAdjustment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "inventory_item_id",
          "body"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9._:-]+$",
            "description": "Unique within this batch; preserved in the result."
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 4,
            "maxLength": 1000,
            "pattern": "^[A-Za-z0-9_-]+$"
          },
          "body": {
            "$ref": "#/components/schemas/InventoryAdjustmentRequest"
          }
        }
      },
      "BulkOperationResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "inventory_item_id",
          "status",
          "data",
          "code",
          "detail"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "inventory_item_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "unknown",
              "not_attempted"
            ]
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InventoryItem"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "BulkOperationCounts": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "total",
          "succeeded",
          "failed",
          "pending",
          "unknown",
          "not_attempted"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "minimum": 1,
            "maximum": 25
          },
          "succeeded": {
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          },
          "pending": {
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          },
          "unknown": {
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          },
          "not_attempted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 25
          }
        }
      },
      "BulkOperation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "kind",
          "status",
          "counts",
          "results",
          "created_at",
          "started_at",
          "completed_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "vendor_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "const": "inventory_adjustment"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "completed_with_errors",
              "failed"
            ]
          },
          "counts": {
            "$ref": "#/components/schemas/BulkOperationCounts"
          },
          "results": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/BulkOperationResult"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "IntegrationConflict": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "connection_id",
          "resource_type",
          "external_id",
          "code",
          "detail",
          "status",
          "resolution",
          "version",
          "created_at",
          "resolved_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "resource_type": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]+$"
          },
          "external_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "code": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]+$"
          },
          "detail": {
            "type": "string",
            "maxLength": 1000
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "resolution": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ConflictCreateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "connection_id",
          "resource_type",
          "external_id",
          "code",
          "detail"
        ],
        "properties": {
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:-]+$"
          },
          "resource_type": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]+$"
          },
          "external_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9._:/-]+$"
          },
          "code": {
            "type": "string",
            "pattern": "^[A-Z][A-Z0-9_]+$"
          },
          "detail": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          }
        }
      },
      "ConflictResolveRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resolution",
          "expected_version"
        ],
        "properties": {
          "resolution": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "StockSourceTarget": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "provider",
              "product_id",
              "variation_id"
            ],
            "properties": {
              "provider": {
                "const": "woocommerce"
              },
              "product_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              },
              "variation_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "provider",
              "user_product_id",
              "location"
            ],
            "properties": {
              "provider": {
                "const": "mercadolibre"
              },
              "user_product_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "location": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "type"
                    ],
                    "properties": {
                      "type": {
                        "const": "selling_address"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "type",
                      "store_id",
                      "network_node_id"
                    ],
                    "properties": {
                      "type": {
                        "const": "seller_warehouse"
                      },
                      "store_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "network_node_id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      }
                    }
                  }
                ]
              }
            }
          }
        ]
      },
      "StockEffectCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "operation_id",
          "kind",
          "target",
          "delta",
          "before_quantity",
          "after_quantity",
          "expected_source_version",
          "credential_generation"
        ],
        "properties": {
          "operation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "debit",
              "restock"
            ]
          },
          "target": {
            "$ref": "#/components/schemas/StockSourceTarget"
          },
          "delta": {
            "type": "integer",
            "minimum": -1000000000,
            "maximum": 1000000000
          },
          "before_quantity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "after_quantity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "expected_source_version": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$",
            "description": "Monotonically increasing exact Int64 source version; never coerce to a JavaScript number."
          },
          "credential_generation": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        }
      },
      "StockEffectReceipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "operation_id",
          "source_version",
          "quantity",
          "delta"
        ],
        "properties": {
          "kind": {
            "const": "receipt"
          },
          "operation_id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "source_version": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$",
            "description": "Monotonically increasing exact Int64 source version; never coerce to a JavaScript number."
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "delta": {
            "type": "integer",
            "minimum": -1000000000,
            "maximum": 1000000000
          }
        }
      },
      "StockEffectApplicationProof": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/StockEffectReceipt"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "kind",
              "operation_id",
              "expected_source_version",
              "delta"
            ],
            "properties": {
              "kind": {
                "const": "accepted_write"
              },
              "operation_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "expected_source_version": {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]{0,18})$",
                "description": "Monotonically increasing exact Int64 source version; never coerce to a JavaScript number."
              },
              "delta": {
                "type": "integer",
                "minimum": -1000000000,
                "maximum": 1000000000
              }
            }
          }
        ]
      },
      "StockEffect": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "vendor_id",
          "kind",
          "origin",
          "inventory_item_id",
          "quantity",
          "source",
          "original_debit_id",
          "state",
          "complete",
          "next_action",
          "version",
          "command",
          "application_proof",
          "observation",
          "claim_expires_at",
          "last_error",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "vendor_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "kind": {
            "type": "string",
            "enum": [
              "observe",
              "debit",
              "restock"
            ]
          },
          "origin": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "connection_id",
              "listing_id",
              "external_order_id",
              "source_version"
            ],
            "properties": {
              "connection_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "listing_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "external_order_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "source_version": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              }
            }
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "source": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "connection_id",
              "account_generation",
              "target"
            ],
            "properties": {
              "connection_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              "account_generation": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              "target": {
                "$ref": "#/components/schemas/StockSourceTarget"
              }
            }
          },
          "original_debit_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "uncertain",
              "confirmed",
              "rejected",
              "blocked"
            ]
          },
          "complete": {
            "type": "boolean"
          },
          "next_action": {
            "type": "string",
            "enum": [
              "apply",
              "reconcile",
              "observe",
              "none"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "command": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StockEffectCommand"
              },
              {
                "type": "null"
              }
            ]
          },
          "application_proof": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StockEffectApplicationProof"
              },
              {
                "type": "null"
              }
            ]
          },
          "observation": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "source_version",
                  "quantity",
                  "observed_at"
                ],
                "properties": {
                  "source_version": {
                    "type": "string",
                    "pattern": "^(0|[1-9][0-9]{0,18})$",
                    "description": "Monotonically increasing exact Int64 source version; never coerce to a JavaScript number."
                  },
                  "quantity": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  "observed_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "claim_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "accounting_state": {
            "type": "string",
            "enum": [
              "reconciled"
            ],
            "description": "Separately reviewed stock accounting; the original provider application outcome is unchanged."
          }
        },
        "description": "An exact source operation with durable uncertainty. Confirmed application remains incomplete until a separately claimed fresh source observation. Receipt absence never authorizes another apply."
      },
      "StockEffectClaimRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_connection_id",
          "expected_version"
        ],
        "properties": {
          "source_connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          }
        }
      },
      "StockEffectClaim": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "effect",
          "claim_token",
          "expires_at"
        ],
        "properties": {
          "effect": {
            "$ref": "#/components/schemas/StockEffect"
          },
          "claim_token": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "StockEffectObservationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "claim_token",
          "expected_version",
          "quantity",
          "source_version"
        ],
        "properties": {
          "claim_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740990
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000000
          },
          "source_version": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$",
            "description": "Monotonically increasing exact Int64 source version; never coerce to a JavaScript number."
          }
        }
      },
      "StockEffectAcknowledgeRequest": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "claim_token",
              "expected_version",
              "outcome",
              "proof"
            ],
            "properties": {
              "claim_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "expected_version": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              "outcome": {
                "const": "confirmed"
              },
              "proof": {
                "$ref": "#/components/schemas/StockEffectReceipt"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "claim_token",
              "expected_version",
              "outcome",
              "code"
            ],
            "properties": {
              "claim_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "expected_version": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              "outcome": {
                "const": "rejected"
              },
              "code": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "claim_token",
              "expected_version",
              "outcome"
            ],
            "properties": {
              "claim_token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "expected_version": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740990
              },
              "outcome": {
                "const": "unknown"
              }
            }
          }
        ]
      },
      "StockObservationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "source_connection_id",
          "inventory_item_id",
          "observation_id"
        ],
        "properties": {
          "source_connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "inventory_item_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "observation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "OrderSourceStock": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "state",
          "connection_id",
          "effect_ids",
          "code"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "unmanaged",
              "not_required",
              "pending",
              "uncertain",
              "confirmed",
              "blocked",
              "reconciled"
            ]
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ]
          },
          "effect_ids": {
            "type": "array",
            "maxItems": 40,
            "items": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    },
    "responses": {
      "InvalidRequest": {
        "description": "The request or cursor is invalid.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "Unauthenticated": {
        "description": "The bearer token is missing, invalid, expired, revoked, or no longer owned by the vendor owner.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "InsufficientScope": {
        "description": "The token lacks the required scope.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "ResourceNotFound": {
        "description": "The requested resource was not found or was not granted to the credential.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "RateLimited": {
        "description": "The credential's vendor allocation exceeded its one-minute limit: 60 reads or 12 writes. Revoking and replacing a credential does not reset the window.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Authentication, catalog, inventory, or rate-limit state could not be checked safely.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "Conflict": {
        "description": "The resource version, idempotency key, state machine, or authority fence conflicts with the request.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "ProductSuccess": {
        "description": "Current catalog product",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "data"
              ],
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          }
        }
      },
      "ProductPageSuccess": {
        "description": "Catalog product page",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "data",
                "page"
              ],
              "properties": {
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Product"
                  }
                },
                "page": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          }
        }
      },
      "ProductConflict": {
        "description": "The idempotency key, product revision, slug, lifecycle state, or variation retirement conflicts with the request.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "InventoryConflict": {
        "description": "The idempotency key, version, or reservation floor conflicts with the request.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "BulkOperationResponse": {
        "description": "Durable bulk operation and historical results",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "data"
              ],
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/BulkOperation"
                }
              }
            }
          }
        }
      },
      "BulkOperationPageResponse": {
        "description": "Cursor-paginated bulk operations",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "data",
                "page"
              ],
              "properties": {
                "data": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BulkOperation"
                  }
                },
                "page": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            }
          }
        }
      }
    }
  }
}
