{
 "openapi": "3.0.1",
 "info": {
  "title": "Importy API",
  "version": "2026-10-08",
  "description": "Masowy import zamówień i płatności z plików.\n\nAdres bazowy: `https://{instancja}-importer-api.enterprise.sellrocket.pl` — `{instancja}` to nazwa Twojej instancji Sellrocket, którą otrzymasz przy jej uruchomieniu.\n\nWszystkie żądania wymagają nagłówka `Authorization: Bearer <token>` — zobacz [Uwierzytelnianie](../../start/uwierzytelnianie/).\n\n**Specyfikacja OpenAPI:** [importy.json](../../specs/importy.json) — do importu w Postmanie/Insomnii lub generowania klienta."
 },
 "servers": [
  {
   "url": "https://{instancja}-importer-api.enterprise.sellrocket.pl",
   "variables": {
    "instancja": {
     "default": "twoja-instancja",
     "description": "Nazwa Twojej instancji Sellrocket"
    }
   }
  }
 ],
 "tags": [
  {
   "name": "Zadania asynchroniczne"
  },
  {
   "name": "Importy"
  },
  {
   "name": "Import zamówień"
  },
  {
   "name": "Import płatności"
  },
  {
   "name": "Plik importu"
  },
  {
   "name": "Wyniki importu"
  }
 ],
 "paths": {
  "/api/v2/ImportResults/orders/{importId}/results": {
   "get": {
    "tags": [
     "Wyniki importu"
    ],
    "parameters": [
     {
      "name": "importId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PageOfImportOrdersLineResultResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-importresults-orders-importid-results",
    "summary": "Pobierz wyniki wierszy importu zamówień",
    "description": "Zwraca stronicowane wyniki przetworzenia poszczególnych wierszy pliku importu zamówień."
   }
  },
  "/api/v1/Imports": {
   "get": {
    "tags": [
     "Importy"
    ],
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsLimit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsOffset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PageOfImportResponse"
        }
       }
      }
     }
    },
    "operationId": "get-imports",
    "summary": "Pobierz listę importów produktów",
    "description": "Zwraca stronicowaną listę uruchomionych importów produktów wraz z ich statusem."
   }
  },
  "/api/v1/Imports/{catalogId}/import": {
   "post": {
    "tags": [
     "Importy"
    ],
    "parameters": [
     {
      "name": "catalogId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportRequest"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportRequest"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportRequest"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImportResponse"
        }
       }
      }
     }
    },
    "operationId": "post-imports-catalogid-import",
    "summary": "Uruchom import produktów do katalogu",
    "description": "Rozpoczyna import produktów z wcześniej wgranego pliku do wskazanego katalogu, według podanego mapowania kolumn."
   }
  },
  "/api/v1/Imports/{catalogId}/preview": {
   "get": {
    "tags": [
     "Importy"
    ],
    "parameters": [
     {
      "name": "catalogId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "fileId",
      "in": "query",
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "includesHeader",
      "in": "query",
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "separator",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "encoding",
      "in": "query",
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "previewSize",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PreviewImportResponse"
        }
       }
      }
     }
    },
    "operationId": "get-imports-catalogid-preview",
    "summary": "Podgląd pliku importu produktów",
    "description": "Zwraca podgląd pierwszych wierszy wgranego pliku z uwzględnieniem separatora, kodowania i nagłówka, aby przygotować mapowanie kolumn."
   }
  },
  "/api/v1/Imports/{catalogId}/upload": {
   "post": {
    "tags": [
     "Importy"
    ],
    "parameters": [
     {
      "name": "catalogId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary"
         }
        }
       },
       "encoding": {
        "file": {
         "style": "form"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/UploadImportFileResponse"
        }
       }
      }
     }
    },
    "operationId": "post-imports-catalogid-upload",
    "summary": "Wgraj plik importu produktów",
    "description": "Przesyła plik z produktami do importu do wskazanego katalogu i zwraca ID pliku do dalszych kroków."
   }
  },
  "/api/v1/Imports/{id}": {
   "get": {
    "tags": [
     "Importy"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "resultsLimit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsOffset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImportResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-imports-id",
    "summary": "Pobierz import produktów po ID",
    "description": "Zwraca status i podsumowanie pojedynczego importu produktów."
   }
  },
  "/api/v1/Imports/{importId}/results": {
   "get": {
    "tags": [
     "Wyniki importu"
    ],
    "parameters": [
     {
      "name": "importId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PageOfImportLineResultResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-imports-importid-results",
    "summary": "Pobierz wyniki wierszy importu produktów",
    "description": "Zwraca stronicowane wyniki przetworzenia poszczególnych wierszy importu produktów, w tym błędy."
   }
  },
  "/api/v2/Imports/{path}/preview": {
   "post": {
    "tags": [
     "Import zamówień"
    ],
    "parameters": [
     {
      "name": "path",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPreviewRequest"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPreviewRequest"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPreviewRequest"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PreviewImportResponse"
        }
       }
      }
     }
    },
    "operationId": "post-imports-path-preview",
    "summary": "Podgląd pliku importu zamówień",
    "description": "Zwraca podgląd wierszy wgranego pliku importu, aby przygotować mapowanie kolumn."
   }
  },
  "/api/v3/Imports/{path}/upload": {
   "post": {
    "tags": [
     "Plik importu"
    ],
    "parameters": [
     {
      "name": "path",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "file": {
          "type": "string",
          "format": "binary"
         }
        }
       },
       "encoding": {
        "file": {
         "style": "form"
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "text/plain": {
        "schema": {
         "$ref": "#/components/schemas/UploadImportFileResponse"
        }
       },
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/UploadImportFileResponse"
        }
       },
       "text/json": {
        "schema": {
         "$ref": "#/components/schemas/UploadImportFileResponse"
        }
       }
      }
     }
    },
    "operationId": "post-imports-path-upload",
    "summary": "Wgraj plik importu",
    "description": "Przesyła plik do importu (np. zamówień lub płatności) i zwraca ID pliku do dalszych kroków."
   }
  },
  "/api/v2/Imports/AvailableProperties": {
   "get": {
    "tags": [
     "Import zamówień"
    ],
    "parameters": [
     {
      "name": "catalogId",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AvailablePropertyResponse"
         }
        }
       }
      }
     }
    },
    "operationId": "get-imports-availableproperties",
    "summary": "Pobierz pola do mapowania (produkty)",
    "description": "Zwraca listę pól produktu, na które można mapować kolumny pliku importu dla wskazanego katalogu."
   }
  },
  "/api/v1/Imports/cancel/{importId}": {
   "post": {
    "tags": [
     "Importy"
    ],
    "parameters": [
     {
      "name": "importId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     }
    },
    "operationId": "post-imports-cancel-importid",
    "summary": "Anuluj import produktów",
    "description": "Przerywa trwający import produktów."
   }
  },
  "/api/v2/Imports/orders": {
   "get": {
    "tags": [
     "Import zamówień"
    ],
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsLimit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsOffset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PageOfImportOrdersResponse"
        }
       }
      }
     }
    },
    "operationId": "get-imports-orders",
    "summary": "Pobierz listę importów zamówień",
    "description": "Zwraca stronicowaną listę importów zamówień wraz z ich statusem."
   }
  },
  "/api/v2/Imports/orders/{id}": {
   "get": {
    "tags": [
     "Import zamówień"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "resultsLimit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsOffset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImportOrdersResponse"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-imports-orders-id",
    "summary": "Pobierz import zamówień po ID",
    "description": "Zwraca status i podsumowanie pojedynczego importu zamówień."
   }
  },
  "/api/v2/Imports/orders/{importId}/cancel": {
   "post": {
    "tags": [
     "Import zamówień"
    ],
    "parameters": [
     {
      "name": "importId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     }
    },
    "operationId": "post-imports-orders-importid-cancel",
    "summary": "Anuluj import zamówień",
    "description": "Przerywa trwający import zamówień."
   }
  },
  "/api/v2/Imports/orders/availableProperties": {
   "get": {
    "tags": [
     "Import zamówień"
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AvailablePropertyResponse"
         }
        }
       }
      }
     }
    },
    "operationId": "get-imports-orders-availableproperties",
    "summary": "Pobierz pola do mapowania (zamówienia)",
    "description": "Zwraca listę pól zamówienia, na które można mapować kolumny pliku importu."
   }
  },
  "/api/v2/Imports/orders/import": {
   "post": {
    "tags": [
     "Import zamówień"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportOrdersRequest"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportOrdersRequest"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportOrdersRequest"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImportOrdersResponse"
        }
       }
      }
     }
    },
    "operationId": "post-imports-orders-import",
    "summary": "Uruchom import zamówień",
    "description": "Rozpoczyna import zamówień z wgranego pliku według podanego mapowania kolumn."
   }
  },
  "/api/v3/Imports/Payments": {
   "get": {
    "tags": [
     "Import płatności"
    ],
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PageOfImportPaymentsResponseV3"
        }
       }
      }
     }
    },
    "operationId": "get-imports-payments",
    "summary": "Pobierz listę importów płatności",
    "description": "Zwraca stronicowaną listę importów płatności wraz z ich statusem."
   }
  },
  "/api/v3/Imports/Payments/{id}": {
   "get": {
    "tags": [
     "Import płatności"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "resultsLimit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     },
     {
      "name": "resultsOffset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImportPaymentsResponseV3"
        }
       }
      }
     },
     "404": {
      "description": "Not Found",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetails"
        }
       }
      }
     }
    },
    "operationId": "get-imports-payments-id",
    "summary": "Pobierz import płatności po ID",
    "description": "Zwraca status i podsumowanie pojedynczego importu płatności."
   }
  },
  "/api/v3/Imports/Payments/{id}/results": {
   "get": {
    "tags": [
     "Import płatności"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 10
      }
     },
     {
      "name": "offset",
      "in": "query",
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PageOfImportPaymentsLineResultResponse"
        }
       }
      }
     }
    },
    "operationId": "get-imports-payments-id-results",
    "summary": "Pobierz wyniki wierszy importu płatności",
    "description": "Zwraca stronicowane wyniki przetworzenia poszczególnych wierszy importu płatności."
   }
  },
  "/api/v3/Imports/Payments/{importId}/cancel": {
   "post": {
    "tags": [
     "Import płatności"
    ],
    "parameters": [
     {
      "name": "importId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK"
     }
    },
    "operationId": "post-imports-payments-importid-cancel",
    "summary": "Anuluj import płatności",
    "description": "Przerywa trwający import płatności."
   }
  },
  "/api/v3/Imports/Payments/availableProperties": {
   "get": {
    "tags": [
     "Import płatności"
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AvailablePropertyResponseV3"
         }
        }
       }
      }
     }
    },
    "operationId": "get-imports-payments-availableproperties",
    "summary": "Pobierz pola do mapowania (płatności)",
    "description": "Zwraca listę pól płatności, na które można mapować kolumny pliku importu."
   }
  },
  "/api/v3/Imports/Payments/import": {
   "post": {
    "tags": [
     "Import płatności"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPaymentsRequestV3"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPaymentsRequestV3"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPaymentsRequestV3"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ImportPaymentsResponseV3"
        }
       }
      }
     }
    },
    "operationId": "post-imports-payments-import",
    "summary": "Uruchom import płatności",
    "description": "Rozpoczyna import płatności (np. z wyciągu bankowego) z wgranego pliku i przypisuje je do zamówień."
   }
  },
  "/api/v3/Imports/Payments/Preview": {
   "post": {
    "tags": [
     "Import płatności"
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPreviewRequestV3"
         }
        ]
       }
      },
      "text/json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPreviewRequestV3"
         }
        ]
       }
      },
      "application/*+json": {
       "schema": {
        "allOf": [
         {
          "$ref": "#/components/schemas/ImportPreviewRequestV3"
         }
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PreviewImportResponse"
        }
       }
      }
     }
    },
    "operationId": "post-imports-payments-preview",
    "summary": "Podgląd pliku importu płatności",
    "description": "Zwraca podgląd wierszy wgranego pliku płatności, aby przygotować mapowanie kolumn."
   }
  },
  "/api/jobs/get/{id}": {
   "get": {
    "tags": [
     "Zadania asynchroniczne"
    ],
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/JobDto"
        }
       }
      }
     }
    },
    "operationId": "get-jobs-get-id",
    "summary": "Pobierz status zadania w tle",
    "description": "Zwraca status i wynik zadania wykonywanego asynchronicznie (np. importu)."
   }
  },
  "/api/jobs/list": {
   "get": {
    "tags": [
     "Zadania asynchroniczne"
    ],
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "schema": {
       "allOf": [
        {
         "$ref": "#/components/schemas/JobStatusEnum"
        }
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/JobDto"
         }
        }
       }
      }
     }
    },
    "operationId": "get-jobs-list",
    "summary": "Pobierz listę zadań w tle",
    "description": "Zwraca listę zadań wykonywanych asynchronicznie, opcjonalnie filtrowaną po statusie."
   }
  }
 },
 "components": {
  "schemas": {
   "ProblemDetails": {
    "type": "object",
    "properties": {
     "type": {
      "type": "string",
      "nullable": true
     },
     "title": {
      "type": "string",
      "nullable": true
     },
     "status": {
      "type": "integer",
      "format": "int32",
      "nullable": true
     },
     "detail": {
      "type": "string",
      "nullable": true
     },
     "instance": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": {}
   },
   "PageOfImportLineResultResponse": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportLineResultResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "PageOfImportResponse": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "ImportLineResultResponse": {
    "type": "object",
    "properties": {
     "lineNumber": {
      "type": "integer",
      "format": "int32"
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "errorCode": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ImportErrorCode"
       }
      ],
      "nullable": true
     },
     "errorParams": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     },
     "dateFinished": {
      "type": "string",
      "format": "date-time"
     },
     "productId": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     },
     "productSku": {
      "type": "string",
      "nullable": true
     },
     "productName": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportRequest": {
    "required": [
     "csvSettings",
     "fileId",
     "mappings"
    ],
    "type": "object",
    "properties": {
     "mappings": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportMapping"
      },
      "nullable": true
     },
     "fileId": {
      "type": "string",
      "format": "uuid"
     },
     "csvSettings": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CsvSettings"
       }
      ],
      "nullable": true
     },
     "createNonExistingProducts": {
      "type": "boolean"
     },
     "mapProductBy": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ExecuteImportMapProductBy"
       }
      ]
     }
    },
    "additionalProperties": false
   },
   "ImportResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "catalogId": {
      "type": "integer",
      "format": "int64"
     },
     "status": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ImportStatus"
       }
      ]
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "finishedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "includesHeader": {
      "type": "boolean"
     },
     "separator": {
      "type": "string",
      "nullable": true
     },
     "encoding": {
      "type": "string",
      "nullable": true
     },
     "fileSize": {
      "type": "integer",
      "format": "int64"
     },
     "updatedProductCount": {
      "type": "integer",
      "format": "int32"
     },
     "createdProductCount": {
      "type": "integer",
      "format": "int32"
     },
     "results": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportLineResultResponse"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "PreviewImportResponse": {
    "type": "object",
    "properties": {
     "columns": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/PreviewImportResponseColumn"
      },
      "nullable": true
     },
     "totalRows": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "PreviewImportResponseCell": {
    "type": "object",
    "properties": {
     "value": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "PreviewImportResponseColumn": {
    "type": "object",
    "properties": {
     "header": {
      "type": "string",
      "nullable": true
     },
     "rows": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/PreviewImportResponseCell"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "UploadImportFileResponse": {
    "type": "object",
    "properties": {
     "fileId": {
      "type": "string",
      "format": "uuid"
     }
    },
    "additionalProperties": false
   },
   "ImportErrorCode": {
    "enum": [
     "Unknown",
     "ProductNotFound",
     "InvalidValue",
     "WarehouseNotFound",
     "PriceGroupNotFound",
     "RequestToPimFailed",
     "MissingField",
     "PimReturnedError",
     "OrderNotFound",
     "MultipleOrdersFound",
     "NotCreating",
     "PropertyFromPaymentNameNotFound",
     "OrderAlreadyPaid",
     "IncorrectPaymentAmount"
    ],
    "type": "string"
   },
   "ImportStatus": {
    "enum": [
     "New",
     "InProgress",
     "Completed",
     "Cancelled",
     "Failed"
    ],
    "type": "string"
   },
   "CsvSettings": {
    "type": "object",
    "properties": {
     "includesHeader": {
      "type": "boolean"
     },
     "separator": {
      "type": "string"
     },
     "encoding": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ExecuteImportMapProductBy": {
    "enum": [
     "Id",
     "Sku",
     "Ean",
     "None"
    ],
    "type": "string"
   },
   "ImportMapping": {
    "type": "object",
    "properties": {
     "property": {
      "type": "string",
      "nullable": true
     },
     "column": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "JobDto": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "updatedAt": {
      "type": "string",
      "format": "date-time"
     },
     "payload": {
      "nullable": true
     },
     "result": {
      "nullable": true
     },
     "status": {
      "allOf": [
       {
        "$ref": "#/components/schemas/JobStatusEnum"
       }
      ]
     },
     "command": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "JobStatusEnum": {
    "enum": [
     "New",
     "InProgress",
     "Completed",
     "Failed"
    ],
    "type": "string"
   },
   "PageOfImportOrdersLineResultResponse": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportOrdersLineResultResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "PageOfImportOrdersResponse": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportOrdersResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "ImportOrdersRequest": {
    "required": [
     "csvSettings",
     "fileId",
     "mappings"
    ],
    "type": "object",
    "properties": {
     "mappings": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportMapping"
      },
      "nullable": true
     },
     "fileId": {
      "type": "string",
      "format": "uuid"
     },
     "csvSettings": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CsvSettings"
       }
      ],
      "nullable": true
     },
     "createNonExistingEntities": {
      "type": "boolean"
     },
     "useNewOrderSchema": {
      "type": "boolean"
     },
     "forceSilentChanges": {
      "type": "boolean"
     },
     "connectionId": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     },
     "statusId": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportPreviewRequest": {
    "type": "object",
    "properties": {
     "fileId": {
      "type": "string",
      "format": "uuid"
     },
     "csvSettings": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CsvSettings"
       }
      ],
      "nullable": true
     },
     "previewSize": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "AvailablePropertyResponse": {
    "type": "object",
    "properties": {
     "property": {
      "type": "string",
      "nullable": true
     },
     "key": {
      "type": "string",
      "nullable": true
     },
     "label": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportOrdersLineResultResponse": {
    "type": "object",
    "properties": {
     "lineNumber": {
      "type": "integer",
      "format": "int32"
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "errorCode": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ImportErrorCode"
       }
      ],
      "nullable": true
     },
     "errorParams": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     },
     "dateFinished": {
      "type": "string",
      "format": "date-time"
     },
     "orderId": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     },
     "buyerUserName": {
      "type": "string",
      "nullable": true
     },
     "sourceOrderId": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportOrdersResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "status": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ImportStatus"
       }
      ]
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "finishedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "includesHeader": {
      "type": "boolean"
     },
     "separator": {
      "type": "string",
      "nullable": true
     },
     "encoding": {
      "type": "string",
      "nullable": true
     },
     "fileSize": {
      "type": "integer",
      "format": "int64"
     },
     "updatedOrdersCount": {
      "type": "integer",
      "format": "int32"
     },
     "createdOrdersCount": {
      "type": "integer",
      "format": "int32"
     },
     "results": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportOrdersLineResultResponse"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "PageOfImportPaymentsLineResultResponse": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportPaymentsLineResultResponse"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "PageOfImportPaymentsResponseV3": {
    "type": "object",
    "properties": {
     "list": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportPaymentsResponseV3"
      },
      "nullable": true
     },
     "pageNumber": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "AvailablePropertyResponseV3": {
    "type": "object",
    "properties": {
     "property": {
      "type": "string",
      "nullable": true
     },
     "key": {
      "type": "string",
      "nullable": true
     },
     "label": {
      "type": "string",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportPaymentsLineResultResponse": {
    "required": [
     "errorParams",
     "message"
    ],
    "type": "object",
    "properties": {
     "lineNumber": {
      "type": "integer",
      "format": "int32"
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "errorCode": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ImportErrorCode"
       }
      ],
      "nullable": true
     },
     "errorParams": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     },
     "dateFinished": {
      "type": "string",
      "format": "date-time"
     },
     "orderId": {
      "type": "integer",
      "format": "int64",
      "nullable": true
     },
     "paymentName": {
      "type": "string",
      "nullable": true
     },
     "matchingStrategy": {
      "allOf": [
       {
        "$ref": "#/components/schemas/PaymentMatchingStrategy"
       }
      ]
     },
     "matchedValues": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true
     },
     "matchedByValue": {
      "type": "string",
      "nullable": true
     },
     "amountTotal": {
      "type": "number",
      "format": "double",
      "nullable": true
     },
     "amountPaid": {
      "type": "number",
      "format": "double",
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportPaymentsResponseV3": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "status": {
      "allOf": [
       {
        "$ref": "#/components/schemas/ImportStatus"
       }
      ]
     },
     "message": {
      "type": "string",
      "nullable": true
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "finishedAt": {
      "type": "string",
      "format": "date-time",
      "nullable": true
     },
     "includesHeader": {
      "type": "boolean"
     },
     "separator": {
      "type": "string",
      "nullable": true
     },
     "encoding": {
      "type": "string",
      "nullable": true
     },
     "fileSize": {
      "type": "integer",
      "format": "int64"
     },
     "updatedCount": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "ImportPaymentsRequestV3": {
    "type": "object",
    "properties": {
     "mappings": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ImportMapping"
      },
      "nullable": true
     },
     "csvSettings": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CsvSettings"
       }
      ],
      "nullable": true
     },
     "fileId": {
      "type": "string",
      "format": "uuid"
     },
     "matchingStrategy": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/PaymentMatchingStrategy"
      },
      "nullable": true
     }
    },
    "additionalProperties": false
   },
   "ImportPreviewRequestV3": {
    "type": "object",
    "properties": {
     "fileId": {
      "type": "string",
      "format": "uuid"
     },
     "csvSettings": {
      "allOf": [
       {
        "$ref": "#/components/schemas/CsvSettings"
       }
      ],
      "nullable": true
     },
     "previewSize": {
      "type": "integer",
      "format": "int32"
     }
    },
    "additionalProperties": false
   },
   "PaymentMatchingStrategy": {
    "enum": [
     "None",
     "ByOrderId",
     "ByOrderSourcePlatformId",
     "ByPaymentPlatformId"
    ],
    "type": "string"
   }
  },
  "securitySchemes": {
   "Bearer": {
    "type": "http",
    "scheme": "bearer",
    "bearerFormat": "JWT",
    "description": "Token API wygenerowany w panelu Sellrocket."
   }
  }
 },
 "security": [
  {
   "Bearer": []
  }
 ]
}