> ## Documentation Index
> Fetch the complete documentation index at: https://docs-pos.solya.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Poll a catalogue-import job's status and proposed products

> Returns the lifecycle state (`queued → running → succeeded | failed`) of a PDF catalogue-import job and, once `succeeded`, the proposed products (name / reference / price / brand, each with a confidence) for review before import. Proxies the enrichment service's `GET /jobs/{job_id}`.



## OpenAPI

````yaml /openapi.json get /v1/catalog/imports/{jobId}
openapi: 3.0.3
info:
  title: Solya POS API
  version: 1.0.0
  description: >-
    The Solya POS backend HTTP surface. Every documented operation is
    agent-ready: it carries an `operationId`, an agent-facing `description`, the
    `pos.*` scopes it enforces (`x-required-permissions`) and an `x-agent-tier`.
    Success responses return the payload as raw JSON; failures return the
    `ErrorResponse` envelope (`{ error: { code, message, statusCode } }`).
servers:
  - url: /
    description: The backend, relative to its deployed origin.
security: []
paths:
  /v1/catalog/imports/{jobId}:
    get:
      tags:
        - Catalog
      summary: Poll a catalogue-import job's status and proposed products
      description: >-
        Returns the lifecycle state (`queued → running → succeeded | failed`) of
        a PDF catalogue-import job and, once `succeeded`, the proposed products
        (name / reference / price / brand, each with a confidence) for review
        before import. Proxies the enrichment service's `GET /jobs/{job_id}`.
      operationId: getCatalogImport
      parameters:
        - schema:
            type: string
            minLength: 1
          in: path
          name: jobId
          required: true
      responses:
        '200':
          description: The job's current state, with the extraction result once finished.
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_id:
                    type: string
                    minLength: 1
                  status:
                    type: string
                    enum:
                      - queued
                      - running
                      - succeeded
                      - failed
                  progress:
                    nullable: true
                    type: number
                    minimum: 0
                    maximum: 1
                  result_summary:
                    nullable: true
                    type: string
                  result:
                    nullable: true
                    type: object
                    properties:
                      products:
                        default: []
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              minLength: 1
                            supplier_ref:
                              nullable: true
                              type: string
                            price_raw:
                              nullable: true
                              type: string
                            price_minor:
                              nullable: true
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                            currency:
                              nullable: true
                              type: string
                            brand_guess:
                              nullable: true
                              type: string
                            description:
                              nullable: true
                              type: string
                            raw_attributes:
                              default: {}
                              type: object
                              additionalProperties:
                                type: string
                            confidence:
                              nullable: true
                              type: number
                              minimum: 0
                              maximum: 1
                            field_confidence:
                              default: {}
                              type: object
                              additionalProperties:
                                type: number
                            matched_brand:
                              nullable: true
                              type: object
                              properties:
                                id:
                                  nullable: true
                                  type: string
                                  minLength: 1
                                name:
                                  type: string
                                  minLength: 1
                              required:
                                - name
                              additionalProperties: false
                            match_status:
                              nullable: true
                              type: string
                              enum:
                                - new
                                - existing
                            matched_product_id:
                              nullable: true
                              type: string
                            match_score:
                              nullable: true
                              type: number
                              minimum: 0
                              maximum: 1
                            category:
                              nullable: true
                              type: object
                              properties:
                                id:
                                  type: string
                                  minLength: 1
                                label:
                                  type: string
                                  minLength: 1
                                path:
                                  nullable: true
                                  type: string
                              required:
                                - id
                                - label
                              additionalProperties: false
                            category_confidence:
                              nullable: true
                              type: number
                              minimum: 0
                              maximum: 1
                          required:
                            - name
                            - raw_attributes
                            - field_confidence
                          additionalProperties: false
                      metadata:
                        type: object
                        properties:
                          page_count:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          model:
                            type: string
                        required:
                          - page_count
                          - model
                        additionalProperties: false
                      summary:
                        type: string
                    required:
                      - products
                      - metadata
                      - summary
                    additionalProperties: false
                  error:
                    nullable: true
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - job_id
                  - status
                  - created_at
                  - updated_at
                additionalProperties: false
                description: >-
                  The job's current state, with the extraction result once
                  finished.
                example:
                  job_id: b3f1c2a4-0e5d-4c7a-9b2e-1f6a8d3c5e70
                  status: succeeded
                  progress: null
                  result_summary: Proposed 1 product across 1 brand for review
                  result:
                    products:
                      - name: Perceuse-visseuse 18V XR
                        supplier_ref: DCD778S2T
                        price_raw: 129,99 €
                        price_minor: 12999
                        currency: EUR
                        brand_guess: DeWalt
                        description: Sans fil 18V.
                        raw_attributes:
                          voltage: 18V
                        confidence: 0.95
                        field_confidence:
                          name: 0.98
                    metadata:
                      page_count: 12
                      model: google/gemini-2.5-flash
                    summary: Proposed 1 product across 1 brand for review
                  error: null
                  created_at: '2026-07-30T09:15:00Z'
                  updated_at: '2026-07-30T09:16:00Z'
        '400':
          description: >-
            The request failed schema validation; `error.fieldErrors` lists the
            fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: No valid credential was presented — send a bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The actor is authenticated but lacks the required `pos.*` scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No resource matches the addressed identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected server error — safe to retry idempotent requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ValidationErrorResponse:
      type: object
      required:
        - error
      additionalProperties: false
      description: >-
        A `VALIDATION_FAILED` envelope carrying the offending fields in
        `fieldErrors`.
      properties:
        error:
          type: object
          required:
            - code
            - message
            - statusCode
          additionalProperties: false
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
            message:
              type: string
            statusCode:
              type: integer
            fieldErrors:
              type: array
              description: >-
                One entry per rejected field: the field path and why it was
                rejected.
              items:
                type: object
                required:
                  - field
                  - message
                additionalProperties: false
                properties:
                  field:
                    type: string
                    description: Dot-path of the offending field.
                  message:
                    type: string
                    description: Why the field was rejected.
    ErrorResponse:
      type: object
      required:
        - error
      additionalProperties: false
      description: The uniform failure envelope every non-2xx response returns.
      properties:
        error:
          type: object
          required:
            - code
            - message
            - statusCode
          additionalProperties: false
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - BUSINESS_RULE_VIOLATION
                - INTERNAL_ERROR
              description: >-
                Machine-readable kernel `ResultCode` — branch on this, not on
                `message`.
            message:
              type: string
              description: >-
                Human-readable explanation. Safe to surface; never leaks server
                internals.
            statusCode:
              type: integer
              description: >-
                The HTTP status, mirrored into the body so a client need not
                read headers.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        `Authorization: Bearer <token>`. Accepts EITHER a Keycloak access token
        (scopes-in-token) OR an opaque POS session token; both resolve to the
        same `pos.*` scope vocabulary the route guards enforce.

````