{
  "schemes": [
    "https"
  ],
  "swagger": "2.0",
  "info": {
    "description": "Connectors, connections, and channel export/import.",
    "title": "Integration API",
    "contact": {},
    "version": "1.0.0"
  },
  "host": "api.catazenta.com",
  "basePath": "/v1",
  "paths": {
    "/category-mappings": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get all category mappings for a given connection and channel. Both connection_id and channel_code are required query parameters.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Category Mappings"
        ],
        "summary": "List category mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "connection_id",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel code",
            "name": "channel_code",
            "in": "query",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Category mappings retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/CategoryMappingListResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "connection_id and channel_code are required",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Map an internal category to an external channel category for a connection",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Category Mappings"
        ],
        "summary": "Create a category mapping",
        "parameters": [
          {
            "description": "Category mapping details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateCategoryMappingRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Category mapping created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/CategoryMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "409": {
            "description": "Mapping already exists",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/category-mappings/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve a single category mapping by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Category Mappings"
        ],
        "summary": "Get a category mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Category mapping ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Category mapping retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/CategoryMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Category mapping not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Permanently delete a category mapping",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Category Mappings"
        ],
        "summary": "Delete a category mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Category mapping ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Category mapping not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update the external category identifier or other fields of an existing category mapping",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Category Mappings"
        ],
        "summary": "Update a category mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Category mapping ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Updated mapping fields",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateCategoryMappingRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category mapping updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/CategoryMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Category mapping not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connections": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of tenant connection instances",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connections"
        ],
        "summary": "List connections",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Connections retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectionListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new tenant connection instance from a connector definition",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connections"
        ],
        "summary": "Create a connection",
        "parameters": [
          {
            "description": "Connection request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateConnectionRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Connection created successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectionResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connections/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single tenant connection instance by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connections"
        ],
        "summary": "Get a connection",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Connection retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectionResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete a tenant connection instance",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connections"
        ],
        "summary": "Delete a connection",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing tenant connection instance",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connections"
        ],
        "summary": "Update a connection",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Connection update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateConnectionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection updated successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectionResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connections/{id}/category-mappings/channel": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve all category mappings for a connection, scoped to a specific channel code. Used to populate the channel category tree.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Category Mappings"
        ],
        "summary": "Get channel category mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Channel code",
            "name": "channel_code",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Category mappings retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/CategoryMappingListResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "connection id and channel_code are required",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connections/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Activate or deactivate a connection",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connections"
        ],
        "summary": "Change connection status",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Status request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeConnectionStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection status updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectionResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of available connector types in the platform catalog",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Catalog"
        ],
        "summary": "List connector definitions",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "enum": [
              "api",
              "ftp",
              "sftp",
              "storage",
              "marketplace"
            ],
            "type": "string",
            "description": "Filter by connector type",
            "name": "connector_type",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Filter by active status",
            "name": "is_active",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search by name or code",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Connectors retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new connector type in the platform catalog (e.g., Shopify, Amazon)",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Catalog"
        ],
        "summary": "Create a connector definition",
        "parameters": [
          {
            "description": "Connector definition request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateConnectorRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Connector created successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{connectorId}/attributes": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get the list of attributes from the default schema for a connector",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Get connector attributes",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Connector attributes retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SchemaAttributeListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "No default schema found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{connectorId}/schemas": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of connector schemas for a connector",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "List connector schemas",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "enum": [
              "draft",
              "active",
              "deprecated"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Connector schemas retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorSchemaListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new connector schema defining expected data structure",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Create a connector schema",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "description": "Connector schema request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateConnectorSchemaRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Connector schema created successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorSchemaResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{connectorId}/schemas/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single connector schema by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Get a connector schema",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Connector Schema ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Connector schema retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorSchemaResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete a connector schema",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Delete a connector schema",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Connector Schema ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing connector schema",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Update a connector schema",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Connector Schema ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Connector schema update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateConnectorSchemaRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connector schema updated successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorSchemaResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{connectorId}/schemas/{id}/attributes": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get the list of attributes for a connector schema",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Get schema attributes",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Connector Schema ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Schema attributes retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SchemaAttributeListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Save (replace) the attributes for a connector schema",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Save schema attributes",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Connector Schema ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Schema attributes request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SaveSchemaAttributesRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schema attributes saved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SchemaAttributeListResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{connectorId}/schemas/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Set the status of a connector schema (active or deprecated)",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Schemas"
        ],
        "summary": "Change connector schema status",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "connectorId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Connector Schema ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Status request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeConnectorSchemaStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connector schema status updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorSchemaResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single connector type from the platform catalog by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Catalog"
        ],
        "summary": "Get a connector definition",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Connector retrieved successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing connector type in the platform catalog",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Catalog"
        ],
        "summary": "Update a connector definition",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Connector update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateConnectorRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connector updated successfully",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/connectors/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Activate or deactivate a connector",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Connector Catalog"
        ],
        "summary": "Change connector status",
        "parameters": [
          {
            "type": "string",
            "description": "Connector ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Status request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeConnectorStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connector status updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ConnectorResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-jobs": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of export jobs with optional status and profile filters",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "List export jobs",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by export profile ID",
            "name": "export_profile_id",
            "in": "query"
          },
          {
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Export jobs retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Enqueue a new export job for a given profile. Use execution_mode=full for a complete sync or delta for an incremental sync. Use product_ids for selective publishing.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "Create an export job",
        "parameters": [
          {
            "description": "Export job details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateExportJobRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Export job created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body or missing required fields",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-jobs/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve a single export job by ID, including progress counters",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "Get an export job",
        "parameters": [
          {
            "type": "string",
            "description": "Export job ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Export job retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export job not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-jobs/{id}/cancel": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Cancel a queued or running export job",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "Cancel an export job",
        "parameters": [
          {
            "type": "string",
            "description": "Export job ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Export job cancelled",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Job is already completed or cancelled",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export job not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-jobs/{id}/complete": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Mark a running export job as completed, optionally recording the published feed URL",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "Complete an export job",
        "parameters": [
          {
            "type": "string",
            "description": "Export job ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Optional published feed URL",
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CompleteExportJobRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export job completed",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Job is not in running state",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export job not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-jobs/{id}/items": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of processed items for an export job, with optional status filter",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "List export job items",
        "parameters": [
          {
            "type": "string",
            "description": "Export job ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "csv",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Export job items retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobItemListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export job not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-jobs/{id}/start": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Transition a queued export job to running status",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Jobs"
        ],
        "summary": "Start an export job",
        "parameters": [
          {
            "type": "string",
            "description": "Export job ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Export job started",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Job is not in queued state",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export job not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of export profiles with optional filters",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Profiles"
        ],
        "summary": "List export profiles",
        "parameters": [
          {
            "minimum": 1,
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "maximum": 100,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by channel code",
            "name": "channel_code",
            "in": "query"
          },
          {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search by name or code",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Export profiles retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportProfileListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new export profile that defines which channel, locales, and filters to use when exporting product data",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Profiles"
        ],
        "summary": "Create an export profile",
        "parameters": [
          {
            "description": "Export profile details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateExportProfileRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Export profile created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body or missing required fields",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "409": {
            "description": "Profile with same code already exists",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve a single export profile by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Profiles"
        ],
        "summary": "Get an export profile",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Export profile retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete an export profile by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Profiles"
        ],
        "summary": "Delete an export profile",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing export profile's name, channel, locales, filters, or batch settings",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Profiles"
        ],
        "summary": "Update an export profile",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateExportProfileRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export profile updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Activate or deactivate an export profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Profiles"
        ],
        "summary": "Change export profile status",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Target status",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeExportProfileStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid status value",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{id}/targets": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of delivery targets for an export profile",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Targets"
        ],
        "summary": "List export targets",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "enum": [
              "channel_push",
              "file_download"
            ],
            "type": "string",
            "description": "Filter by delivery type",
            "name": "delivery_type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Export targets retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportTargetListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Add a delivery target (channel push or file download) to an export profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Targets"
        ],
        "summary": "Create an export target",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Export target details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateExportTargetRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Export target created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportTargetResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{id}/targets/{targetId}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve a single export target by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Targets"
        ],
        "summary": "Get an export target",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Export target ID",
            "name": "targetId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Export target retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportTargetResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export target not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete an export target by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Targets"
        ],
        "summary": "Delete an export target",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Export target ID",
            "name": "targetId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export target not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update delivery type, output format, or configuration of an export target",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Export Targets"
        ],
        "summary": "Update an export target",
        "parameters": [
          {
            "type": "string",
            "description": "Export profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Export target ID",
            "name": "targetId",
            "in": "path",
            "required": true
          },
          {
            "description": "Fields to update",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateExportTargetRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Export target updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportTargetResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export target not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{profileId}/attribute-mappings": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of attribute mappings for an export profile",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Attribute Mappings"
        ],
        "summary": "List attribute mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/AttributeMappingListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new attribute mapping for an export profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Attribute Mappings"
        ],
        "summary": "Create an attribute mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "description": "Attribute mapping request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateAttributeMappingRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/AttributeMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Smart diff-based bulk upsert of attribute mappings for an export profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Attribute Mappings"
        ],
        "summary": "Bulk save attribute mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "description": "Attribute mappings to save",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SaveAttributeMappingsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/AttributeMappingListResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{profileId}/attribute-mappings/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single attribute mapping by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Attribute Mappings"
        ],
        "summary": "Get an attribute mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Attribute Mapping ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/AttributeMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete an attribute mapping",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Attribute Mappings"
        ],
        "summary": "Delete an attribute mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Attribute Mapping ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing attribute mapping",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Attribute Mappings"
        ],
        "summary": "Update an attribute mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Attribute Mapping ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Attribute mapping update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateAttributeMappingRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/AttributeMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{profileId}/validation-rules": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of validation rules for an export profile",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Validation Rules"
        ],
        "summary": "List validation rules",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ValidationRuleListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new data validation rule for an export profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Validation Rules"
        ],
        "summary": "Create a validation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "description": "Validation rule request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateValidationRuleRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ValidationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{profileId}/validation-rules/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single validation rule by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Validation Rules"
        ],
        "summary": "Get a validation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Validation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ValidationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete a validation rule",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Validation Rules"
        ],
        "summary": "Delete a validation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Validation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing validation rule",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Validation Rules"
        ],
        "summary": "Update a validation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Validation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Validation rule update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateValidationRuleRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ValidationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/export-profiles/{profileId}/validation-rules/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Activate or deactivate a validation rule",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Validation Rules"
        ],
        "summary": "Change validation rule status",
        "parameters": [
          {
            "type": "string",
            "description": "Export Profile ID",
            "name": "profileId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Validation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Status request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeValidationRuleStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ValidationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of import profiles",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "List import profiles",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by source connection ID",
            "name": "source_id",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by entity type",
            "name": "entity_type",
            "in": "query"
          },
          {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Import profiles retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new import profile for data ingestion",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "Create an import profile",
        "parameters": [
          {
            "description": "Import profile request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateImportProfileRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Import profile created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single import profile by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "Get an import profile",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Import profile retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete an import profile",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "Delete an import profile",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing import profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "Update an import profile",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateImportProfileRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Import profile updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/auto-map": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Fuzzy-match CSV column headers against PIM attribute codes and return mapping suggestions.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import"
        ],
        "summary": "Auto-detect import column mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Headers to auto-map",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AutoMapRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/AutoMapResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/duplicate": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a deep copy of the import profile and all its column mappings.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "Duplicate an import profile",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID to duplicate",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/import": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Accepts the S3 file key of a previously uploaded file and creates an import job",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import"
        ],
        "summary": "Trigger an import job for a pre-uploaded file",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "File key and metadata",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TriggerImportRequest"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Import job created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/TriggerImportResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/mappings": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of mappings for an import profile",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profile Mappings"
        ],
        "summary": "List mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 50,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Mappings retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileMappingListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new column-to-attribute mapping for an import profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profile Mappings"
        ],
        "summary": "Create a mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Mapping request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateImportProfileMappingRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Mapping created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Replace all mappings for an import profile with the provided set",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profile Mappings"
        ],
        "summary": "Bulk upsert mappings",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Bulk mapping request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BulkUpsertImportProfileMappingRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Mappings upserted",
            "schema": {
              "$ref": "#/definitions/response.SuccessResponse"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/mappings/{mappingId}": {
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Delete a single import profile mapping",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profile Mappings"
        ],
        "summary": "Delete a mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Mapping ID",
            "name": "mappingId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing import profile mapping",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profile Mappings"
        ],
        "summary": "Update a mapping",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "Mapping ID",
            "name": "mappingId",
            "in": "path",
            "required": true
          },
          {
            "description": "Update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateImportProfileMappingRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Mapping updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileMappingResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/preview": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Parse the first N rows of an uploaded CSV/XLSX and return headers + rows.",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import"
        ],
        "summary": "Preview imported file content",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "type": "file",
            "description": "CSV or XLSX file",
            "name": "file",
            "in": "formData"
          },
          {
            "type": "string",
            "description": "Previously uploaded S3 key",
            "name": "s3_key",
            "in": "formData"
          },
          {
            "type": "integer",
            "description": "Max rows to return (default 10, max 100)",
            "name": "limit",
            "in": "formData"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/FilePreviewResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Activate or deactivate an import profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import Profiles"
        ],
        "summary": "Change import profile status",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Status request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeImportProfileStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Import profile status updated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ImportProfileResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/template": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Generate and stream a CSV template with correct headers for this import profile.",
        "produces": [
          "text/csv"
        ],
        "tags": [
          "Import"
        ],
        "summary": "Download import template CSV",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file",
            "schema": {
              "type": "file"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/import-profiles/{id}/upload-url": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Returns a presigned PUT URL so the client can upload the CSV/XLSX file directly to S3",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Import"
        ],
        "summary": "Get a presigned URL for direct S3 upload",
        "parameters": [
          {
            "type": "string",
            "description": "Import profile ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "File metadata",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GetImportUploadURLRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/GetImportUploadURLResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/quick-publish": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Immediately enqueue an export job for a set of specific products on a given connection, bypassing the scheduled export pipeline",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Quick Publish"
        ],
        "summary": "Quick publish products",
        "parameters": [
          {
            "description": "Quick publish request with connection ID and product IDs",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/QuickPublishRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Quick publish job created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/ExportJobResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body or missing required fields",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Connection not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/quick-publish/products": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve a paginated list of products that can be selected for quick publishing, with optional search and modification date filter",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Quick Publish"
        ],
        "summary": "List products for quick publish",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 10,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term to filter products by name or SKU",
            "name": "search",
            "in": "query"
          },
          {
            "type": "string",
            "description": "ISO 8601 timestamp; return only products modified after this date",
            "name": "modified_since",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Products retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/QuickPublishProductListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/shopify/oauth/authorize": {
      "get": {
        "description": "Redirects the user to Shopify's OAuth authorization page. Requires connection_id and tenant_id as query parameters.",
        "produces": [
          "text/html"
        ],
        "tags": [
          "Shopify OAuth"
        ],
        "summary": "Initiate Shopify OAuth flow",
        "parameters": [
          {
            "type": "string",
            "description": "Connection ID",
            "name": "connection_id",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Tenant ID",
            "name": "tenant_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to Shopify OAuth authorization page"
          },
          "400": {
            "description": "Missing or invalid parameters",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Connection not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/shopify/oauth/callback": {
      "get": {
        "description": "Handles the OAuth callback from Shopify, exchanges the authorization code for an access token, and stores it on the connection credentials.",
        "produces": [
          "text/html"
        ],
        "tags": [
          "Shopify OAuth"
        ],
        "summary": "Handle Shopify OAuth callback",
        "parameters": [
          {
            "type": "string",
            "description": "Authorization code from Shopify",
            "name": "code",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "State parameter (connection_id:tenant_id)",
            "name": "state",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "Shopify shop domain",
            "name": "shop",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "HMAC signature for request verification",
            "name": "hmac",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "HTML page confirming successful connection",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "Missing or invalid OAuth parameters",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "403": {
            "description": "HMAC verification failed",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Connection not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "502": {
            "description": "Token exchange failed",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/snapshots": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of snapshots, optionally filtered by profile and status",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Snapshots"
        ],
        "summary": "List snapshots",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by export profile ID",
            "name": "export_profile_id",
            "in": "query"
          },
          {
            "enum": [
              "pending",
              "ready",
              "stale"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshots retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SnapshotListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Capture a point-in-time snapshot of the product catalog for a given export profile",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Snapshots"
        ],
        "summary": "Create a snapshot",
        "parameters": [
          {
            "description": "Snapshot details",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateSnapshotRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Snapshot created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SnapshotResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Invalid request body",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Export profile not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/snapshots/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieve a single snapshot by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Snapshots"
        ],
        "summary": "Get a snapshot",
        "parameters": [
          {
            "type": "string",
            "description": "Snapshot ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SnapshotResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Snapshot not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/snapshots/{snapshotId}/items": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of items within a snapshot. Use has_changed=true to return only items that changed since the previous snapshot.",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Snapshots"
        ],
        "summary": "List snapshot items",
        "parameters": [
          {
            "type": "string",
            "description": "Snapshot ID",
            "name": "snapshotId",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Items per page",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Filter to items that changed since the previous snapshot",
            "name": "has_changed",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot items retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/SnapshotItemListResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "has_changed must be a boolean",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Snapshot not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/transformation-rules": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of transformation rules",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Transformation Rules"
        ],
        "summary": "List transformation rules",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by rule type",
            "name": "rule_type",
            "in": "query"
          },
          {
            "type": "boolean",
            "description": "Filter by active status",
            "name": "is_active",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Search term",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/TransformationRuleListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new data transformation rule",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Transformation Rules"
        ],
        "summary": "Create a transformation rule",
        "parameters": [
          {
            "description": "Transformation rule request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateTransformationRuleRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/TransformationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/transformation-rules/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single transformation rule by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Transformation Rules"
        ],
        "summary": "Get a transformation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Transformation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/TransformationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete a transformation rule",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Transformation Rules"
        ],
        "summary": "Delete a transformation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Transformation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Update an existing transformation rule",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Transformation Rules"
        ],
        "summary": "Update a transformation rule",
        "parameters": [
          {
            "type": "string",
            "description": "Transformation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Transformation rule update request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateTransformationRuleRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/TransformationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/transformation-rules/{id}/status": {
      "patch": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Activate or deactivate a transformation rule",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Transformation Rules"
        ],
        "summary": "Change transformation rule status",
        "parameters": [
          {
            "type": "string",
            "description": "Transformation Rule ID",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "Status request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangeTransformationRuleStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/TransformationRuleResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a paginated list of webhooks",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhooks",
        "parameters": [
          {
            "type": "integer",
            "default": 1,
            "description": "Page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "integer",
            "default": 20,
            "description": "Page size",
            "name": "page_size",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Filter by import profile ID",
            "name": "import_profile_id",
            "in": "query"
          },
          {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Filter by status",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhooks retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.PaginatedSuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/WebhookListResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Create a new webhook endpoint for push-based data import",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook",
        "parameters": [
          {
            "description": "Webhook request",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateWebhookRequest"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Webhook created",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/WebhookResponse"
                    }
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get a single webhook by ID",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a webhook",
        "parameters": [
          {
            "type": "string",
            "description": "Webhook ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook retrieved",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/WebhookResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      },
      "delete": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Soft-delete a webhook endpoint",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook",
        "parameters": [
          {
            "type": "string",
            "description": "Webhook ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    },
    "/webhooks/{id}/regenerate-secret": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Generate a new HMAC secret for a webhook",
        "produces": [
          "application/json"
        ],
        "tags": [
          "Webhooks"
        ],
        "summary": "Regenerate webhook secret",
        "parameters": [
          {
            "type": "string",
            "description": "Webhook ID",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook secret regenerated",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.SuccessResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/definitions/WebhookResponse"
                    }
                  }
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/response.ErrorResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "response.Error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "field": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "response.ErrorResponse": {
      "type": "object",
      "properties": {
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/response.Error"
          }
        },
        "message": {
          "type": "string"
        },
        "success": {
          "type": "boolean"
        }
      }
    },
    "response.PaginatedSuccessResponse": {
      "type": "object",
      "properties": {
        "data": {},
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        },
        "success": {
          "type": "boolean"
        }
      }
    },
    "response.PaginationInfo": {
      "type": "object",
      "properties": {
        "has_next": {
          "type": "boolean"
        },
        "page": {
          "type": "integer"
        },
        "page_size": {
          "type": "integer"
        },
        "total_items": {
          "type": "integer"
        },
        "total_pages": {
          "type": "integer"
        }
      }
    },
    "response.SuccessResponse": {
      "type": "object",
      "properties": {
        "data": {},
        "success": {
          "type": "boolean"
        }
      }
    },
    "ActorSummary": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "ChangeConnectionStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ],
          "example": "active"
        }
      }
    },
    "ChangeConnectorSchemaStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "deprecated"
          ],
          "example": "active"
        }
      }
    },
    "ChangeConnectorStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ],
          "example": "active"
        }
      }
    },
    "ConnectionListItem": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "shopify-us"
        },
        "connection_type": {
          "type": "string",
          "example": "api"
        },
        "connector_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
        },
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d3"
        },
        "logo_url": {
          "type": "string",
          "example": "https://cdn.catazenta.com/connectors/shopify.svg"
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string",
          "example": "Shopify US Store"
        },
        "status": {
          "type": "string",
          "example": "active"
        }
      }
    },
    "ConnectionListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConnectionListItem"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ConnectionResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "example": "shopify-us"
        },
        "concurrency_limit": {
          "type": "integer",
          "example": 1
        },
        "connection_type": {
          "type": "string",
          "example": "api"
        },
        "connector_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
        },
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "credentials": {
          "type": "object",
          "additionalProperties": true
        },
        "endpoint_url": {
          "type": "string",
          "example": "https://my-store.myshopify.com"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d3"
        },
        "logo_url": {
          "type": "string",
          "example": "https://cdn.catazenta.com/connectors/shopify.svg"
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string",
          "example": "Shopify US Store"
        },
        "rate_limit_per_sec": {
          "type": "integer",
          "example": 10
        },
        "status": {
          "type": "string",
          "example": "active"
        }
      }
    },
    "ConnectorListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConnectorResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ConnectorResponse": {
      "type": "object",
      "properties": {
        "auth_type": {
          "type": "string",
          "example": "oauth2"
        },
        "code": {
          "type": "string",
          "example": "shopify"
        },
        "config_schema": {
          "type": "object",
          "additionalProperties": true
        },
        "connector_type": {
          "type": "string",
          "example": "api"
        },
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "description": {
          "type": "string",
          "example": "Shopify e-commerce platform connector"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
        },
        "is_active": {
          "type": "boolean",
          "example": true
        },
        "logo_url": {
          "type": "string",
          "example": "https://cdn.catazenta.com/connectors/shopify.svg"
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "name": {
          "type": "string",
          "example": "Shopify"
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        },
        "supported_content_types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "products"
          ]
        }
      }
    },
    "ConnectorSchemaListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ConnectorSchemaResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ConnectorSchemaResponse": {
      "type": "object",
      "properties": {
        "connector_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
        },
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "description": {
          "type": "string",
          "example": "Standard Shopify product data structure"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d7"
        },
        "is_default": {
          "type": "boolean",
          "example": true
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string",
          "example": "Shopify Product Schema"
        },
        "schema_definition": {
          "type": "object",
          "additionalProperties": true
        },
        "status": {
          "type": "string",
          "example": "active"
        },
        "version": {
          "type": "string",
          "example": "1.0"
        }
      }
    },
    "CreateConnectionRequest": {
      "type": "object",
      "required": [
        "code",
        "connection_type",
        "connector_id",
        "name"
      ],
      "properties": {
        "code": {
          "type": "string",
          "example": "shopify-us"
        },
        "connection_type": {
          "type": "string",
          "example": "api"
        },
        "connector_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
        },
        "credentials": {
          "type": "object",
          "additionalProperties": true
        },
        "endpoint_url": {
          "type": "string",
          "example": "https://my-store.myshopify.com"
        },
        "name": {
          "type": "string",
          "example": "Shopify US Store"
        }
      }
    },
    "CreateConnectorRequest": {
      "type": "object",
      "required": [
        "auth_type",
        "code",
        "connector_type",
        "name"
      ],
      "properties": {
        "auth_type": {
          "type": "string",
          "example": "oauth2"
        },
        "code": {
          "type": "string",
          "example": "shopify"
        },
        "config_schema": {
          "type": "object",
          "additionalProperties": true
        },
        "connector_type": {
          "type": "string",
          "example": "api"
        },
        "description": {
          "type": "string",
          "example": "Shopify e-commerce platform connector"
        },
        "logo_url": {
          "type": "string",
          "example": "https://cdn.catazenta.com/connectors/shopify.svg"
        },
        "name": {
          "type": "string",
          "example": "Shopify"
        },
        "supported_content_types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "products"
          ]
        }
      }
    },
    "CreateConnectorSchemaRequest": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "description": {
          "type": "string",
          "example": "Standard Shopify product data structure"
        },
        "is_default": {
          "type": "boolean",
          "example": true
        },
        "name": {
          "type": "string",
          "example": "Shopify Product Schema"
        },
        "schema_definition": {
          "type": "object",
          "additionalProperties": true
        },
        "version": {
          "type": "string",
          "example": "1.0"
        }
      }
    },
    "SaveSchemaAttributesRequest": {
      "type": "object",
      "properties": {
        "attributes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SchemaAttributeRequest"
          }
        }
      }
    },
    "SchemaAttributeListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SchemaAttributeResponse"
          }
        }
      }
    },
    "SchemaAttributeRequest": {
      "type": "object",
      "required": [
        "attribute_code",
        "data_type"
      ],
      "properties": {
        "attribute_code": {
          "type": "string",
          "example": "body_html"
        },
        "constraints": {
          "type": "object",
          "additionalProperties": true
        },
        "data_type": {
          "type": "string",
          "example": "string"
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "mapping_scope": {
          "type": "string",
          "example": "product"
        },
        "name": {
          "type": "string",
          "example": "Product Description (HTML)"
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        }
      }
    },
    "SchemaAttributeResponse": {
      "type": "object",
      "properties": {
        "attribute_code": {
          "type": "string",
          "example": "body_html"
        },
        "constraints": {
          "type": "object",
          "additionalProperties": true
        },
        "data_type": {
          "type": "string",
          "example": "string"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d8"
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "mapping_scope": {
          "type": "string",
          "example": "product"
        },
        "name": {
          "type": "string",
          "example": "Product Description (HTML)"
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        }
      }
    },
    "UpdateConnectionRequest": {
      "type": "object",
      "properties": {
        "concurrency_limit": {
          "type": "integer",
          "example": 2
        },
        "credentials": {
          "type": "object",
          "additionalProperties": true
        },
        "endpoint_url": {
          "type": "string",
          "example": "https://my-store.myshopify.com"
        },
        "name": {
          "type": "string",
          "example": "Shopify US Store (Updated)"
        },
        "rate_limit_per_sec": {
          "type": "integer",
          "example": 10
        }
      }
    },
    "UpdateConnectorRequest": {
      "type": "object",
      "properties": {
        "config_schema": {
          "type": "object",
          "additionalProperties": true
        },
        "description": {
          "type": "string",
          "example": "Updated Shopify connector description"
        },
        "logo_url": {
          "type": "string",
          "example": "https://cdn.catazenta.com/connectors/shopify-plus.svg"
        },
        "name": {
          "type": "string",
          "example": "Shopify Plus"
        }
      }
    },
    "UpdateConnectorSchemaRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "example": "Updated Shopify product schema"
        },
        "is_default": {
          "type": "boolean",
          "example": true
        },
        "name": {
          "type": "string",
          "example": "Shopify Product Schema v2"
        },
        "schema_definition": {
          "type": "object",
          "additionalProperties": true
        },
        "version": {
          "type": "string",
          "example": "2.0"
        }
      }
    },
    "CategoryMappingListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CategoryMappingResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "CategoryMappingResponse": {
      "type": "object",
      "properties": {
        "category_code": {
          "type": "string"
        },
        "category_id": {
          "type": "string"
        },
        "category_path": {
          "type": "string"
        },
        "channel_code": {
          "type": "string"
        },
        "connection_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "external_collection_id": {
          "type": "string"
        },
        "external_handle": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "last_synced_at": {
          "type": "string"
        },
        "modified_at": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "ChangeExportProfileStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ]
        }
      }
    },
    "CompleteExportJobRequest": {
      "type": "object",
      "properties": {
        "published_feed_url": {
          "type": "string"
        }
      }
    },
    "CreateCategoryMappingRequest": {
      "type": "object",
      "required": [
        "category_code",
        "category_id",
        "category_path",
        "channel_code",
        "connection_id",
        "external_collection_id",
        "external_handle"
      ],
      "properties": {
        "category_code": {
          "type": "string"
        },
        "category_id": {
          "type": "string"
        },
        "category_path": {
          "type": "string"
        },
        "channel_code": {
          "type": "string"
        },
        "connection_id": {
          "type": "string"
        },
        "external_collection_id": {
          "type": "string"
        },
        "external_handle": {
          "type": "string"
        }
      }
    },
    "CreateExportJobRequest": {
      "type": "object",
      "required": [
        "export_profile_id"
      ],
      "properties": {
        "connection_id": {
          "type": "string"
        },
        "execution_mode": {
          "type": "string"
        },
        "export_profile_id": {
          "type": "string"
        },
        "product_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "publish_type": {
          "type": "string"
        },
        "trigger_type": {
          "type": "string"
        }
      }
    },
    "CreateExportProfileRequest": {
      "type": "object",
      "required": [
        "code",
        "name"
      ],
      "properties": {
        "batch_size": {
          "type": "integer"
        },
        "channel_code": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "connection_id": {
          "type": "string"
        },
        "connector_id": {
          "type": "string"
        },
        "connector_schema_id": {
          "type": "string"
        },
        "filters": {
          "type": "object",
          "additionalProperties": true
        },
        "locale_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "with_media": {
          "type": "boolean"
        }
      }
    },
    "CreateExportTargetRequest": {
      "type": "object",
      "required": [
        "delivery_type",
        "output_format"
      ],
      "properties": {
        "config": {
          "type": "object",
          "additionalProperties": true
        },
        "connection_id": {
          "type": "string"
        },
        "delivery_type": {
          "type": "string"
        },
        "output_format": {
          "type": "string"
        }
      }
    },
    "CreateSnapshotRequest": {
      "type": "object",
      "required": [
        "export_profile_id",
        "job_id"
      ],
      "properties": {
        "execution_mode": {
          "type": "string"
        },
        "export_profile_id": {
          "type": "string"
        },
        "job_id": {
          "type": "string"
        },
        "previous_snapshot_id": {
          "type": "string"
        }
      }
    },
    "ExportJobItemListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExportJobItemResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ExportJobItemResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "entity_code": {
          "type": "string"
        },
        "entity_id": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": true
        },
        "export_job_id": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "modified_at": {
          "type": "string"
        },
        "stage": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "ExportJobListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExportJobResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ExportJobResponse": {
      "type": "object",
      "properties": {
        "completed_at": {
          "type": "string"
        },
        "connection_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "error_summary": {
          "type": "object",
          "additionalProperties": true
        },
        "execution_mode": {
          "type": "string"
        },
        "export_profile_id": {
          "type": "string"
        },
        "failed_items": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "processed_items": {
          "type": "integer"
        },
        "publish_type": {
          "type": "string"
        },
        "published_feed_url": {
          "type": "string"
        },
        "skipped_items": {
          "type": "integer"
        },
        "started_at": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "successful_items": {
          "type": "integer"
        },
        "total_items": {
          "type": "integer"
        },
        "trigger_type": {
          "type": "string"
        }
      }
    },
    "ExportProfileListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExportProfileResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ExportProfileResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "connector_id": {
          "type": "string"
        },
        "connector_schema_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "id": {
          "type": "string"
        },
        "modified_at": {
          "type": "string"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "ExportTargetListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExportTargetResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ExportTargetResponse": {
      "type": "object",
      "properties": {
        "delivery_type": {
          "type": "string"
        },
        "export_profile_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "output_format": {
          "type": "string"
        }
      }
    },
    "QuickPublishProductListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/QuickPublishProductResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "QuickPublishProductResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "last_published_at": {
          "type": "string"
        },
        "last_published_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "modified_at": {
          "type": "string"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string"
        },
        "product_type": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "thumbnail": {
          "type": "string"
        }
      }
    },
    "QuickPublishRequest": {
      "type": "object",
      "required": [
        "export_profile_id",
        "product_ids"
      ],
      "properties": {
        "connection_id": {
          "type": "string"
        },
        "export_profile_id": {
          "type": "string"
        },
        "product_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "SnapshotItemListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SnapshotItemResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "SnapshotItemResponse": {
      "type": "object",
      "properties": {
        "checksum": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "has_changed": {
          "type": "boolean"
        },
        "id": {
          "type": "string"
        },
        "previous_checksum": {
          "type": "string"
        },
        "product_code": {
          "type": "string"
        },
        "product_id": {
          "type": "string"
        },
        "snapshot_id": {
          "type": "string"
        }
      }
    },
    "SnapshotListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SnapshotResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "SnapshotResponse": {
      "type": "object",
      "properties": {
        "checksum": {
          "type": "string"
        },
        "completed_at": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "type": "string"
        },
        "execution_mode": {
          "type": "string"
        },
        "expires_at": {
          "type": "string"
        },
        "export_profile_id": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "job_id": {
          "type": "string"
        },
        "mapped_data_ref": {
          "type": "string"
        },
        "previous_snapshot_id": {
          "type": "string"
        },
        "product_count": {
          "type": "integer"
        },
        "raw_data_ref": {
          "type": "string"
        },
        "size_bytes": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "UpdateCategoryMappingRequest": {
      "type": "object",
      "properties": {
        "external_collection_id": {
          "type": "string"
        },
        "external_handle": {
          "type": "string"
        }
      }
    },
    "UpdateExportProfileRequest": {
      "type": "object",
      "properties": {
        "batch_size": {
          "type": "integer"
        },
        "channel_code": {
          "type": "string"
        },
        "filters": {
          "type": "object",
          "additionalProperties": true
        },
        "locale_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "with_media": {
          "type": "boolean"
        }
      }
    },
    "UpdateExportTargetRequest": {
      "type": "object",
      "properties": {
        "config": {
          "type": "object",
          "additionalProperties": true
        },
        "connection_id": {
          "type": "string"
        },
        "delivery_type": {
          "type": "string"
        },
        "output_format": {
          "type": "string"
        }
      }
    },
    "AutoMapRequest": {
      "type": "object",
      "required": [
        "headers"
      ],
      "properties": {
        "headers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "AutoMapResponse": {
      "type": "object",
      "properties": {
        "mappings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AutoMapSuggestion"
          }
        }
      }
    },
    "AutoMapSuggestion": {
      "type": "object",
      "properties": {
        "channel_code": {
          "type": "string"
        },
        "confidence": {
          "description": "0.0-1.0",
          "type": "number"
        },
        "locale_code": {
          "type": "string"
        },
        "source_column": {
          "type": "string"
        },
        "target_attribute_code": {
          "type": "string"
        },
        "target_attribute_name": {
          "type": "string"
        }
      }
    },
    "BulkUpsertImportProfileMappingRequest": {
      "type": "object",
      "properties": {
        "mappings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImportProfileMappingEntry"
          }
        }
      }
    },
    "ChangeImportProfileStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ],
          "example": "active"
        }
      }
    },
    "CreateImportProfileMappingRequest": {
      "type": "object",
      "required": [
        "attribute_type",
        "pim_attribute",
        "source_column"
      ],
      "properties": {
        "attribute_type": {
          "type": "string",
          "example": "text"
        },
        "channel_code": {
          "type": "string"
        },
        "default_value": {
          "type": "string"
        },
        "is_identifier": {
          "type": "boolean",
          "example": false
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "locale_code": {
          "type": "string"
        },
        "pim_attribute": {
          "type": "string",
          "example": "name"
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        },
        "source_column": {
          "type": "string",
          "example": "product_name"
        },
        "transformation": {
          "type": "string",
          "example": "trim"
        }
      }
    },
    "CreateImportProfileRequest": {
      "type": "object",
      "required": [
        "code",
        "comparison_attribute",
        "entity_type",
        "import_mode",
        "input_format",
        "name"
      ],
      "properties": {
        "batch_size": {
          "type": "integer",
          "example": 100
        },
        "channel_code": {
          "type": "string",
          "example": "ecommerce"
        },
        "code": {
          "type": "string",
          "example": "product-csv-import"
        },
        "comparison_attribute": {
          "type": "string",
          "example": "sku"
        },
        "entity_type": {
          "type": "string",
          "example": "products"
        },
        "error_handling": {
          "type": "object",
          "additionalProperties": true
        },
        "file_config": {
          "type": "object",
          "additionalProperties": true
        },
        "filters": {
          "type": "object",
          "additionalProperties": true
        },
        "import_mode": {
          "type": "string",
          "example": "create_and_update"
        },
        "input_format": {
          "type": "string",
          "example": "csv"
        },
        "locale_codes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "en_US"
          ]
        },
        "name": {
          "type": "string",
          "example": "Product CSV Import"
        },
        "source_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2"
        },
        "with_media": {
          "type": "boolean",
          "example": false
        }
      }
    },
    "CreateWebhookRequest": {
      "type": "object",
      "required": [
        "entity_type",
        "import_profile_id",
        "name",
        "path"
      ],
      "properties": {
        "entity_type": {
          "type": "string",
          "example": "products"
        },
        "import_profile_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4"
        },
        "name": {
          "type": "string",
          "example": "SAP Product Webhook"
        },
        "path": {
          "type": "string",
          "example": "sap-products"
        }
      }
    },
    "FilePreviewResponse": {
      "type": "object",
      "properties": {
        "detected_delimiter": {
          "type": "string"
        },
        "headers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "total_row_count": {
          "type": "integer"
        }
      }
    },
    "GetImportUploadURLRequest": {
      "type": "object",
      "required": [
        "content_type",
        "file_name"
      ],
      "properties": {
        "content_type": {
          "type": "string",
          "example": "text/csv"
        },
        "file_name": {
          "type": "string",
          "example": "products.csv"
        }
      }
    },
    "GetImportUploadURLResponse": {
      "type": "object",
      "properties": {
        "content_type": {
          "type": "string"
        },
        "expires_in": {
          "type": "integer"
        },
        "key": {
          "type": "string"
        },
        "upload_url": {
          "type": "string"
        }
      }
    },
    "ImportProfileListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImportProfileResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ImportProfileMappingEntry": {
      "type": "object",
      "properties": {
        "attribute_type": {
          "type": "string",
          "example": "text"
        },
        "channel_code": {
          "type": "string"
        },
        "default_value": {
          "type": "string"
        },
        "is_identifier": {
          "type": "boolean",
          "example": false
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "locale_code": {
          "type": "string"
        },
        "pim_attribute": {
          "type": "string",
          "example": "name"
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        },
        "source_column": {
          "type": "string",
          "example": "product_name"
        },
        "transformation": {
          "type": "string"
        }
      }
    },
    "ImportProfileMappingListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ImportProfileMappingResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ImportProfileMappingResponse": {
      "type": "object",
      "properties": {
        "attribute_type": {
          "type": "string"
        },
        "channel_code": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "default_value": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "import_profile_id": {
          "type": "string"
        },
        "is_identifier": {
          "type": "boolean"
        },
        "is_required": {
          "type": "boolean"
        },
        "locale_code": {
          "type": "string"
        },
        "modified_at": {
          "type": "string"
        },
        "pim_attribute": {
          "type": "string"
        },
        "sort_order": {
          "type": "integer"
        },
        "source_column": {
          "type": "string"
        },
        "transformation": {
          "type": "string"
        }
      }
    },
    "ImportProfileResponse": {
      "type": "object",
      "properties": {
        "batch_size": {
          "type": "integer"
        },
        "channel_code": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "comparison_attribute": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "entity_type": {
          "type": "string"
        },
        "error_handling": {
          "type": "object",
          "additionalProperties": true
        },
        "file_config": {
          "type": "object",
          "additionalProperties": true
        },
        "id": {
          "type": "string"
        },
        "import_mode": {
          "type": "string"
        },
        "input_format": {
          "type": "string"
        },
        "locale_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "modified_at": {
          "type": "string"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string"
        },
        "source_id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "with_media": {
          "type": "boolean"
        }
      }
    },
    "TriggerImportRequest": {
      "type": "object",
      "required": [
        "file_key",
        "original_name"
      ],
      "properties": {
        "file_key": {
          "type": "string",
          "example": "imports/tenant/profile/uuid.csv"
        },
        "original_name": {
          "type": "string",
          "example": "products.csv"
        }
      }
    },
    "TriggerImportResponse": {
      "type": "object",
      "properties": {
        "job_id": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "UpdateImportProfileMappingRequest": {
      "type": "object",
      "properties": {
        "attribute_type": {
          "type": "string"
        },
        "channel_code": {
          "type": "string"
        },
        "default_value": {
          "type": "string"
        },
        "is_identifier": {
          "type": "boolean"
        },
        "is_required": {
          "type": "boolean"
        },
        "locale_code": {
          "type": "string"
        },
        "pim_attribute": {
          "type": "string"
        },
        "sort_order": {
          "type": "integer"
        },
        "source_column": {
          "type": "string"
        },
        "transformation": {
          "type": "string"
        }
      }
    },
    "UpdateImportProfileRequest": {
      "type": "object",
      "properties": {
        "batch_size": {
          "type": "integer",
          "example": 200
        },
        "channel_code": {
          "type": "string",
          "example": "ecommerce"
        },
        "comparison_attribute": {
          "type": "string",
          "example": "sku"
        },
        "error_handling": {
          "type": "object",
          "additionalProperties": true
        },
        "file_config": {
          "type": "object",
          "additionalProperties": true
        },
        "filters": {
          "type": "object",
          "additionalProperties": true
        },
        "import_mode": {
          "type": "string",
          "example": "update_only"
        },
        "input_format": {
          "type": "string",
          "example": "xlsx"
        },
        "locale_codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "example": "Product CSV Import (Updated)"
        },
        "with_media": {
          "type": "boolean"
        }
      }
    },
    "WebhookListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/WebhookResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "WebhookResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "entity_type": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "import_profile_id": {
          "type": "string"
        },
        "modified_at": {
          "type": "string"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "secret": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "AttributeMappingListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AttributeMappingResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "AttributeMappingResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "default_value": {
          "type": "string",
          "example": "N/A"
        },
        "export_profile_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d9"
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "mapping_scope": {
          "type": "string",
          "example": "product"
        },
        "mapping_type": {
          "type": "string",
          "example": "direct"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        },
        "source_attribute_code": {
          "type": "string",
          "example": "description"
        },
        "target_attribute_code": {
          "type": "string",
          "example": "body_html"
        },
        "transformation_rule_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e0"
        }
      }
    },
    "ChangeTransformationRuleStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ],
          "example": "active"
        }
      }
    },
    "ChangeValidationRuleStatusRequest": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ],
          "example": "active"
        }
      }
    },
    "CreateAttributeMappingRequest": {
      "type": "object",
      "required": [
        "mapping_type",
        "source_attribute_code",
        "target_attribute_code"
      ],
      "properties": {
        "default_value": {
          "type": "string",
          "example": "N/A"
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "mapping_scope": {
          "type": "string",
          "example": "product"
        },
        "mapping_type": {
          "type": "string",
          "example": "direct"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        },
        "sort_order": {
          "type": "integer",
          "example": 1
        },
        "source_attribute_code": {
          "type": "string",
          "example": "description"
        },
        "target_attribute_code": {
          "type": "string",
          "example": "body_html"
        },
        "transformation_rule_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e0"
        }
      }
    },
    "CreateTransformationRuleRequest": {
      "type": "object",
      "required": [
        "name",
        "rule_type"
      ],
      "properties": {
        "description": {
          "type": "string",
          "example": "Converts weight from kilograms to pounds"
        },
        "name": {
          "type": "string",
          "example": "KG to LB Converter"
        },
        "parameters": {
          "type": "object",
          "additionalProperties": true
        },
        "rule_definition": {
          "type": "object",
          "additionalProperties": true
        },
        "rule_type": {
          "type": "string",
          "example": "calculate"
        },
        "source_attributes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "weight"
          ]
        }
      }
    },
    "CreateValidationRuleRequest": {
      "type": "object",
      "required": [
        "channel_attribute",
        "error_message",
        "validation_type"
      ],
      "properties": {
        "channel_attribute": {
          "type": "string",
          "example": "title"
        },
        "error_message": {
          "type": "string",
          "example": "Title is required for Shopify products"
        },
        "execution_order": {
          "type": "integer",
          "example": 1
        },
        "severity": {
          "type": "string",
          "example": "error"
        },
        "stop_on_failure": {
          "type": "boolean",
          "example": true
        },
        "validation_logic": {
          "type": "object",
          "additionalProperties": true
        },
        "validation_type": {
          "type": "string",
          "example": "required"
        }
      }
    },
    "SaveAttributeMappingsRequest": {
      "type": "object",
      "properties": {
        "mappings": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreateAttributeMappingRequest"
          }
        }
      }
    },
    "TransformationRuleListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TransformationRuleResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "TransformationRuleResponse": {
      "type": "object",
      "properties": {
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "description": {
          "type": "string",
          "example": "Converts weight from kilograms to pounds"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e0"
        },
        "is_active": {
          "type": "boolean",
          "example": true
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "name": {
          "type": "string",
          "example": "KG to LB Converter"
        },
        "parameters": {
          "type": "object",
          "additionalProperties": true
        },
        "rule_definition": {
          "type": "object",
          "additionalProperties": true
        },
        "rule_type": {
          "type": "string",
          "example": "calculate"
        },
        "rule_version": {
          "type": "integer",
          "example": 1
        },
        "source_attributes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "weight"
          ]
        }
      }
    },
    "UpdateAttributeMappingRequest": {
      "type": "object",
      "properties": {
        "default_value": {
          "type": "string",
          "example": "N/A"
        },
        "is_required": {
          "type": "boolean",
          "example": true
        },
        "mapping_scope": {
          "type": "string",
          "example": "product"
        },
        "mapping_type": {
          "type": "string",
          "example": "direct"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        },
        "sort_order": {
          "type": "integer",
          "example": 2
        },
        "source_attribute_code": {
          "type": "string",
          "example": "short_description"
        },
        "target_attribute_code": {
          "type": "string",
          "example": "body_html"
        },
        "transformation_rule_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e0"
        }
      }
    },
    "UpdateTransformationRuleRequest": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "example": "Updated weight conversion rule"
        },
        "name": {
          "type": "string",
          "example": "KG to LB Converter (Updated)"
        },
        "parameters": {
          "type": "object",
          "additionalProperties": true
        },
        "rule_definition": {
          "type": "object",
          "additionalProperties": true
        },
        "rule_type": {
          "type": "string",
          "example": "calculate"
        },
        "source_attributes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "weight"
          ]
        }
      }
    },
    "UpdateValidationRuleRequest": {
      "type": "object",
      "properties": {
        "channel_attribute": {
          "type": "string",
          "example": "title"
        },
        "error_message": {
          "type": "string",
          "example": "Title must be less than 255 characters"
        },
        "execution_order": {
          "type": "integer",
          "example": 2
        },
        "severity": {
          "type": "string",
          "example": "warning"
        },
        "stop_on_failure": {
          "type": "boolean",
          "example": false
        },
        "validation_logic": {
          "type": "object",
          "additionalProperties": true
        },
        "validation_type": {
          "type": "string",
          "example": "format"
        }
      }
    },
    "ValidationRuleListResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ValidationRuleResponse"
          }
        },
        "pagination": {
          "$ref": "#/definitions/response.PaginationInfo"
        }
      }
    },
    "ValidationRuleResponse": {
      "type": "object",
      "properties": {
        "channel_attribute": {
          "type": "string",
          "example": "title"
        },
        "created_at": {
          "type": "string",
          "example": "2026-01-18T10:30:00Z"
        },
        "created_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "error_message": {
          "type": "string",
          "example": "Title is required for Shopify products"
        },
        "execution_order": {
          "type": "integer",
          "example": 1
        },
        "export_profile_id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4"
        },
        "id": {
          "type": "string",
          "example": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8e1"
        },
        "is_active": {
          "type": "boolean",
          "example": true
        },
        "modified_at": {
          "type": "string",
          "example": "2026-01-18T15:45:00Z"
        },
        "modified_by": {
          "$ref": "#/definitions/ActorSummary"
        },
        "severity": {
          "type": "string",
          "example": "error"
        },
        "stop_on_failure": {
          "type": "boolean",
          "example": true
        },
        "validation_logic": {
          "type": "object",
          "additionalProperties": true
        },
        "validation_type": {
          "type": "string",
          "example": "required"
        }
      }
    }
  },
  "securityDefinitions": {
    "BearerAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  }
}