{
  "openapi": "3.1.0",
  "info": {
    "title": "Ready for Commerce API",
    "version": "1.0.0",
    "description": "The reference of every operation of the Ready for Commerce API. Every operation is in beta until launch."
  },
  "servers": [
    {
      "url": "https://app.readyforcommerce.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Credentials",
      "description": "The credential that calls: its organization, its permissions, its limits and the calls it may still make."
    },
    {
      "name": "Organization",
      "description": "The organization's settings: its name, slug and currency."
    },
    {
      "name": "Billing",
      "description": "The organization's subscription and each module's bill and cap, and this month's usage against its free allowance."
    },
    {
      "name": "Record types",
      "description": "The kinds of record the credential may import or export, with each one's fields and options."
    },
    {
      "name": "Imports",
      "description": "Bring CSV or Excel files in: upload or fetch a file, inspect and check it, then start the import and read its results."
    },
    {
      "name": "Files",
      "description": "An uploaded file's status, until it is ready or rejected."
    },
    {
      "name": "Exports",
      "description": "Export the records a filter matches to CSV or Excel files, kept 14 days."
    },
    {
      "name": "Export templates",
      "description": "Saved export setups, by name, to run the same export again."
    },
    {
      "name": "Jobs",
      "description": "Long work runs as a job: follow its state and progress, read its messages, download its files or cancel it."
    },
    {
      "name": "Search",
      "description": "Find the organization's records by words, a typo included, grouped by kind."
    },
    {
      "name": "Version history",
      "description": "A record's versions, newest first: compare one with another and restore the record to it."
    },
    {
      "name": "Incidents",
      "description": "The organization's problems you may see: mark them read or unread, and resolve them."
    },
    {
      "name": "Notifications",
      "description": "Your notifications, newest first: mark one read or unread, or all of them read."
    },
    {
      "name": "Saved views",
      "description": "A table's search, filters, order and columns saved under a name, yours or shared with the organization, and the view each table opens with for you."
    },
    {
      "name": "Store connections",
      "description": "The organization's stores, connected with their pasted keys: list them, connect one, reconnect it with new keys or disconnect it."
    },
    {
      "name": "Products",
      "description": "The organization's products with their options, variants and prices: list them, read one, create one, change one's content, its prices or its status, duplicate one as a draft, or delete one."
    }
  ],
  "paths": {
    "/api/v1/credential": {
      "get": {
        "operationId": "coreGetCredential",
        "summary": "Get the calling credential",
        "description": "Reads the calling credential: its organization, permissions, limits and the calls it may make now. It counts against no limit.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Credential"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Credentials"],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-credential",
          "metadata": {
            "sidebarTitle": "Get the calling credential"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/org": {
      "get": {
        "operationId": "coreGetOrg",
        "summary": "Get the organization",
        "description": "Reads the organization's settings: its name, slug and currency.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgSettings"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Organization"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-org",
          "metadata": {
            "sidebarTitle": "Get the organization"
          }
        }
      },
      "patch": {
        "operationId": "coreUpdateOrg",
        "summary": "Update the organization",
        "description": "Changes the organization's name or slug.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgSettings"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.slug_taken",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Organization"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-update-org",
          "metadata": {
            "sidebarTitle": "Update the organization"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/billing": {
      "get": {
        "operationId": "coreGetBilling",
        "summary": "Get the billing summary",
        "description": "Reads the organization's subscription, each module's projected bill and cap, the card's summary and any open invoice.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingSummary"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Billing"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-billing",
          "metadata": {
            "sidebarTitle": "Get the billing summary"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/billing/usage": {
      "get": {
        "operationId": "coreGetBillingUsage",
        "summary": "Get this month's usage",
        "description": "Reads this month's count of each module's units and what is left of their free allowance, without amounts.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingUsage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Billing"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-billing-usage",
          "metadata": {
            "sidebarTitle": "Get this month's usage"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/dataio/adapters": {
      "get": {
        "operationId": "coreListDataioAdapters",
        "summary": "List record types",
        "description": "Lists what the caller may import or export, with each kind’s fields and options.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataioAdapterPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Record types"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-dataio-adapters",
          "metadata": {
            "sidebarTitle": "List record types"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/dataio/adapters/{entity}": {
      "get": {
        "operationId": "coreGetDataioAdapter",
        "summary": "Get a record type",
        "description": "Reads one kind of record the caller may import or export, with how many of them the organization holds.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataioAdapterDetail"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Record types"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "entity",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-dataio-adapter",
          "metadata": {
            "sidebarTitle": "Get a record type"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports": {
      "get": {
        "operationId": "coreListImports",
        "summary": "List imports",
        "description": "Lists the organization's imports, newest first, with each one's file, state, counts and who started it. The search reads the file's name; the filter reads file, entity, mode, fields (how many it maps), state (active, succeeded, withErrors, failed or canceled) and its rows' success, warning, error and blocked counts.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "in": "query",
            "name": "withTotal",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-imports",
          "metadata": {
            "sidebarTitle": "List imports"
          }
        }
      },
      "post": {
        "operationId": "coreStartImport",
        "summary": "Start an import",
        "description": "Starts an import of an uploaded CSV or Excel file that creates or updates records, row by row.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStarted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.file_not_found",
                            "core.import_blocked",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.job_limit_reached",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartImportInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-start-import",
          "metadata": {
            "sidebarTitle": "Start an import"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports/uploads": {
      "post": {
        "operationId": "coreCreateImportUpload",
        "summary": "Create an upload URL",
        "description": "Gives a URL to upload a CSV or Excel file to with a PUT, for an import; complete the upload once its bytes are sent.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportUpload"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.file_type_not_allowed",
                            "core.file_too_large",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateImportUploadInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-create-import-upload",
          "metadata": {
            "sidebarTitle": "Create an upload URL"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports/uploads/{fileId}/complete": {
      "post": {
        "operationId": "coreCompleteImportUpload",
        "summary": "Complete an upload",
        "description": "Completes an import file’s upload once its bytes are sent, so it is checked; its file then turns ready or rejected.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`."
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.file_not_uploaded",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "fileId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-complete-import-upload",
          "metadata": {
            "sidebarTitle": "Complete an upload"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports/from-url": {
      "post": {
        "operationId": "coreFetchImportFile",
        "summary": "Fetch a file from a URL",
        "description": "Starts bringing a CSV or Excel file from a web address, to import it as an uploaded one; its job answers the file.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStarted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.file_type_not_allowed",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.job_limit_reached",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FetchImportFileInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-fetch-import-file",
          "metadata": {
            "sidebarTitle": "Fetch a file from a URL"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports/inspect": {
      "post": {
        "operationId": "coreInspectImport",
        "summary": "Inspect an import file",
        "description": "Starts a look at an uploaded import file: its worksheets, its header, its first rows and how many rows it has.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStarted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.file_not_found",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.job_limit_reached",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InspectImportInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-inspect-import",
          "metadata": {
            "sidebarTitle": "Inspect an import file"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports/precheck": {
      "post": {
        "operationId": "coreCheckImport",
        "summary": "Check an import",
        "description": "Starts the checks an import would meet with a file and a mapping: the rows that will warn and what blocks its start.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStarted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.file_not_found",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.job_limit_reached",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckImportInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-check-import",
          "metadata": {
            "sidebarTitle": "Check an import"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/imports/{jobId}/results": {
      "post": {
        "operationId": "coreStartImportResults",
        "summary": "Write an import's results",
        "description": "Starts writing an ended import's file with each row's result and message, as CSV or Excel; its job answers the file.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStarted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.job_not_found",
                            "core.import_not_ended",
                            "core.file_expired",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.job_limit_reached",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Imports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartImportResultsInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-start-import-results",
          "metadata": {
            "sidebarTitle": "Write an import's results"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/files/{fileId}": {
      "get": {
        "operationId": "coreGetFile",
        "summary": "Get a file's status",
        "description": "Reads an uploaded file's status, until it is ready or rejected.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadedFile"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.file_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Files"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "fileId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-file",
          "metadata": {
            "sidebarTitle": "Get a file's status"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/exports": {
      "get": {
        "operationId": "coreListExports",
        "summary": "List exports",
        "description": "Lists the organization's exports, newest first, with each one's file, state, format, size and who started it. The search reads the file's name; the filter reads file, entity (any of the entities it holds), fields (its columns), filters (its conditions), format, state (active, succeeded, failed or canceled) and rows (none until its file is written).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Exports"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "in": "query",
            "name": "withTotal",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-exports",
          "metadata": {
            "sidebarTitle": "List exports"
          }
        }
      },
      "post": {
        "operationId": "coreStartExport",
        "summary": "Start an export",
        "description": "Starts an export of the chosen fields of the records a filter matches, for one or more kinds of record of one module, to CSV or Excel files, gzipped or zipped on request and several kinds always in one zip, kept 14 days.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportStarted"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.dataio_adapter_not_found",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.job_limit_reached",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Exports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartExportInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-start-export",
          "metadata": {
            "sidebarTitle": "Start an export"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/exports/{jobId}": {
      "patch": {
        "operationId": "coreRenameExport",
        "summary": "Rename an export",
        "description": "Renames a finished export's file, keeping the extensions its file has, so its next download carries the new name.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportFileName"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.job_not_found",
                            "core.export_not_ready",
                            "core.file_expired",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Exports"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportFileNameInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-rename-export",
          "metadata": {
            "sidebarTitle": "Rename an export"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/exports/templates": {
      "get": {
        "operationId": "coreListExportTemplates",
        "summary": "List export templates",
        "description": "Lists the organization's saved export templates of one module, by name, each with the export setup it holds.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportTemplatePage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Export templates"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["core", "integrations", "catalog", "pricing"],
              "examples": ["core"]
            },
            "in": "query",
            "name": "module",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-export-templates",
          "metadata": {
            "sidebarTitle": "List export templates"
          }
        }
      },
      "post": {
        "operationId": "coreCreateExportTemplate",
        "summary": "Create an export template",
        "description": "Saves an export setup (its kinds of record, columns, filters and options) as a template under a name unique in the organization.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportTemplate"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.template_name_taken",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Export templates"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExportTemplateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-create-export-template",
          "metadata": {
            "sidebarTitle": "Create an export template"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/exports/templates/{templateId}": {
      "patch": {
        "operationId": "coreUpdateExportTemplate",
        "summary": "Update an export template",
        "description": "Renames a saved export template, changes the export setup it holds, or both.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportTemplate"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.template_not_found",
                            "core.template_name_taken",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Export templates"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateExportTemplateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "templateId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-update-export-template",
          "metadata": {
            "sidebarTitle": "Update an export template"
          }
        }
      },
      "delete": {
        "operationId": "coreDeleteExportTemplate",
        "summary": "Delete an export template",
        "description": "Deletes a saved export template; the exports made with it stay as they are.",
        "responses": {
          "204": {
            "description": "No content"
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.template_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Export templates"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "templateId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-delete-export-template",
          "metadata": {
            "sidebarTitle": "Delete an export template"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/jobs/{jobId}": {
      "get": {
        "operationId": "coreGetJob",
        "summary": "Get a job",
        "description": "Reads a job's state and progress.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.job_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Jobs"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-job",
          "metadata": {
            "sidebarTitle": "Get a job"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/jobs/{jobId}/messages": {
      "get": {
        "operationId": "coreListJobMessages",
        "summary": "List a job's messages",
        "description": "Lists a job's messages, page by page.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobMessagePage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.job_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Jobs"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "in": "query",
            "name": "withTotal",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-job-messages",
          "metadata": {
            "sidebarTitle": "List a job's messages"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/jobs/{jobId}/files/{file}": {
      "get": {
        "operationId": "coreGetJobFile",
        "summary": "Get a job's file link",
        "description": "Gives a 5-minute link to download a job's input or output file.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobFile"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.job_not_found",
                            "core.file_expired",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Jobs"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "enum": ["input", "output"],
              "examples": ["input"]
            },
            "in": "path",
            "name": "file",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-job-file",
          "metadata": {
            "sidebarTitle": "Get a job's file link"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/jobs/{jobId}/cancel": {
      "post": {
        "operationId": "coreCancelJob",
        "summary": "Cancel a job",
        "description": "Cancels a job that is still running.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.job_not_found",
                            "core.job_ended",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Jobs"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "jobId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-cancel-job",
          "metadata": {
            "sidebarTitle": "Cancel a job"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/search": {
      "get": {
        "operationId": "coreSearch",
        "summary": "Search records",
        "description": "Finds the organization's records by words, a typo included, grouped by kind.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Search"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "in": "query",
            "name": "q",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^(core|integrations|catalog|pricing)\\.[\\s\\S]{0,}$"
            },
            "in": "query",
            "name": "kind",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-search",
          "metadata": {
            "sidebarTitle": "Search records"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/history": {
      "get": {
        "operationId": "coreListVersions",
        "summary": "List a record's versions",
        "description": "Lists a record's versions, newest first.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionList"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.history_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Version history"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^(core|integrations|catalog|pricing)\\.[\\s\\S]{0,}$"
            },
            "in": "query",
            "name": "type",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "id",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-versions",
          "metadata": {
            "sidebarTitle": "List a record's versions"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/history/{versionId}": {
      "get": {
        "operationId": "coreGetVersion",
        "summary": "Compare a version",
        "description": "Reads a version's state beside the version it is compared with, by default the one before it.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionComparison"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.history_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Version history"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "query",
            "name": "against",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "versionId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-get-version",
          "metadata": {
            "sidebarTitle": "Compare a version"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/history/{versionId}/restore": {
      "post": {
        "operationId": "coreRestoreVersion",
        "summary": "Restore a version",
        "description": "Restores a record to one of its versions.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoreResult"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.history_not_found",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Version history"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedVersion": {
                    "type": "integer"
                  }
                },
                "required": ["expectedVersion"]
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "versionId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-restore-version",
          "metadata": {
            "sidebarTitle": "Restore a version"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/incidents": {
      "get": {
        "operationId": "coreListIncidents",
        "summary": "List incidents",
        "description": "Lists the organization's problems you may see.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncidentPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Incidents"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "in": "query",
            "name": "withTotal",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-incidents",
          "metadata": {
            "sidebarTitle": "List incidents"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/incidents/{incidentId}/read": {
      "put": {
        "operationId": "coreMarkIncident",
        "summary": "Mark an incident read or unread",
        "description": "Marks one of the organization's problems read or unread for you.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.incident_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Incidents"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkIncidentInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "incidentId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-mark-incident",
          "metadata": {
            "sidebarTitle": "Mark an incident read or unread"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/incidents/{incidentId}/resolve": {
      "post": {
        "operationId": "coreResolveIncident",
        "summary": "Resolve an incident",
        "description": "Resolves one of the organization's problems.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Incident"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.incident_not_found",
                            "core.incident_resolved",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Incidents"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "incidentId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-resolve-incident",
          "metadata": {
            "sidebarTitle": "Resolve an incident"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/notifications": {
      "get": {
        "operationId": "coreListNotifications",
        "summary": "List notifications",
        "description": "Lists your notifications, newest first.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Notifications"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "in": "query",
            "name": "withTotal",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-notifications",
          "metadata": {
            "sidebarTitle": "List notifications"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/notifications/{notificationId}/read": {
      "put": {
        "operationId": "coreMarkNotification",
        "summary": "Mark a notification read or unread",
        "description": "Marks one of your notifications read or unread.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.notification_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Notifications"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkNotificationInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "notificationId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-mark-notification",
          "metadata": {
            "sidebarTitle": "Mark a notification read or unread"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/notifications/read": {
      "post": {
        "operationId": "coreMarkAllNotificationsRead",
        "summary": "Mark all read",
        "description": "Marks all your notifications and the problems you see read.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkedAllRead"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Notifications"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-mark-all-notifications-read",
          "metadata": {
            "sidebarTitle": "Mark all read"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/views": {
      "get": {
        "operationId": "coreListViews",
        "summary": "List saved views",
        "description": "Lists the saved views of a table you may read (resource: core.imports or core.exports), yours and every shared one, by name: each with whether it is shared, the search, filters, order and columns it keeps, and whether it is yours.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.view_resource_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Saved views"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "in": "query",
            "name": "resource",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-list-views",
          "metadata": {
            "sidebarTitle": "List saved views"
          }
        }
      },
      "post": {
        "operationId": "coreCreateView",
        "summary": "Create a saved view",
        "description": "Saves what a table shows (its search, filters, order and columns) as a named view of yours, private or shared with the organization. Its filter and order read the table's fields: core.imports' file, entity, mode, fields, state (active, succeeded, withErrors, failed or canceled), success, warning, error and blocked; core.exports' file, entity, fields, filters, format, state (active, succeeded, failed or canceled) and rows.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.view_resource_not_found",
                            "core.view_unreadable",
                            "core.view_name_taken",
                            "core.view_needs_person",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Saved views"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateViewInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-create-view",
          "metadata": {
            "sidebarTitle": "Create a saved view"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/views/default": {
      "put": {
        "operationId": "coreSetDefaultView",
        "summary": "Set a table's default view",
        "description": "Sets the saved view a table (resource: core.imports or core.exports) opens with for you, any view of it you see, yours or a shared one, or clears it with viewId null.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DefaultView"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.view_resource_not_found",
                            "core.view_not_found",
                            "core.view_needs_person",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Saved views"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultViewInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-set-default-view",
          "metadata": {
            "sidebarTitle": "Set a table's default view"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/core/views/{viewId}": {
      "patch": {
        "operationId": "coreUpdateView",
        "summary": "Update a saved view",
        "description": "Changes a saved view of yours: renames it, shares it with the organization or makes it private again (which takes it off the others' default), or saves over the search, filters, order and columns it keeps.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/View"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.view_not_found",
                            "core.view_resource_not_found",
                            "core.view_needs_person",
                            "core.view_not_owner",
                            "core.view_unreadable",
                            "core.view_name_taken",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Saved views"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateViewInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "viewId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-update-view",
          "metadata": {
            "sidebarTitle": "Update a saved view"
          }
        }
      },
      "delete": {
        "operationId": "coreDeleteView",
        "summary": "Delete a saved view",
        "description": "Deletes a saved view of yours; whoever had it as the view their table opens with gets none.",
        "responses": {
          "204": {
            "description": "No content"
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.view_not_found",
                            "core.view_resource_not_found",
                            "core.view_needs_person",
                            "core.view_not_owner",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Saved views"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "viewId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/core-delete-view",
          "metadata": {
            "sidebarTitle": "Delete a saved view"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/integrations/connections": {
      "get": {
        "operationId": "integrationsListConnections",
        "summary": "List store connections",
        "description": "Lists the organization's store connections.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Store connections"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/integrations-list-connections",
          "metadata": {
            "sidebarTitle": "List store connections"
          }
        }
      },
      "post": {
        "operationId": "integrationsConnectStore",
        "summary": "Connect a store",
        "description": "Connects a store with its pasted keys, after a live test.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "integrations.provider_not_available",
                            "integrations.credentials_refused",
                            "integrations.provider_unavailable",
                            "integrations.currency_mismatch",
                            "integrations.already_connected_here",
                            "integrations.connected_elsewhere",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Store connections"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectStoreInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/integrations-connect-store",
          "metadata": {
            "sidebarTitle": "Connect a store"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/integrations/connections/{connectionId}/credentials": {
      "put": {
        "operationId": "integrationsReconnectStore",
        "summary": "Reconnect a store",
        "description": "Reconnects a store with new pasted keys, keeping its connection and settings.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "integrations.connection_not_found",
                            "integrations.provider_not_available",
                            "integrations.credentials_refused",
                            "integrations.provider_unavailable",
                            "integrations.reconnect_other_account",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Store connections"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconnectStoreInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "connectionId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/integrations-reconnect-store",
          "metadata": {
            "sidebarTitle": "Reconnect a store"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/integrations/connections/{connectionId}": {
      "delete": {
        "operationId": "integrationsDisconnectStore",
        "summary": "Disconnect a store",
        "description": "Disconnects a store and deletes everything that came from it, touching nothing in the store.",
        "responses": {
          "202": {
            "description": "Accepted: the job started. Follow it by its `jobId`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "integrations.connection_not_found",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Store connections"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "connectionId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/integrations-disconnect-store",
          "metadata": {
            "sidebarTitle": "Disconnect a store"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/catalog/products": {
      "get": {
        "operationId": "catalogListProducts",
        "summary": "List products",
        "description": "Lists the organization's products, the most recently changed first, with each one's title, slug, status and number of variants. The search reads the title; the filter reads status (draft, active, unlisted or archived); the sort reads updatedAt or title.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPage"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "q",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false
          },
          {
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "in": "query",
            "name": "limit",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": ["true"]
            },
            "in": "query",
            "name": "withTotal",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-list-products",
          "metadata": {
            "sidebarTitle": "List products"
          }
        }
      },
      "post": {
        "operationId": "catalogCreateProduct",
        "summary": "Create a product",
        "description": "Creates a product with its options and its variants, each variant one combination of the option values with its identifiers: SKU, GTIN, ISBN, part number (mpn) and custom codes with their label, a GTIN's and an ISBN's check digit verified, each SKU, GTIN and ISBN unique in the organization. Each variant may also take its price, compare-at price, MAP, MSRP and costs as decimal strings in the organization's currency, which needs the permission to edit prices, and is refused when they break a price rule, such as a compare-at price below the price. The answer holds the product and the save's warnings, such as a part number that differs from another product's only in punctuation, such as hyphens or spaces, or a price below MAP.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductSaved"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "catalog.no_variants",
                            "catalog.option_without_values",
                            "catalog.option_repeated",
                            "catalog.option_value_repeated",
                            "catalog.variant_option_values",
                            "catalog.variant_repeated",
                            "catalog.variant_limit",
                            "catalog.slug_empty",
                            "catalog.slug_taken",
                            "catalog.identifier_invalid",
                            "catalog.identifier_repeated",
                            "catalog.identifier_taken",
                            "catalog.price_invalid",
                            "catalog.price_out_of_range",
                            "catalog.compare_below_price",
                            "catalog.price_below_cost",
                            "catalog.map_above_msrp",
                            "catalog.measure_out_of_range",
                            "catalog.hs_code_invalid",
                            "catalog.country_invalid",
                            "catalog.stock_untracked",
                            "core.usage_limit_reached",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-create-product",
          "metadata": {
            "sidebarTitle": "Create a product"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/catalog/products/{productId}": {
      "get": {
        "operationId": "catalogGetProduct",
        "summary": "Get a product",
        "description": "Gets one product with its options, their values and its variants, each variant with its identifiers in their order (SKU, GTIN, ISBN, part number (mpn) and custom codes with their label), its currency, and its prices and costs as decimal strings in that currency, null where it has none.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-get-product",
          "metadata": {
            "sidebarTitle": "Get a product"
          }
        }
      },
      "patch": {
        "operationId": "catalogUpdateProduct",
        "summary": "Update a product",
        "description": "Changes a product's title, slug, condition, product type, SEO texts, options or variants, only the fields sent, with the version it was read at: a product saved since then is refused. Options and variants are each sent whole, those kept with their ids: one left out is removed, and removing a variant also needs the permission to delete variants. A variant's identifiers, when sent, replace its codes whole, and a SKU, GTIN or ISBN another variant of the organization holds is refused. The answer holds the product and the save's warnings, such as a part number that differs from another product's only in punctuation, such as hyphens or spaces.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductSaved"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "catalog.no_variants",
                            "catalog.option_without_values",
                            "catalog.option_repeated",
                            "catalog.option_value_repeated",
                            "catalog.option_unknown",
                            "catalog.variant_option_values",
                            "catalog.variant_repeated",
                            "catalog.variant_unknown",
                            "catalog.variant_limit",
                            "catalog.slug_empty",
                            "catalog.slug_taken",
                            "catalog.identifier_invalid",
                            "catalog.identifier_repeated",
                            "catalog.identifier_taken",
                            "catalog.measure_out_of_range",
                            "catalog.hs_code_invalid",
                            "catalog.country_invalid",
                            "catalog.stock_untracked",
                            "core.usage_limit_reached",
                            "core.version_conflict",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-update-product",
          "metadata": {
            "sidebarTitle": "Update a product"
          }
        }
      },
      "delete": {
        "operationId": "catalogDeleteProduct",
        "summary": "Delete a product",
        "description": "Deletes a product for good with all its variants, and releases its listings in every store; it cannot be undone.",
        "responses": {
          "204": {
            "description": "No content"
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-delete-product",
          "metadata": {
            "sidebarTitle": "Delete a product"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/catalog/products/free-sku": {
      "get": {
        "operationId": "catalogGetFreeSku",
        "summary": "Get a free SKU",
        "description": "Gets a SKU no variant of the organization holds, three letters, three digits and three letters such as KMT-472-BXR, to give a new or changed variant; it is not reserved, so a save that finds it taken by then is refused.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreeSku"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-get-free-sku",
          "metadata": {
            "sidebarTitle": "Get a free SKU"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/catalog/products/{productId}/prices": {
      "patch": {
        "operationId": "catalogUpdateProductPrices",
        "summary": "Update a product's prices",
        "description": "Changes the price, compare-at price, MAP, MSRP and on-hand, supplier and fallback costs of the product's variants it names by id, as decimal strings in each variant's currency such as 19.99, null clearing one, with the version the product was read at; a compare-at price below the price, a price below the cost (the on-hand cost, else the supplier's) and a MAP above the MSRP are refused when the change sets one of their prices, and the answer warns of the other rules the prices break.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductSaved"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "catalog.variant_unknown",
                            "catalog.price_invalid",
                            "catalog.price_out_of_range",
                            "catalog.compare_below_price",
                            "catalog.price_below_cost",
                            "catalog.map_above_msrp",
                            "core.version_conflict",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductPricesUpdateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-update-product-prices",
          "metadata": {
            "sidebarTitle": "Update a product's prices"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/catalog/products/{productId}/status": {
      "put": {
        "operationId": "catalogSetProductStatus",
        "summary": "Set a product's status",
        "description": "Sets a product's status to draft, active, unlisted or archived, from any other, with the version it was read at: a product saved since then is refused, and setting the status it already has changes nothing.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductSaved"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "core.version_conflict",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductStatusUpdateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-set-product-status",
          "metadata": {
            "sidebarTitle": "Set a product's status"
          }
        }
      }
    },
    "/api/v1/orgs/{orgId}/catalog/products/{productId}/duplicate": {
      "post": {
        "operationId": "catalogDuplicateProduct",
        "summary": "Duplicate a product",
        "description": "Copies a product as a new draft, its title followed by (Copy), then (Copy 2) and so on, with its description, its options and its variants with their prices, costs, measures and stock settings but without their identifiers, to start a similar product from one that exists.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "default": {
            "description": "An error, as `application/problem+json`: its `code` says what went wrong and `params` holds its values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Problem"
                    },
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "catalog.slug_taken",
                            "core.usage_limit_reached",
                            "core.idempotency_in_progress",
                            "core.idempotency_mismatch",
                            "core.bad_request",
                            "core.invalid_credential",
                            "core.forbidden",
                            "core.module_not_enabled",
                            "core.module_read_only",
                            "core.not_found",
                            "core.conflict",
                            "core.org_deletion_scheduled",
                            "core.payload_too_large",
                            "core.unsupported_media_type",
                            "core.validation_failed",
                            "core.rate_limited",
                            "core.surface_disabled",
                            "core.internal",
                            "core.unavailable"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": ["Products"],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "orgId",
            "required": true
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "x-stability-level": "beta",
        "x-rfc-action": "direct",
        "x-mint": {
          "href": "/api-reference/catalog-duplicate-product",
          "metadata": {
            "sidebarTitle": "Duplicate a product"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UpdateOrgInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "slug": {
            "type": "string",
            "minLength": 3,
            "maxLength": 48,
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
          }
        },
        "additionalProperties": false
      },
      "CreateViewInput": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30
          },
          "visibility": {
            "type": "string",
            "enum": ["private", "org"],
            "examples": ["private"]
          },
          "state": {
            "type": "object",
            "properties": {
              "question": {
                "type": "object",
                "properties": {
                  "search": {
                    "type": "string"
                  },
                  "filter": {
                    "type": "object",
                    "properties": {
                      "items": {
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "op": {
                              "type": "string"
                            },
                            "value": {}
                          },
                          "required": ["field", "op"]
                        }
                      },
                      "logic": {
                        "type": "string",
                        "enum": ["and", "or"],
                        "examples": ["and"]
                      }
                    },
                    "required": ["items", "logic"]
                  },
                  "sort": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": ["asc", "desc"],
                        "examples": ["asc"]
                      }
                    },
                    "required": ["field", "direction"]
                  }
                }
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hide": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["question"],
            "additionalProperties": false
          }
        },
        "required": ["resource", "name", "visibility", "state"]
      },
      "UpdateViewInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30
          },
          "visibility": {
            "type": "string",
            "enum": ["private", "org"]
          },
          "state": {
            "type": "object",
            "properties": {
              "question": {
                "type": "object",
                "properties": {
                  "search": {
                    "type": "string"
                  },
                  "filter": {
                    "type": "object",
                    "properties": {
                      "items": {
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "op": {
                              "type": "string"
                            },
                            "value": {}
                          },
                          "required": ["field", "op"]
                        }
                      },
                      "logic": {
                        "type": "string",
                        "enum": ["and", "or"],
                        "examples": ["and"]
                      }
                    },
                    "required": ["items", "logic"]
                  },
                  "sort": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": ["asc", "desc"],
                        "examples": ["asc"]
                      }
                    },
                    "required": ["field", "direction"]
                  }
                }
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hide": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["question"],
            "additionalProperties": false
          }
        }
      },
      "DefaultViewInput": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "minLength": 1
          },
          "viewId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["resource", "viewId"]
      },
      "StartImportInput": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "fileId": {
            "type": "string",
            "format": "uuid"
          },
          "worksheet": {
            "type": "string",
            "minLength": 1
          },
          "hasHeader": {
            "type": "boolean"
          },
          "mode": {
            "type": "string",
            "enum": ["create", "update", "clean", "delete"],
            "examples": ["create"]
          },
          "mapping": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "matchBy": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "pairs": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "target": {
                        "type": "string"
                      },
                      "column": {
                        "type": "string"
                      }
                    },
                    "required": ["target", "column"]
                  }
                }
              },
              "required": ["pairs"]
            }
          },
          "cleanFields": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": ["entity", "fileId", "hasHeader", "mode", "mapping", "matchBy", "options"]
      },
      "StartExportInput": {
        "type": "object",
        "properties": {
          "entities": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "entity": {
                  "type": "string"
                },
                "columns": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "question": {
                  "type": "object",
                  "properties": {
                    "search": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "op": {
                                "type": "string"
                              },
                              "value": {}
                            },
                            "required": ["field", "op"]
                          }
                        },
                        "logic": {
                          "type": "string",
                          "enum": ["and", "or"],
                          "examples": ["and"]
                        }
                      },
                      "required": ["items", "logic"]
                    },
                    "sort": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": ["asc", "desc"],
                          "examples": ["asc"]
                        }
                      },
                      "required": ["field", "direction"]
                    }
                  }
                }
              },
              "required": ["entity", "columns", "question"]
            }
          },
          "format": {
            "type": "string",
            "enum": ["csv", "xlsx"],
            "examples": ["csv"]
          },
          "delimiter": {
            "default": ",",
            "type": "string",
            "enum": [",", ";", "\t", "|"]
          },
          "dateFormat": {
            "default": "sql",
            "type": "string",
            "enum": ["sql", "iso"]
          },
          "compression": {
            "default": "none",
            "type": "string",
            "enum": ["none", "gzip", "zip"]
          },
          "listSeparator": {
            "default": "|",
            "type": "string",
            "minLength": 1,
            "maxLength": 3
          },
          "systemFields": {
            "default": false,
            "type": "boolean"
          },
          "fileName": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": ["entities", "format"]
      },
      "ExportDefinitionInput": {
        "type": "object",
        "properties": {
          "entities": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "entity": {
                  "type": "string"
                },
                "columns": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "question": {
                  "type": "object",
                  "properties": {
                    "search": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "op": {
                                "type": "string"
                              },
                              "value": {}
                            },
                            "required": ["field", "op"]
                          }
                        },
                        "logic": {
                          "type": "string",
                          "enum": ["and", "or"],
                          "examples": ["and"]
                        }
                      },
                      "required": ["items", "logic"]
                    },
                    "sort": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": ["asc", "desc"],
                          "examples": ["asc"]
                        }
                      },
                      "required": ["field", "direction"]
                    }
                  }
                }
              },
              "required": ["entity", "columns", "question"]
            }
          },
          "format": {
            "type": "string",
            "enum": ["csv", "xlsx"],
            "examples": ["csv"]
          },
          "delimiter": {
            "default": ",",
            "type": "string",
            "enum": [",", ";", "\t", "|"]
          },
          "dateFormat": {
            "default": "sql",
            "type": "string",
            "enum": ["sql", "iso"]
          },
          "compression": {
            "default": "none",
            "type": "string",
            "enum": ["none", "gzip", "zip"]
          },
          "listSeparator": {
            "default": "|",
            "type": "string",
            "minLength": 1,
            "maxLength": 3
          },
          "systemFields": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": ["entities", "format"]
      },
      "CreateExportTemplateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "definition": {
            "$ref": "#/components/schemas/ExportDefinitionInput"
          }
        },
        "required": ["name", "definition"]
      },
      "UpdateExportTemplateInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "definition": {
            "$ref": "#/components/schemas/ExportDefinitionInput"
          }
        }
      },
      "ExportFileNameInput": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          }
        },
        "required": ["fileName"]
      },
      "FetchImportFileInput": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": ["entity", "url"]
      },
      "CreateImportUploadInput": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "size": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["entity", "name", "size"]
      },
      "StartImportResultsInput": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": ["csv", "xlsx"],
            "examples": ["csv"]
          }
        },
        "required": ["format"]
      },
      "InspectImportInput": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "fileId": {
            "type": "string",
            "format": "uuid"
          },
          "worksheet": {
            "type": "string",
            "minLength": 1
          },
          "hasHeader": {
            "type": "boolean"
          }
        },
        "required": ["entity", "fileId"]
      },
      "CheckImportInput": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "fileId": {
            "type": "string",
            "format": "uuid"
          },
          "worksheet": {
            "type": "string",
            "minLength": 1
          },
          "hasHeader": {
            "type": "boolean"
          },
          "mode": {
            "type": "string",
            "enum": ["create", "update", "clean", "delete"],
            "examples": ["create"]
          },
          "mapping": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": ["entity", "fileId", "hasHeader", "mode", "mapping"]
      },
      "MarkIncidentInput": {
        "type": "object",
        "properties": {
          "read": {
            "type": "boolean"
          }
        },
        "required": ["read"]
      },
      "MarkNotificationInput": {
        "type": "object",
        "properties": {
          "read": {
            "type": "boolean"
          }
        },
        "required": ["read"]
      },
      "ProductCreateInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "status": {
            "default": "draft",
            "type": "string",
            "enum": ["draft", "active", "unlisted", "archived"]
          },
          "condition": {
            "default": "new",
            "type": "string",
            "enum": [
              "new",
              "open_box",
              "new_with_defects",
              "used",
              "used_like_new",
              "used_very_good",
              "used_good",
              "used_acceptable",
              "refurbished",
              "collectible_like_new",
              "collectible_very_good",
              "collectible_good",
              "collectible_acceptable",
              "for_parts_or_not_working"
            ]
          },
          "productType": {
            "type": "string",
            "maxLength": 100
          },
          "descriptionHtml": {
            "type": "string",
            "description": "The product's description in HTML, which keeps paragraphs, headings, lists and task lists, quotes, code blocks, images, tables, rules, line breaks, links, bold, italic, underline, strikethrough, subscript, superscript, text colour, highlight, alignment, and YouTube, Vimeo or video embeds. Anything else, such as a script, an event attribute or another site's frame, is removed and its text kept; a description left with nothing is saved as none."
          },
          "metaTitle": {
            "type": "string",
            "maxLength": 200
          },
          "metaDescription": {
            "type": "string",
            "maxLength": 300
          },
          "options": {
            "default": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 150
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 150
                  }
                }
              },
              "required": ["name", "values"]
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "optionValues": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 150
                  }
                },
                "identifiers": {
                  "default": [],
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": ["sku", "gtin", "isbn", "mpn"],
                            "examples": ["sku"]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": ["type", "value"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "value": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          }
                        },
                        "required": ["type", "value", "label"],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "price": {
                  "type": "string",
                  "maxLength": 40
                },
                "compareAt": {
                  "type": "string",
                  "maxLength": 40
                },
                "map": {
                  "type": "string",
                  "maxLength": 40
                },
                "msrp": {
                  "type": "string",
                  "maxLength": 40
                },
                "onHandCost": {
                  "type": "string",
                  "maxLength": 40
                },
                "supplierCost": {
                  "type": "string",
                  "maxLength": 40
                },
                "fallbackCost": {
                  "type": "string",
                  "maxLength": 40
                },
                "productWeight": {
                  "description": "The product's own weight, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["g", "kg", "oz", "lb", "ct"],
                      "examples": ["g"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "productLength": {
                  "description": "The product's own length, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["mm", "cm", "in", "yd"],
                      "examples": ["mm"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "productWidth": {
                  "description": "The product's own width, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["mm", "cm", "in", "yd"],
                      "examples": ["mm"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "productHeight": {
                  "description": "The product's own height, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["mm", "cm", "in", "yd"],
                      "examples": ["mm"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "shippingWeight": {
                  "description": "The weight it ships with, packed, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["g", "kg", "oz", "lb", "ct"],
                      "examples": ["g"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "shippingLength": {
                  "description": "The length of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["mm", "cm", "in", "yd"],
                      "examples": ["mm"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "shippingWidth": {
                  "description": "The width of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["mm", "cm", "in", "yd"],
                      "examples": ["mm"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "shippingHeight": {
                  "description": "The height of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number",
                      "minimum": 0
                    },
                    "unit": {
                      "type": "string",
                      "enum": ["mm", "cm", "in", "yd"],
                      "examples": ["mm"]
                    }
                  },
                  "required": ["value", "unit"],
                  "additionalProperties": false
                },
                "countryOfOrigin": {
                  "type": "string",
                  "maxLength": 100,
                  "description": "The country it is made in, as its two-letter ISO 3166-1 code such as MX, in any case."
                },
                "hsCode": {
                  "type": "string",
                  "maxLength": 100,
                  "description": "Its Harmonized System customs code: 6 to 13 digits, once every other character, such as dots, spaces and hyphens, is removed."
                },
                "trackInventory": {
                  "type": "boolean",
                  "description": "Whether its stock is tracked; a variant no longer tracked has none of its three stocks."
                },
                "fallbackStock": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647,
                  "description": "The stock it falls back on when it has none on hand or at its supplier, for a tracked variant only; one tracked without it has 0."
                }
              },
              "required": ["optionValues"]
            }
          }
        },
        "required": ["title", "variants"]
      },
      "ProductUpdateInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "open_box",
              "new_with_defects",
              "used",
              "used_like_new",
              "used_very_good",
              "used_good",
              "used_acceptable",
              "refurbished",
              "collectible_like_new",
              "collectible_very_good",
              "collectible_good",
              "collectible_acceptable",
              "for_parts_or_not_working"
            ]
          },
          "productType": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "descriptionHtml": {
            "anyOf": [
              {
                "type": "string",
                "description": "The product's description in HTML, which keeps paragraphs, headings, lists and task lists, quotes, code blocks, images, tables, rules, line breaks, links, bold, italic, underline, strikethrough, subscript, superscript, text colour, highlight, alignment, and YouTube, Vimeo or video embeds. Anything else, such as a script, an event attribute or another site's frame, is removed and its text kept; a description left with nothing is saved as none."
              },
              {
                "type": "null"
              }
            ]
          },
          "metaTitle": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "metaDescription": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 150
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 150
                      }
                    },
                    "required": ["name"]
                  }
                }
              },
              "required": ["name", "values"]
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "optionValues": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 150
                  }
                },
                "identifiers": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": ["sku", "gtin", "isbn", "mpn"],
                            "examples": ["sku"]
                          },
                          "value": {
                            "type": "string"
                          }
                        },
                        "required": ["type", "value"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "value": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 50
                          }
                        },
                        "required": ["type", "value", "label"],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "productWeight": {
                  "description": "The product's own weight, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["g", "kg", "oz", "lb", "ct"],
                          "examples": ["g"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "productLength": {
                  "description": "The product's own length, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"],
                          "examples": ["mm"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "productWidth": {
                  "description": "The product's own width, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"],
                          "examples": ["mm"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "productHeight": {
                  "description": "The product's own height, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"],
                          "examples": ["mm"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shippingWeight": {
                  "description": "The weight it ships with, packed, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["g", "kg", "oz", "lb", "ct"],
                          "examples": ["g"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shippingLength": {
                  "description": "The length of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"],
                          "examples": ["mm"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shippingWidth": {
                  "description": "The width of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"],
                          "examples": ["mm"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "shippingHeight": {
                  "description": "The height of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none.",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"],
                          "examples": ["mm"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "countryOfOrigin": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 100,
                      "description": "The country it is made in, as its two-letter ISO 3166-1 code such as MX, in any case."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hsCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 100,
                      "description": "Its Harmonized System customs code: 6 to 13 digits, once every other character, such as dots, spaces and hyphens, is removed."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trackInventory": {
                  "type": "boolean",
                  "description": "Whether its stock is tracked; a variant no longer tracked has none of its three stocks."
                },
                "fallbackStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "The stock it falls back on when it has none on hand or at its supplier, for a tracked variant only; one tracked without it has 0."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["optionValues"]
            }
          },
          "expectedVersion": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": ["expectedVersion"]
      },
      "ProductPricesUpdateInput": {
        "type": "object",
        "properties": {
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "price": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "compareAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "map": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "msrp": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "onHandCost": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "supplierCost": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fallbackCost": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["id"]
            }
          },
          "expectedVersion": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": ["variants", "expectedVersion"]
      },
      "ProductStatusUpdateInput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": ["draft", "active", "unlisted", "archived"],
            "examples": ["draft"]
          },
          "expectedVersion": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": ["status", "expectedVersion"]
      },
      "ConnectStoreInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "amazon",
              "shopify",
              "bigcommerce",
              "square",
              "walmart",
              "ebay",
              "google_merchant"
            ],
            "examples": ["amazon"]
          },
          "credentials": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": ["provider", "credentials"]
      },
      "ReconnectStoreInput": {
        "type": "object",
        "properties": {
          "credentials": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": ["credentials"]
      },
      "OrgSettings": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "defaultCurrency": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAD",
              "XAF",
              "XCD",
              "XCG",
              "XOF",
              "XPF",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ]
          }
        },
        "required": ["id", "name", "slug", "defaultCurrency"],
        "additionalProperties": false
      },
      "BillingUsage": {
        "type": "object",
        "properties": {
          "standing": {
            "type": "string",
            "enum": ["free", "complimentary", "subscribed"]
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "module": {
                  "type": "string",
                  "enum": ["catalog", "pricing"]
                },
                "units": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "unit": {
                        "type": "string"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "freeAllowance": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "left": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": ["unit", "count", "freeAllowance", "left"],
                    "additionalProperties": false
                  }
                }
              },
              "required": ["module", "units"],
              "additionalProperties": false
            }
          }
        },
        "required": ["standing", "modules"],
        "additionalProperties": false
      },
      "BillingSummary": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "AED",
              "AFN",
              "ALL",
              "AMD",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "AZN",
              "BAM",
              "BBD",
              "BDT",
              "BHD",
              "BIF",
              "BMD",
              "BND",
              "BOB",
              "BOV",
              "BRL",
              "BSD",
              "BTN",
              "BWP",
              "BYN",
              "BZD",
              "CAD",
              "CDF",
              "CHE",
              "CHF",
              "CHW",
              "CLF",
              "CLP",
              "CNY",
              "COP",
              "COU",
              "CRC",
              "CUP",
              "CVE",
              "CZK",
              "DJF",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ERN",
              "ETB",
              "EUR",
              "FJD",
              "FKP",
              "GBP",
              "GEL",
              "GHS",
              "GIP",
              "GMD",
              "GNF",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "ISK",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KGS",
              "KHR",
              "KMF",
              "KPW",
              "KRW",
              "KWD",
              "KYD",
              "KZT",
              "LAK",
              "LBP",
              "LKR",
              "LRD",
              "LSL",
              "LYD",
              "MAD",
              "MDL",
              "MGA",
              "MKD",
              "MMK",
              "MNT",
              "MOP",
              "MRU",
              "MUR",
              "MVR",
              "MWK",
              "MXN",
              "MXV",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PGK",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RSD",
              "RUB",
              "RWF",
              "SAR",
              "SBD",
              "SCR",
              "SDG",
              "SEK",
              "SGD",
              "SHP",
              "SLE",
              "SOS",
              "SRD",
              "SSP",
              "STN",
              "SVC",
              "SYP",
              "SZL",
              "THB",
              "TJS",
              "TMT",
              "TND",
              "TOP",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UAH",
              "UGX",
              "USD",
              "USN",
              "UYI",
              "UYU",
              "UYW",
              "UZS",
              "VED",
              "VES",
              "VND",
              "VUV",
              "WST",
              "XAD",
              "XAF",
              "XCD",
              "XCG",
              "XOF",
              "XPF",
              "YER",
              "ZAR",
              "ZMW",
              "ZWG"
            ]
          },
          "status": {
            "type": "string",
            "enum": ["none", "active", "past_due", "canceled", "complimentary"]
          },
          "currentPeriodEnd": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancelAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "complimentaryUntil": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "projectedTotalMinor": {
            "type": "integer",
            "minimum": 0
          },
          "modules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "module": {
                  "type": "string",
                  "enum": ["catalog", "pricing"]
                },
                "projectedMinor": {
                  "type": "integer",
                  "minimum": 0
                },
                "capMinor": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "units": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "unit": {
                        "type": "string"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "freeAllowance": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "left": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "capAt": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tiers": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "upTo": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "unitAmountMinor": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": ["upTo", "unitAmountMinor"],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": ["unit", "count", "freeAllowance", "left", "capAt", "tiers"],
                    "additionalProperties": false
                  }
                }
              },
              "required": ["module", "projectedMinor", "capMinor", "units"],
              "additionalProperties": false
            }
          },
          "estimate": {
            "type": "object",
            "properties": {
              "projectedTotalMinor": {
                "type": "integer",
                "minimum": 0
              },
              "modules": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "enum": ["catalog", "pricing"]
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "projectedMinor": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "capMinor": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["projectedMinor", "capMinor"],
                  "additionalProperties": false
                }
              }
            },
            "required": ["projectedTotalMinor", "modules"],
            "additionalProperties": false
          },
          "rateMissing": {
            "type": "boolean",
            "const": true
          },
          "card": {
            "type": "object",
            "properties": {
              "brand": {
                "type": "string"
              },
              "last4": {
                "type": "string"
              },
              "expMonth": {
                "type": "integer"
              },
              "expYear": {
                "type": "integer"
              }
            },
            "required": ["brand", "last4", "expMonth", "expYear"],
            "additionalProperties": false
          },
          "openInvoice": {
            "type": "object",
            "properties": {
              "amountMinor": {
                "type": "integer",
                "minimum": 0
              },
              "issuedOn": {
                "type": "string",
                "format": "date"
              },
              "declineCode": {
                "type": "string"
              },
              "nextAttemptAt": {
                "type": "string",
                "format": "date-time"
              },
              "actionRequired": {
                "type": "boolean"
              },
              "hostedUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": ["amountMinor", "issuedOn", "actionRequired"],
            "additionalProperties": false
          },
          "cardUnavailable": {
            "type": "boolean"
          }
        },
        "required": [
          "currency",
          "status",
          "currentPeriodEnd",
          "cancelAt",
          "complimentaryUntil",
          "projectedTotalMinor",
          "modules",
          "cardUnavailable"
        ],
        "additionalProperties": false
      },
      "ImportCheckSummary": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "stage": {
                "type": "string",
                "const": "inspect"
              },
              "worksheets": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "header": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "sample": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "rows": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": ["stage", "worksheets", "header", "sample", "rows"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "warnings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "rows": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": ["code", "rows"],
                  "additionalProperties": false
                }
              },
              "blocking": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "params": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": ["string", "number"]
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": ["code", "params", "fields"],
                  "additionalProperties": false
                }
              },
              "stage": {
                "type": "string",
                "const": "precheck"
              }
            },
            "required": ["warnings", "blocking", "stage"],
            "additionalProperties": false
          }
        ]
      },
      "ImportFetchSummary": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": ["fileId"],
        "additionalProperties": false
      },
      "Job": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "kind": {
                "type": "string"
              },
              "waitingReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": ["paused"]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phase": {
                "type": ["string", "null"]
              },
              "progress": {
                "type": "object",
                "properties": {
                  "done": {
                    "type": "integer"
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["done", "total"],
                "additionalProperties": false
              },
              "counters": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "errorCount": {
                "type": "integer"
              },
              "createdBy": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "canCancel": {
                "type": "boolean"
              },
              "summary": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ImportCheckSummary"
                      },
                      {
                        "$ref": "#/components/schemas/ImportFetchSummary"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "const": "failed"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": ["string", "number"]
                    }
                  }
                },
                "required": ["code", "params"],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "kind",
              "waitingReason",
              "phase",
              "progress",
              "counters",
              "errorCount",
              "createdBy",
              "apiKey",
              "createdAt",
              "finishedAt",
              "canCancel",
              "summary",
              "state",
              "error"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "kind": {
                "type": "string"
              },
              "waitingReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": ["paused"]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "phase": {
                "type": ["string", "null"]
              },
              "progress": {
                "type": "object",
                "properties": {
                  "done": {
                    "type": "integer"
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["done", "total"],
                "additionalProperties": false
              },
              "counters": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "integer"
                }
              },
              "errorCount": {
                "type": "integer"
              },
              "createdBy": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "canCancel": {
                "type": "boolean"
              },
              "summary": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/ImportCheckSummary"
                      },
                      {
                        "$ref": "#/components/schemas/ImportFetchSummary"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": ["waiting", "running", "succeeded", "canceled"]
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "id",
              "kind",
              "waitingReason",
              "phase",
              "progress",
              "counters",
              "errorCount",
              "createdBy",
              "apiKey",
              "createdAt",
              "finishedAt",
              "canCancel",
              "summary",
              "state",
              "error"
            ],
            "additionalProperties": false
          }
        ]
      },
      "JobFile": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": ["url", "name", "size", "expiresAt"],
        "additionalProperties": false
      },
      "JobMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "severity": {
            "type": "string",
            "enum": ["error", "warning", "blocked"]
          },
          "code": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": ["string", "number"]
            }
          },
          "rowNumber": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "column": {
            "type": ["string", "null"]
          }
        },
        "required": ["id", "severity", "code", "params", "rowNumber", "column"],
        "additionalProperties": false
      },
      "JobMessagePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobMessage"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "Credential": {
        "type": "object",
        "properties": {
          "org": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              }
            },
            "required": ["id", "name"],
            "additionalProperties": false
          },
          "type": {
            "type": "string",
            "enum": ["api_key", "oauth_grant"]
          },
          "name": {
            "type": "string"
          },
          "display": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limits": {
            "type": "object",
            "properties": {
              "read": {
                "type": "integer"
              },
              "write": {
                "type": "integer"
              },
              "bulk": {
                "type": "integer"
              }
            },
            "required": ["read", "write", "bulk"],
            "additionalProperties": false
          },
          "remaining": {
            "type": "object",
            "properties": {
              "read": {
                "type": "integer"
              },
              "write": {
                "type": "integer"
              },
              "bulk": {
                "type": "integer"
              }
            },
            "required": ["read", "write", "bulk"],
            "additionalProperties": false
          },
          "notice": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "en": {
                    "type": "string"
                  },
                  "es": {
                    "type": "string"
                  }
                },
                "required": ["en", "es"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "org",
          "type",
          "name",
          "display",
          "expiresAt",
          "permissions",
          "limits",
          "remaining",
          "notice"
        ],
        "additionalProperties": false
      },
      "UploadedFile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": ["pending", "ready", "rejected", "deleting"]
          }
        },
        "required": ["id", "name", "size", "status"],
        "additionalProperties": false
      },
      "VersionItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "event": {
            "type": "string",
            "enum": ["created", "updated", "restored", "merged"]
          },
          "cause": {
            "type": "string",
            "enum": ["edit", "bulk", "import", "feed", "merge", "restore", "sync"]
          },
          "writer": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "import",
                  "feed",
                  "integration",
                  "system",
                  "check",
                  "api_key",
                  "oauth_grant"
                ]
              },
              "name": {
                "type": ["string", "null"]
              }
            },
            "required": ["type", "name"],
            "additionalProperties": false
          }
        },
        "required": ["id", "at", "event", "cause", "writer"],
        "additionalProperties": false
      },
      "VersionList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionItem"
            }
          },
          "canRestore": {
            "type": "boolean"
          }
        },
        "required": ["items", "canRestore"],
        "additionalProperties": false
      },
      "VersionComparison": {
        "type": "object",
        "properties": {
          "version": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {}
            },
            "required": ["id", "state"],
            "additionalProperties": false
          },
          "against": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "state": {}
                },
                "required": ["id", "state"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "sameAsCurrent": {
            "type": "boolean"
          }
        },
        "required": ["version", "against", "sameAsCurrent"],
        "additionalProperties": false
      },
      "RestoreResult": {
        "type": "object",
        "properties": {
          "versionId": {
            "type": "string",
            "format": "uuid"
          },
          "notRestored": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "params": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": ["string", "number"]
                  }
                }
              },
              "required": ["code"],
              "additionalProperties": false
            }
          }
        },
        "required": ["versionId", "notRestored"],
        "additionalProperties": false
      },
      "View": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "type": "string",
            "enum": ["private", "org"]
          },
          "state": {
            "type": "object",
            "properties": {
              "question": {
                "type": "object",
                "properties": {
                  "search": {
                    "type": "string"
                  },
                  "filter": {
                    "type": "object",
                    "properties": {
                      "items": {
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "op": {
                              "type": "string"
                            },
                            "value": {}
                          },
                          "required": ["field", "op"],
                          "additionalProperties": false
                        }
                      },
                      "logic": {
                        "type": "string",
                        "enum": ["and", "or"]
                      }
                    },
                    "required": ["items", "logic"],
                    "additionalProperties": false
                  },
                  "sort": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string"
                      },
                      "direction": {
                        "type": "string",
                        "enum": ["asc", "desc"]
                      }
                    },
                    "required": ["field", "direction"],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "hide": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["question"],
            "additionalProperties": false
          },
          "mine": {
            "type": "boolean"
          },
          "default": {
            "type": "boolean"
          }
        },
        "required": ["id", "name", "visibility", "state", "mine", "default"],
        "additionalProperties": false
      },
      "ViewPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/View"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "DefaultView": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "minLength": 1
          },
          "viewId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": ["resource", "viewId"],
        "additionalProperties": false
      },
      "DataioAdapterItem": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "module": {
            "type": "string",
            "enum": ["core", "integrations", "catalog", "pricing"]
          },
          "fields": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "enum": ["text", "number", "measure", "boolean", "instant", "list"]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "names", "aliases", "group"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "money"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AED",
                            "AFN",
                            "ALL",
                            "AMD",
                            "AOA",
                            "ARS",
                            "AUD",
                            "AWG",
                            "AZN",
                            "BAM",
                            "BBD",
                            "BDT",
                            "BHD",
                            "BIF",
                            "BMD",
                            "BND",
                            "BOB",
                            "BOV",
                            "BRL",
                            "BSD",
                            "BTN",
                            "BWP",
                            "BYN",
                            "BZD",
                            "CAD",
                            "CDF",
                            "CHE",
                            "CHF",
                            "CHW",
                            "CLF",
                            "CLP",
                            "CNY",
                            "COP",
                            "COU",
                            "CRC",
                            "CUP",
                            "CVE",
                            "CZK",
                            "DJF",
                            "DKK",
                            "DOP",
                            "DZD",
                            "EGP",
                            "ERN",
                            "ETB",
                            "EUR",
                            "FJD",
                            "FKP",
                            "GBP",
                            "GEL",
                            "GHS",
                            "GIP",
                            "GMD",
                            "GNF",
                            "GTQ",
                            "GYD",
                            "HKD",
                            "HNL",
                            "HTG",
                            "HUF",
                            "IDR",
                            "ILS",
                            "INR",
                            "IQD",
                            "IRR",
                            "ISK",
                            "JMD",
                            "JOD",
                            "JPY",
                            "KES",
                            "KGS",
                            "KHR",
                            "KMF",
                            "KPW",
                            "KRW",
                            "KWD",
                            "KYD",
                            "KZT",
                            "LAK",
                            "LBP",
                            "LKR",
                            "LRD",
                            "LSL",
                            "LYD",
                            "MAD",
                            "MDL",
                            "MGA",
                            "MKD",
                            "MMK",
                            "MNT",
                            "MOP",
                            "MRU",
                            "MUR",
                            "MVR",
                            "MWK",
                            "MXN",
                            "MXV",
                            "MYR",
                            "MZN",
                            "NAD",
                            "NGN",
                            "NIO",
                            "NOK",
                            "NPR",
                            "NZD",
                            "OMR",
                            "PAB",
                            "PEN",
                            "PGK",
                            "PHP",
                            "PKR",
                            "PLN",
                            "PYG",
                            "QAR",
                            "RON",
                            "RSD",
                            "RUB",
                            "RWF",
                            "SAR",
                            "SBD",
                            "SCR",
                            "SDG",
                            "SEK",
                            "SGD",
                            "SHP",
                            "SLE",
                            "SOS",
                            "SRD",
                            "SSP",
                            "STN",
                            "SVC",
                            "SYP",
                            "SZL",
                            "THB",
                            "TJS",
                            "TMT",
                            "TND",
                            "TOP",
                            "TRY",
                            "TTD",
                            "TWD",
                            "TZS",
                            "UAH",
                            "UGX",
                            "USD",
                            "USN",
                            "UYI",
                            "UYU",
                            "UYW",
                            "UZS",
                            "VED",
                            "VES",
                            "VND",
                            "VUV",
                            "WST",
                            "XAD",
                            "XAF",
                            "XCD",
                            "XCG",
                            "XOF",
                            "XPF",
                            "YER",
                            "ZAR",
                            "ZMW",
                            "ZWG"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "org"
                        }
                      ]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "currency", "names", "aliases", "group"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "systemFields": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "enum": ["text", "number", "measure", "boolean", "instant", "list"]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "names", "aliases", "group"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "money"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AED",
                            "AFN",
                            "ALL",
                            "AMD",
                            "AOA",
                            "ARS",
                            "AUD",
                            "AWG",
                            "AZN",
                            "BAM",
                            "BBD",
                            "BDT",
                            "BHD",
                            "BIF",
                            "BMD",
                            "BND",
                            "BOB",
                            "BOV",
                            "BRL",
                            "BSD",
                            "BTN",
                            "BWP",
                            "BYN",
                            "BZD",
                            "CAD",
                            "CDF",
                            "CHE",
                            "CHF",
                            "CHW",
                            "CLF",
                            "CLP",
                            "CNY",
                            "COP",
                            "COU",
                            "CRC",
                            "CUP",
                            "CVE",
                            "CZK",
                            "DJF",
                            "DKK",
                            "DOP",
                            "DZD",
                            "EGP",
                            "ERN",
                            "ETB",
                            "EUR",
                            "FJD",
                            "FKP",
                            "GBP",
                            "GEL",
                            "GHS",
                            "GIP",
                            "GMD",
                            "GNF",
                            "GTQ",
                            "GYD",
                            "HKD",
                            "HNL",
                            "HTG",
                            "HUF",
                            "IDR",
                            "ILS",
                            "INR",
                            "IQD",
                            "IRR",
                            "ISK",
                            "JMD",
                            "JOD",
                            "JPY",
                            "KES",
                            "KGS",
                            "KHR",
                            "KMF",
                            "KPW",
                            "KRW",
                            "KWD",
                            "KYD",
                            "KZT",
                            "LAK",
                            "LBP",
                            "LKR",
                            "LRD",
                            "LSL",
                            "LYD",
                            "MAD",
                            "MDL",
                            "MGA",
                            "MKD",
                            "MMK",
                            "MNT",
                            "MOP",
                            "MRU",
                            "MUR",
                            "MVR",
                            "MWK",
                            "MXN",
                            "MXV",
                            "MYR",
                            "MZN",
                            "NAD",
                            "NGN",
                            "NIO",
                            "NOK",
                            "NPR",
                            "NZD",
                            "OMR",
                            "PAB",
                            "PEN",
                            "PGK",
                            "PHP",
                            "PKR",
                            "PLN",
                            "PYG",
                            "QAR",
                            "RON",
                            "RSD",
                            "RUB",
                            "RWF",
                            "SAR",
                            "SBD",
                            "SCR",
                            "SDG",
                            "SEK",
                            "SGD",
                            "SHP",
                            "SLE",
                            "SOS",
                            "SRD",
                            "SSP",
                            "STN",
                            "SVC",
                            "SYP",
                            "SZL",
                            "THB",
                            "TJS",
                            "TMT",
                            "TND",
                            "TOP",
                            "TRY",
                            "TTD",
                            "TWD",
                            "TZS",
                            "UAH",
                            "UGX",
                            "USD",
                            "USN",
                            "UYI",
                            "UYU",
                            "UYW",
                            "UZS",
                            "VED",
                            "VES",
                            "VND",
                            "VUV",
                            "WST",
                            "XAD",
                            "XAF",
                            "XCD",
                            "XCG",
                            "XOF",
                            "XPF",
                            "YER",
                            "ZAR",
                            "ZMW",
                            "ZWG"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "org"
                        }
                      ]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "currency", "names", "aliases", "group"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "modes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["create", "update", "clean", "delete"]
            }
          },
          "matchTargets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "fields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": ["key", "fields"],
              "additionalProperties": false
            }
          },
          "options": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "group": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "const": "values"
                    },
                    "values": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "default": {
                      "type": "string"
                    }
                  },
                  "required": ["key", "group", "type", "values", "default"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "group": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "const": "text"
                    },
                    "maxLength": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "default": {
                      "type": "string"
                    }
                  },
                  "required": ["key", "group", "type", "maxLength", "default"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "can": {
            "type": "object",
            "properties": {
              "import": {
                "type": "boolean"
              },
              "export": {
                "type": "boolean"
              },
              "template": {
                "type": "boolean"
              }
            },
            "required": ["import", "export", "template"],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "module",
          "fields",
          "systemFields",
          "modes",
          "matchTargets",
          "options",
          "can"
        ],
        "additionalProperties": false
      },
      "DataioAdapterPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataioAdapterItem"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "DataioAdapterDetail": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string"
          },
          "module": {
            "type": "string",
            "enum": ["core", "integrations", "catalog", "pricing"]
          },
          "fields": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "enum": ["text", "number", "measure", "boolean", "instant", "list"]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "names", "aliases", "group"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "money"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AED",
                            "AFN",
                            "ALL",
                            "AMD",
                            "AOA",
                            "ARS",
                            "AUD",
                            "AWG",
                            "AZN",
                            "BAM",
                            "BBD",
                            "BDT",
                            "BHD",
                            "BIF",
                            "BMD",
                            "BND",
                            "BOB",
                            "BOV",
                            "BRL",
                            "BSD",
                            "BTN",
                            "BWP",
                            "BYN",
                            "BZD",
                            "CAD",
                            "CDF",
                            "CHE",
                            "CHF",
                            "CHW",
                            "CLF",
                            "CLP",
                            "CNY",
                            "COP",
                            "COU",
                            "CRC",
                            "CUP",
                            "CVE",
                            "CZK",
                            "DJF",
                            "DKK",
                            "DOP",
                            "DZD",
                            "EGP",
                            "ERN",
                            "ETB",
                            "EUR",
                            "FJD",
                            "FKP",
                            "GBP",
                            "GEL",
                            "GHS",
                            "GIP",
                            "GMD",
                            "GNF",
                            "GTQ",
                            "GYD",
                            "HKD",
                            "HNL",
                            "HTG",
                            "HUF",
                            "IDR",
                            "ILS",
                            "INR",
                            "IQD",
                            "IRR",
                            "ISK",
                            "JMD",
                            "JOD",
                            "JPY",
                            "KES",
                            "KGS",
                            "KHR",
                            "KMF",
                            "KPW",
                            "KRW",
                            "KWD",
                            "KYD",
                            "KZT",
                            "LAK",
                            "LBP",
                            "LKR",
                            "LRD",
                            "LSL",
                            "LYD",
                            "MAD",
                            "MDL",
                            "MGA",
                            "MKD",
                            "MMK",
                            "MNT",
                            "MOP",
                            "MRU",
                            "MUR",
                            "MVR",
                            "MWK",
                            "MXN",
                            "MXV",
                            "MYR",
                            "MZN",
                            "NAD",
                            "NGN",
                            "NIO",
                            "NOK",
                            "NPR",
                            "NZD",
                            "OMR",
                            "PAB",
                            "PEN",
                            "PGK",
                            "PHP",
                            "PKR",
                            "PLN",
                            "PYG",
                            "QAR",
                            "RON",
                            "RSD",
                            "RUB",
                            "RWF",
                            "SAR",
                            "SBD",
                            "SCR",
                            "SDG",
                            "SEK",
                            "SGD",
                            "SHP",
                            "SLE",
                            "SOS",
                            "SRD",
                            "SSP",
                            "STN",
                            "SVC",
                            "SYP",
                            "SZL",
                            "THB",
                            "TJS",
                            "TMT",
                            "TND",
                            "TOP",
                            "TRY",
                            "TTD",
                            "TWD",
                            "TZS",
                            "UAH",
                            "UGX",
                            "USD",
                            "USN",
                            "UYI",
                            "UYU",
                            "UYW",
                            "UZS",
                            "VED",
                            "VES",
                            "VND",
                            "VUV",
                            "WST",
                            "XAD",
                            "XAF",
                            "XCD",
                            "XCG",
                            "XOF",
                            "XPF",
                            "YER",
                            "ZAR",
                            "ZMW",
                            "ZWG"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "org"
                        }
                      ]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "currency", "names", "aliases", "group"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "systemFields": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "enum": ["text", "number", "measure", "boolean", "instant", "list"]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "names", "aliases", "group"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "ops": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "eq",
                              "neq",
                              "gt",
                              "gte",
                              "lt",
                              "lte",
                              "between",
                              "contains",
                              "notContains",
                              "startsWith",
                              "endsWith",
                              "in",
                              "empty",
                              "notEmpty"
                            ]
                          }
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": ["ops"],
                      "additionalProperties": false
                    },
                    "type": {
                      "type": "string",
                      "const": "money"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AED",
                            "AFN",
                            "ALL",
                            "AMD",
                            "AOA",
                            "ARS",
                            "AUD",
                            "AWG",
                            "AZN",
                            "BAM",
                            "BBD",
                            "BDT",
                            "BHD",
                            "BIF",
                            "BMD",
                            "BND",
                            "BOB",
                            "BOV",
                            "BRL",
                            "BSD",
                            "BTN",
                            "BWP",
                            "BYN",
                            "BZD",
                            "CAD",
                            "CDF",
                            "CHE",
                            "CHF",
                            "CHW",
                            "CLF",
                            "CLP",
                            "CNY",
                            "COP",
                            "COU",
                            "CRC",
                            "CUP",
                            "CVE",
                            "CZK",
                            "DJF",
                            "DKK",
                            "DOP",
                            "DZD",
                            "EGP",
                            "ERN",
                            "ETB",
                            "EUR",
                            "FJD",
                            "FKP",
                            "GBP",
                            "GEL",
                            "GHS",
                            "GIP",
                            "GMD",
                            "GNF",
                            "GTQ",
                            "GYD",
                            "HKD",
                            "HNL",
                            "HTG",
                            "HUF",
                            "IDR",
                            "ILS",
                            "INR",
                            "IQD",
                            "IRR",
                            "ISK",
                            "JMD",
                            "JOD",
                            "JPY",
                            "KES",
                            "KGS",
                            "KHR",
                            "KMF",
                            "KPW",
                            "KRW",
                            "KWD",
                            "KYD",
                            "KZT",
                            "LAK",
                            "LBP",
                            "LKR",
                            "LRD",
                            "LSL",
                            "LYD",
                            "MAD",
                            "MDL",
                            "MGA",
                            "MKD",
                            "MMK",
                            "MNT",
                            "MOP",
                            "MRU",
                            "MUR",
                            "MVR",
                            "MWK",
                            "MXN",
                            "MXV",
                            "MYR",
                            "MZN",
                            "NAD",
                            "NGN",
                            "NIO",
                            "NOK",
                            "NPR",
                            "NZD",
                            "OMR",
                            "PAB",
                            "PEN",
                            "PGK",
                            "PHP",
                            "PKR",
                            "PLN",
                            "PYG",
                            "QAR",
                            "RON",
                            "RSD",
                            "RUB",
                            "RWF",
                            "SAR",
                            "SBD",
                            "SCR",
                            "SDG",
                            "SEK",
                            "SGD",
                            "SHP",
                            "SLE",
                            "SOS",
                            "SRD",
                            "SSP",
                            "STN",
                            "SVC",
                            "SYP",
                            "SZL",
                            "THB",
                            "TJS",
                            "TMT",
                            "TND",
                            "TOP",
                            "TRY",
                            "TTD",
                            "TWD",
                            "TZS",
                            "UAH",
                            "UGX",
                            "USD",
                            "USN",
                            "UYI",
                            "UYU",
                            "UYW",
                            "UZS",
                            "VED",
                            "VES",
                            "VND",
                            "VUV",
                            "WST",
                            "XAD",
                            "XAF",
                            "XCD",
                            "XCG",
                            "XOF",
                            "XPF",
                            "YER",
                            "ZAR",
                            "ZMW",
                            "ZWG"
                          ]
                        },
                        {
                          "type": "string",
                          "const": "org"
                        }
                      ]
                    },
                    "names": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "aliases": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "group": {
                      "type": "string"
                    },
                    "requiredToCreate": {
                      "type": "boolean"
                    },
                    "cleanable": {
                      "type": "boolean"
                    },
                    "exportable": {
                      "type": "boolean"
                    },
                    "decodeHtml": {
                      "type": "boolean"
                    }
                  },
                  "required": ["key", "type", "currency", "names", "aliases", "group"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "modes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": ["create", "update", "clean", "delete"]
            }
          },
          "matchTargets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "fields": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": ["key", "fields"],
              "additionalProperties": false
            }
          },
          "options": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "group": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "const": "values"
                    },
                    "values": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "default": {
                      "type": "string"
                    }
                  },
                  "required": ["key", "group", "type", "values", "default"],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "group": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "const": "text"
                    },
                    "maxLength": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "default": {
                      "type": "string"
                    }
                  },
                  "required": ["key", "group", "type", "maxLength", "default"],
                  "additionalProperties": false
                }
              ]
            }
          },
          "can": {
            "type": "object",
            "properties": {
              "import": {
                "type": "boolean"
              },
              "export": {
                "type": "boolean"
              },
              "template": {
                "type": "boolean"
              }
            },
            "required": ["import", "export", "template"],
            "additionalProperties": false
          },
          "counts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "noun": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": ["noun", "count"],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "entity",
          "module",
          "fields",
          "systemFields",
          "modes",
          "matchTargets",
          "options",
          "can",
          "counts"
        ],
        "additionalProperties": false
      },
      "ExportDefinition": {
        "type": "object",
        "properties": {
          "entities": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "entity": {
                  "type": "string"
                },
                "columns": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "question": {
                  "type": "object",
                  "properties": {
                    "search": {
                      "type": "string"
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "op": {
                                "type": "string"
                              },
                              "value": {}
                            },
                            "required": ["field", "op"],
                            "additionalProperties": false
                          }
                        },
                        "logic": {
                          "type": "string",
                          "enum": ["and", "or"]
                        }
                      },
                      "required": ["items", "logic"],
                      "additionalProperties": false
                    },
                    "sort": {
                      "type": "object",
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "direction": {
                          "type": "string",
                          "enum": ["asc", "desc"]
                        }
                      },
                      "required": ["field", "direction"],
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": ["entity", "columns", "question"],
              "additionalProperties": false
            }
          },
          "format": {
            "type": "string",
            "enum": ["csv", "xlsx"]
          },
          "delimiter": {
            "default": ",",
            "type": "string",
            "enum": [",", ";", "\t", "|"]
          },
          "dateFormat": {
            "default": "sql",
            "type": "string",
            "enum": ["sql", "iso"]
          },
          "compression": {
            "default": "none",
            "type": "string",
            "enum": ["none", "gzip", "zip"]
          },
          "listSeparator": {
            "default": "|",
            "type": "string",
            "minLength": 1,
            "maxLength": 3
          },
          "systemFields": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "entities",
          "format",
          "delimiter",
          "dateFormat",
          "compression",
          "listSeparator",
          "systemFields"
        ],
        "additionalProperties": false
      },
      "ExportTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "module": {
            "type": "string",
            "enum": ["core", "integrations", "catalog", "pricing"]
          },
          "name": {
            "type": "string"
          },
          "definition": {
            "$ref": "#/components/schemas/ExportDefinition"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": ["id", "module", "name", "definition", "createdAt", "updatedAt"],
        "additionalProperties": false
      },
      "ExportTemplatePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportTemplate"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "ExportFileName": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          }
        },
        "required": ["fileName"],
        "additionalProperties": false
      },
      "ImportUpload": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "contentType": {
            "type": "string"
          }
        },
        "required": ["fileId", "url", "contentType"],
        "additionalProperties": false
      },
      "ImportItem": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "waitingReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": ["paused"]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "progress": {
                "type": "object",
                "properties": {
                  "done": {
                    "type": "integer"
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["done", "total"],
                "additionalProperties": false
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "canCancel": {
                "type": "boolean"
              },
              "file": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": ["string", "null"]
                  },
                  "expired": {
                    "type": "boolean"
                  }
                },
                "required": ["name", "expired"],
                "additionalProperties": false
              },
              "permission": {
                "type": "string"
              },
              "module": {
                "type": "string",
                "enum": ["core", "integrations", "catalog", "pricing"]
              },
              "createdBy": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["id", "name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entity": {
                "type": "string"
              },
              "mode": {
                "type": "string",
                "enum": ["create", "update", "clean", "delete"]
              },
              "fields": {
                "type": "integer"
              },
              "counters": {
                "type": "object",
                "properties": {
                  "success": {
                    "type": "integer"
                  },
                  "warning": {
                    "type": "integer"
                  },
                  "error": {
                    "type": "integer"
                  },
                  "blocked": {
                    "type": "integer"
                  }
                },
                "required": ["success", "warning", "error", "blocked"],
                "additionalProperties": false
              },
              "state": {
                "type": "string",
                "const": "failed"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": ["string", "number"]
                    }
                  }
                },
                "required": ["code", "params"],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "waitingReason",
              "progress",
              "apiKey",
              "createdAt",
              "finishedAt",
              "canCancel",
              "file",
              "permission",
              "module",
              "createdBy",
              "entity",
              "mode",
              "fields",
              "counters",
              "state",
              "error"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "waitingReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": ["paused"]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "progress": {
                "type": "object",
                "properties": {
                  "done": {
                    "type": "integer"
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["done", "total"],
                "additionalProperties": false
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "canCancel": {
                "type": "boolean"
              },
              "file": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": ["string", "null"]
                  },
                  "expired": {
                    "type": "boolean"
                  }
                },
                "required": ["name", "expired"],
                "additionalProperties": false
              },
              "permission": {
                "type": "string"
              },
              "module": {
                "type": "string",
                "enum": ["core", "integrations", "catalog", "pricing"]
              },
              "createdBy": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["id", "name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entity": {
                "type": "string"
              },
              "mode": {
                "type": "string",
                "enum": ["create", "update", "clean", "delete"]
              },
              "fields": {
                "type": "integer"
              },
              "counters": {
                "type": "object",
                "properties": {
                  "success": {
                    "type": "integer"
                  },
                  "warning": {
                    "type": "integer"
                  },
                  "error": {
                    "type": "integer"
                  },
                  "blocked": {
                    "type": "integer"
                  }
                },
                "required": ["success", "warning", "error", "blocked"],
                "additionalProperties": false
              },
              "state": {
                "type": "string",
                "enum": ["waiting", "running", "succeeded", "canceled"]
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "id",
              "waitingReason",
              "progress",
              "apiKey",
              "createdAt",
              "finishedAt",
              "canCancel",
              "file",
              "permission",
              "module",
              "createdBy",
              "entity",
              "mode",
              "fields",
              "counters",
              "state",
              "error"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ImportPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportItem"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "ExportItem": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "waitingReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": ["paused"]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "progress": {
                "type": "object",
                "properties": {
                  "done": {
                    "type": "integer"
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["done", "total"],
                "additionalProperties": false
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "canCancel": {
                "type": "boolean"
              },
              "file": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": ["string", "null"]
                  },
                  "expired": {
                    "type": "boolean"
                  }
                },
                "required": ["name", "expired"],
                "additionalProperties": false
              },
              "permission": {
                "type": "string"
              },
              "module": {
                "type": "string",
                "enum": ["core", "integrations", "catalog", "pricing"]
              },
              "createdBy": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["id", "name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entities": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "entity": {
                      "type": "string"
                    },
                    "format": {
                      "type": "string",
                      "enum": ["csv", "xlsx"]
                    },
                    "ceiling": {
                      "type": "string",
                      "enum": ["rows", "cell"]
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "op": {
                                "type": "string"
                              },
                              "value": {}
                            },
                            "required": ["field", "op"],
                            "additionalProperties": false
                          }
                        },
                        "logic": {
                          "type": "string",
                          "enum": ["and", "or"]
                        }
                      },
                      "required": ["items", "logic"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["entity", "format"],
                  "additionalProperties": false
                }
              },
              "fields": {
                "type": "integer"
              },
              "filters": {
                "type": "integer"
              },
              "format": {
                "type": "string",
                "enum": ["csv", "xlsx"]
              },
              "rows": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "size": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "const": "failed"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": ["string", "number"]
                    }
                  }
                },
                "required": ["code", "params"],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "waitingReason",
              "progress",
              "apiKey",
              "createdAt",
              "finishedAt",
              "canCancel",
              "file",
              "permission",
              "module",
              "createdBy",
              "entities",
              "fields",
              "filters",
              "format",
              "rows",
              "size",
              "state",
              "error"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "waitingReason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": ["paused"]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "progress": {
                "type": "object",
                "properties": {
                  "done": {
                    "type": "integer"
                  },
                  "total": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": ["done", "total"],
                "additionalProperties": false
              },
              "apiKey": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": ["name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "finishedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "canCancel": {
                "type": "boolean"
              },
              "file": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": ["string", "null"]
                  },
                  "expired": {
                    "type": "boolean"
                  }
                },
                "required": ["name", "expired"],
                "additionalProperties": false
              },
              "permission": {
                "type": "string"
              },
              "module": {
                "type": "string",
                "enum": ["core", "integrations", "catalog", "pricing"]
              },
              "createdBy": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["id", "name"],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "entities": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "entity": {
                      "type": "string"
                    },
                    "format": {
                      "type": "string",
                      "enum": ["csv", "xlsx"]
                    },
                    "ceiling": {
                      "type": "string",
                      "enum": ["rows", "cell"]
                    },
                    "filter": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string"
                              },
                              "op": {
                                "type": "string"
                              },
                              "value": {}
                            },
                            "required": ["field", "op"],
                            "additionalProperties": false
                          }
                        },
                        "logic": {
                          "type": "string",
                          "enum": ["and", "or"]
                        }
                      },
                      "required": ["items", "logic"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["entity", "format"],
                  "additionalProperties": false
                }
              },
              "fields": {
                "type": "integer"
              },
              "filters": {
                "type": "integer"
              },
              "format": {
                "type": "string",
                "enum": ["csv", "xlsx"]
              },
              "rows": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "size": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "state": {
                "type": "string",
                "enum": ["waiting", "running", "succeeded", "canceled"]
              },
              "error": {
                "type": "null"
              }
            },
            "required": [
              "id",
              "waitingReason",
              "progress",
              "apiKey",
              "createdAt",
              "finishedAt",
              "canCancel",
              "file",
              "permission",
              "module",
              "createdBy",
              "entities",
              "fields",
              "filters",
              "format",
              "rows",
              "size",
              "state",
              "error"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ExportPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportItem"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "ImportStarted": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": ["jobId"],
        "additionalProperties": false
      },
      "Incident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "code": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": ["string", "number"]
            }
          },
          "message": {
            "type": "string"
          },
          "entity": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "pattern": "^(core|integrations|catalog|pricing)\\.[\\s\\S]{0,}$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "label": {
                    "type": ["string", "null"]
                  }
                },
                "required": ["type", "id", "label"],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "action": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "link"
                      },
                      "label": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "required": ["kind", "label", "path"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "resolve"
                      }
                    },
                    "required": ["kind"],
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "read": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "resolvedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "code",
          "params",
          "message",
          "entity",
          "action",
          "read",
          "createdAt",
          "resolvedAt"
        ],
        "additionalProperties": false
      },
      "IncidentPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Incident"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "Notification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": ["string", "number", "boolean", "null"]
            }
          },
          "actorUserId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "link": {
            "type": ["string", "null"]
          },
          "read": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": ["id", "key", "params", "actorUserId", "link", "read", "createdAt"],
        "additionalProperties": false
      },
      "NotificationPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notification"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "MarkedAllRead": {
        "type": "object",
        "properties": {
          "notices": {
            "type": "integer",
            "minimum": 0
          },
          "problems": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": ["notices", "problems"],
        "additionalProperties": false
      },
      "SearchHit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "image": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "object",
            "properties": {
              "value": {
                "type": "string"
              },
              "tone": {
                "type": "string",
                "enum": ["neutral", "accent", "success", "warning", "danger"]
              }
            },
            "required": ["value", "tone"],
            "additionalProperties": false
          },
          "url": {
            "type": "string",
            "format": "starts_with",
            "pattern": "^\\/.*"
          }
        },
        "required": ["id", "title", "url"],
        "additionalProperties": false
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "pattern": "^(core|integrations|catalog|pricing)\\.[\\s\\S]{0,}$"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchHit"
                  }
                },
                "more": {
                  "type": "boolean"
                }
              },
              "required": ["kind", "items", "more"],
              "additionalProperties": false
            }
          }
        },
        "required": ["groups"],
        "additionalProperties": false
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["draft", "active", "unlisted", "archived"]
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "open_box",
              "new_with_defects",
              "used",
              "used_like_new",
              "used_very_good",
              "used_good",
              "used_acceptable",
              "refurbished",
              "collectible_like_new",
              "collectible_very_good",
              "collectible_good",
              "collectible_acceptable",
              "for_parts_or_not_working"
            ]
          },
          "productType": {
            "type": ["string", "null"]
          },
          "descriptionHtml": {
            "description": "The product's description in HTML, as it was saved; null when it has none.",
            "type": ["string", "null"]
          },
          "metaTitle": {
            "type": ["string", "null"]
          },
          "metaDescription": {
            "type": ["string", "null"]
          },
          "version": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "import",
                  "feed",
                  "integration",
                  "system",
                  "check",
                  "api_key",
                  "oauth_grant"
                ]
              },
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["type", "id"],
            "additionalProperties": false
          },
          "updatedBy": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "import",
                  "feed",
                  "integration",
                  "system",
                  "check",
                  "api_key",
                  "oauth_grant"
                ]
              },
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["type", "id"],
            "additionalProperties": false
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "position": {
                        "type": "integer"
                      }
                    },
                    "required": ["id", "name", "position"],
                    "additionalProperties": false
                  }
                }
              },
              "required": ["id", "name", "position", "values"],
              "additionalProperties": false
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "optionValueIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "identifiers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": ["sku", "gtin", "isbn", "mpn", "custom"]
                      },
                      "value": {
                        "type": "string"
                      },
                      "label": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["type", "value", "label"],
                    "additionalProperties": false
                  }
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "AOA",
                    "ARS",
                    "AUD",
                    "AWG",
                    "AZN",
                    "BAM",
                    "BBD",
                    "BDT",
                    "BHD",
                    "BIF",
                    "BMD",
                    "BND",
                    "BOB",
                    "BOV",
                    "BRL",
                    "BSD",
                    "BTN",
                    "BWP",
                    "BYN",
                    "BZD",
                    "CAD",
                    "CDF",
                    "CHE",
                    "CHF",
                    "CHW",
                    "CLF",
                    "CLP",
                    "CNY",
                    "COP",
                    "COU",
                    "CRC",
                    "CUP",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EGP",
                    "ERN",
                    "ETB",
                    "EUR",
                    "FJD",
                    "FKP",
                    "GBP",
                    "GEL",
                    "GHS",
                    "GIP",
                    "GMD",
                    "GNF",
                    "GTQ",
                    "GYD",
                    "HKD",
                    "HNL",
                    "HTG",
                    "HUF",
                    "IDR",
                    "ILS",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KGS",
                    "KHR",
                    "KMF",
                    "KPW",
                    "KRW",
                    "KWD",
                    "KYD",
                    "KZT",
                    "LAK",
                    "LBP",
                    "LKR",
                    "LRD",
                    "LSL",
                    "LYD",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MNT",
                    "MOP",
                    "MRU",
                    "MUR",
                    "MVR",
                    "MWK",
                    "MXN",
                    "MXV",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PGK",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SBD",
                    "SCR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SHP",
                    "SLE",
                    "SOS",
                    "SRD",
                    "SSP",
                    "STN",
                    "SVC",
                    "SYP",
                    "SZL",
                    "THB",
                    "TJS",
                    "TMT",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "USD",
                    "USN",
                    "UYI",
                    "UYU",
                    "UYW",
                    "UZS",
                    "VED",
                    "VES",
                    "VND",
                    "VUV",
                    "WST",
                    "XAD",
                    "XAF",
                    "XCD",
                    "XCG",
                    "XOF",
                    "XPF",
                    "YER",
                    "ZAR",
                    "ZMW",
                    "ZWG"
                  ]
                },
                "price": {
                  "type": ["string", "null"]
                },
                "compareAt": {
                  "type": ["string", "null"]
                },
                "map": {
                  "type": ["string", "null"]
                },
                "msrp": {
                  "type": ["string", "null"]
                },
                "onHandCost": {
                  "type": ["string", "null"]
                },
                "supplierCost": {
                  "type": ["string", "null"]
                },
                "fallbackCost": {
                  "type": ["string", "null"]
                },
                "productWeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["g", "kg", "oz", "lb", "ct"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own weight, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none."
                },
                "productLength": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own length, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "productWidth": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own width, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "productHeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own height, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "shippingWeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["g", "kg", "oz", "lb", "ct"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The weight it ships with, packed, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none."
                },
                "shippingLength": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The length of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "shippingWidth": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The width of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "shippingHeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The height of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "countryOfOrigin": {
                  "description": "The country it is made in, as its two-letter ISO 3166-1 code such as MX.",
                  "type": ["string", "null"]
                },
                "hsCode": {
                  "description": "Its Harmonized System customs code, its 6 to 13 digits alone.",
                  "type": ["string", "null"]
                },
                "trackInventory": {
                  "type": "boolean",
                  "description": "Whether its stock is tracked; a variant no longer tracked has none of its three stocks."
                },
                "onHandStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The stock on hand, as the stores report it, for a tracked variant only."
                },
                "supplierStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The stock at its supplier, as the supplier's feed reports it, for a tracked variant only."
                },
                "fallbackStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "The stock it falls back on when it has none on hand or at its supplier, for a tracked variant only; one tracked without it has 0."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdBy": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "user",
                        "import",
                        "feed",
                        "integration",
                        "system",
                        "check",
                        "api_key",
                        "oauth_grant"
                      ]
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["type", "id"],
                  "additionalProperties": false
                },
                "updatedBy": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "user",
                        "import",
                        "feed",
                        "integration",
                        "system",
                        "check",
                        "api_key",
                        "oauth_grant"
                      ]
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["type", "id"],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "optionValueIds",
                "identifiers",
                "currency",
                "price",
                "compareAt",
                "map",
                "msrp",
                "onHandCost",
                "supplierCost",
                "fallbackCost",
                "productWeight",
                "productLength",
                "productWidth",
                "productHeight",
                "shippingWeight",
                "shippingLength",
                "shippingWidth",
                "shippingHeight",
                "countryOfOrigin",
                "hsCode",
                "trackInventory",
                "onHandStock",
                "supplierStock",
                "fallbackStock",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "title",
          "slug",
          "status",
          "condition",
          "productType",
          "descriptionHtml",
          "metaTitle",
          "metaDescription",
          "version",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy",
          "options",
          "variants"
        ],
        "additionalProperties": false
      },
      "FreeSku": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string"
          }
        },
        "required": ["sku"],
        "additionalProperties": false
      },
      "ProductSaved": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["draft", "active", "unlisted", "archived"]
          },
          "condition": {
            "type": "string",
            "enum": [
              "new",
              "open_box",
              "new_with_defects",
              "used",
              "used_like_new",
              "used_very_good",
              "used_good",
              "used_acceptable",
              "refurbished",
              "collectible_like_new",
              "collectible_very_good",
              "collectible_good",
              "collectible_acceptable",
              "for_parts_or_not_working"
            ]
          },
          "productType": {
            "type": ["string", "null"]
          },
          "descriptionHtml": {
            "description": "The product's description in HTML, as it was saved; null when it has none.",
            "type": ["string", "null"]
          },
          "metaTitle": {
            "type": ["string", "null"]
          },
          "metaDescription": {
            "type": ["string", "null"]
          },
          "version": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "import",
                  "feed",
                  "integration",
                  "system",
                  "check",
                  "api_key",
                  "oauth_grant"
                ]
              },
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["type", "id"],
            "additionalProperties": false
          },
          "updatedBy": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "user",
                  "import",
                  "feed",
                  "integration",
                  "system",
                  "check",
                  "api_key",
                  "oauth_grant"
                ]
              },
              "id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["type", "id"],
            "additionalProperties": false
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "name": {
                        "type": "string"
                      },
                      "position": {
                        "type": "integer"
                      }
                    },
                    "required": ["id", "name", "position"],
                    "additionalProperties": false
                  }
                }
              },
              "required": ["id", "name", "position", "values"],
              "additionalProperties": false
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "optionValueIds": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "identifiers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": ["sku", "gtin", "isbn", "mpn", "custom"]
                      },
                      "value": {
                        "type": "string"
                      },
                      "label": {
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["type", "value", "label"],
                    "additionalProperties": false
                  }
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "AED",
                    "AFN",
                    "ALL",
                    "AMD",
                    "AOA",
                    "ARS",
                    "AUD",
                    "AWG",
                    "AZN",
                    "BAM",
                    "BBD",
                    "BDT",
                    "BHD",
                    "BIF",
                    "BMD",
                    "BND",
                    "BOB",
                    "BOV",
                    "BRL",
                    "BSD",
                    "BTN",
                    "BWP",
                    "BYN",
                    "BZD",
                    "CAD",
                    "CDF",
                    "CHE",
                    "CHF",
                    "CHW",
                    "CLF",
                    "CLP",
                    "CNY",
                    "COP",
                    "COU",
                    "CRC",
                    "CUP",
                    "CVE",
                    "CZK",
                    "DJF",
                    "DKK",
                    "DOP",
                    "DZD",
                    "EGP",
                    "ERN",
                    "ETB",
                    "EUR",
                    "FJD",
                    "FKP",
                    "GBP",
                    "GEL",
                    "GHS",
                    "GIP",
                    "GMD",
                    "GNF",
                    "GTQ",
                    "GYD",
                    "HKD",
                    "HNL",
                    "HTG",
                    "HUF",
                    "IDR",
                    "ILS",
                    "INR",
                    "IQD",
                    "IRR",
                    "ISK",
                    "JMD",
                    "JOD",
                    "JPY",
                    "KES",
                    "KGS",
                    "KHR",
                    "KMF",
                    "KPW",
                    "KRW",
                    "KWD",
                    "KYD",
                    "KZT",
                    "LAK",
                    "LBP",
                    "LKR",
                    "LRD",
                    "LSL",
                    "LYD",
                    "MAD",
                    "MDL",
                    "MGA",
                    "MKD",
                    "MMK",
                    "MNT",
                    "MOP",
                    "MRU",
                    "MUR",
                    "MVR",
                    "MWK",
                    "MXN",
                    "MXV",
                    "MYR",
                    "MZN",
                    "NAD",
                    "NGN",
                    "NIO",
                    "NOK",
                    "NPR",
                    "NZD",
                    "OMR",
                    "PAB",
                    "PEN",
                    "PGK",
                    "PHP",
                    "PKR",
                    "PLN",
                    "PYG",
                    "QAR",
                    "RON",
                    "RSD",
                    "RUB",
                    "RWF",
                    "SAR",
                    "SBD",
                    "SCR",
                    "SDG",
                    "SEK",
                    "SGD",
                    "SHP",
                    "SLE",
                    "SOS",
                    "SRD",
                    "SSP",
                    "STN",
                    "SVC",
                    "SYP",
                    "SZL",
                    "THB",
                    "TJS",
                    "TMT",
                    "TND",
                    "TOP",
                    "TRY",
                    "TTD",
                    "TWD",
                    "TZS",
                    "UAH",
                    "UGX",
                    "USD",
                    "USN",
                    "UYI",
                    "UYU",
                    "UYW",
                    "UZS",
                    "VED",
                    "VES",
                    "VND",
                    "VUV",
                    "WST",
                    "XAD",
                    "XAF",
                    "XCD",
                    "XCG",
                    "XOF",
                    "XPF",
                    "YER",
                    "ZAR",
                    "ZMW",
                    "ZWG"
                  ]
                },
                "price": {
                  "type": ["string", "null"]
                },
                "compareAt": {
                  "type": ["string", "null"]
                },
                "map": {
                  "type": ["string", "null"]
                },
                "msrp": {
                  "type": ["string", "null"]
                },
                "onHandCost": {
                  "type": ["string", "null"]
                },
                "supplierCost": {
                  "type": ["string", "null"]
                },
                "fallbackCost": {
                  "type": ["string", "null"]
                },
                "productWeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["g", "kg", "oz", "lb", "ct"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own weight, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none."
                },
                "productLength": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own length, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "productWidth": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own width, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "productHeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The product's own height, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "shippingWeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["g", "kg", "oz", "lb", "ct"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The weight it ships with, packed, a value with its unit (g, kg, oz, lb, ct); a value of 0 is saved as none."
                },
                "shippingLength": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The length of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "shippingWidth": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The width of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "shippingHeight": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0
                        },
                        "unit": {
                          "type": "string",
                          "enum": ["mm", "cm", "in", "yd"]
                        }
                      },
                      "required": ["value", "unit"],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The height of its package, a value with its unit (mm, cm, in, yd); a value of 0 is saved as none."
                },
                "countryOfOrigin": {
                  "description": "The country it is made in, as its two-letter ISO 3166-1 code such as MX.",
                  "type": ["string", "null"]
                },
                "hsCode": {
                  "description": "Its Harmonized System customs code, its 6 to 13 digits alone.",
                  "type": ["string", "null"]
                },
                "trackInventory": {
                  "type": "boolean",
                  "description": "Whether its stock is tracked; a variant no longer tracked has none of its three stocks."
                },
                "onHandStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The stock on hand, as the stores report it, for a tracked variant only."
                },
                "supplierStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The stock at its supplier, as the supplier's feed reports it, for a tracked variant only."
                },
                "fallbackStock": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647,
                      "description": "The stock it falls back on when it has none on hand or at its supplier, for a tracked variant only; one tracked without it has 0."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdBy": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "user",
                        "import",
                        "feed",
                        "integration",
                        "system",
                        "check",
                        "api_key",
                        "oauth_grant"
                      ]
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["type", "id"],
                  "additionalProperties": false
                },
                "updatedBy": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "user",
                        "import",
                        "feed",
                        "integration",
                        "system",
                        "check",
                        "api_key",
                        "oauth_grant"
                      ]
                    },
                    "id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": ["type", "id"],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "optionValueIds",
                "identifiers",
                "currency",
                "price",
                "compareAt",
                "map",
                "msrp",
                "onHandCost",
                "supplierCost",
                "fallbackCost",
                "productWeight",
                "productLength",
                "productWidth",
                "productHeight",
                "shippingWeight",
                "shippingLength",
                "shippingWidth",
                "shippingHeight",
                "countryOfOrigin",
                "hsCode",
                "trackInventory",
                "onHandStock",
                "supplierStock",
                "fallbackStock",
                "createdBy",
                "updatedBy"
              ],
              "additionalProperties": false
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "catalog.part_number_similar",
                    "catalog.compare_below_price",
                    "catalog.price_below_cost",
                    "catalog.price_below_map",
                    "catalog.price_above_msrp",
                    "catalog.map_above_msrp",
                    "catalog.cost_above_map",
                    "catalog.cost_above_msrp"
                  ]
                },
                "params": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": ["string", "number"]
                  }
                }
              },
              "required": ["code", "params"],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "title",
          "slug",
          "status",
          "condition",
          "productType",
          "descriptionHtml",
          "metaTitle",
          "metaDescription",
          "version",
          "createdAt",
          "updatedAt",
          "createdBy",
          "updatedBy",
          "options",
          "variants",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ProductItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["draft", "active", "unlisted", "archived"]
          },
          "variantCount": {
            "type": "integer"
          },
          "version": {
            "type": "integer"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": ["id", "title", "slug", "status", "variantCount", "version", "updatedAt"],
        "additionalProperties": false
      },
      "ProductPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductItem"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string",
            "enum": [
              "amazon",
              "shopify",
              "bigcommerce",
              "square",
              "walmart",
              "ebay",
              "google_merchant"
            ]
          },
          "label": {
            "type": "string"
          },
          "authState": {
            "type": "string",
            "enum": ["connected", "needs_reauth", "unavailable", "terminated"]
          },
          "lifecycle": {
            "type": "string",
            "enum": ["active", "disconnecting"]
          },
          "writesPaused": {
            "type": "boolean"
          }
        },
        "required": ["id", "provider", "label", "authState", "lifecycle", "writesPaused"],
        "additionalProperties": false
      },
      "ConnectionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "nextCursor": {
            "type": ["string", "null"]
          },
          "total": {
            "type": "integer"
          }
        },
        "required": ["items", "nextCursor"],
        "additionalProperties": false
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "pattern": "^urn:rfc:problem:[\\s\\S]{0,}\\.[\\s\\S]{0,}$"
          },
          "status": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "pattern": "^[\\s\\S]{0,}\\.[\\s\\S]{0,}$"
          },
          "params": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "location": {
                  "type": "string"
                },
                "pointer": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "params": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": ["location", "pointer", "code"],
              "additionalProperties": false
            }
          }
        },
        "required": ["type", "status", "code", "requestId"],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An organization's API key, sent on every call as `Authorization: Bearer <key>`. A person of the organization creates it in the app, in **Settings › API and connections › API keys**."
      }
    }
  }
}
