Catalogo

Carica il catalogo di uno shop o di un marketplace (CSV, XLSX, JSON, un PDF fino a 20 pagine o una foto) e ottieni le colonne associate ai campi prodotto e le righe come record di prodotto. Niente viene classificato e niente viene salvato.

POST/easydogana/catalogue/parse

Parse a catalogue file without classification or storage

Scope richiesto: ai-engine:easydogana:catalogue:parse

Parametri

  • Name
    x-request-id
    Type
    string · può essere null
    Description
  • Name
    ParceLabs-Version
    Type
    string
    Description

    API version as a date (YYYY-MM-DD). Omit it to get the oldest supported version; it never moves to a newer one on its own. An unknown value is answered with 400 UNSUPPORTED_VERSION, a retired one with 410 VERSION_RETIRED. Every response echoes the resolved version in the same header.

    Valori ammessi: 2026-10-23. Predefinito: 2026-10-23.

Corpo della richiesta Body_parseCatalogue

  • Name
    allow_llm
    Type
    boolean
    Description

    Predefinito: true.

  • Name
    column_map
    Type
    string · può essere null
    Description

    JSON object mapping exact headers to catalogue fields

  • Name
    currency_hint
    Type
    string · può essere null
    Description
  • Name
    file
    Type
    string
    obbligatorio
    Description

    Catalogue file: CSV, XLSX, JSON, PDF or photos (PNG, JPG, JPEG)

  • Name
    locale
    Type
    string · può essere null
    Description

Risposte

Richiesta

curl -X POST "https://ai-engine.parcelabs.com/easydogana/catalogue/parse" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -F "file=@/path/to/file" \
  -F 'allow_llm=true' \
  -F 'currency_hint=EUR'

Risposta 200

{
  "capabilities": {
    "classification": false
  },
  "columns": [
    {
      "confidence": 1,
      "field": "group_key",
      "method": "synonym",
      "source_header": "Handle"
    },
    {
      "confidence": 1,
      "field": "description",
      "method": "synonym",
      "source_header": "Title"
    },
    {
      "confidence": 1,
      "field": "sku",
      "method": "synonym",
      "source_header": "Variant SKU"
    },
    {
      "confidence": 1,
      "field": "weight",
      "method": "synonym",
      "source_header": "Variant Grams",
      "unit": "g"
    },
    {
      "confidence": 1,
      "field": "quantity",
      "method": "synonym",
      "source_header": "Variant Inventory Qty"
    },
    {
      "confidence": 1,
      "field": "price",
      "method": "synonym",
      "source_header": "Variant Price"
    },
    {
      "confidence": 1,
      "field": "gtin",
      "method": "synonym",
      "source_header": "Variant Barcode"
    },
    {
      "confidence": 1,
      "field": "weight_unit",
      "method": "synonym",
      "source_header": "Variant Weight Unit"
    },
    {
      "confidence": 1,
      "field": "cost",
      "method": "synonym",
      "source_header": "Cost per item"
    },
    {
      "confidence": 1,
      "field": "details",
      "method": "synonym",
      "source_header": "Body (HTML)"
    }
  ],
  "cost_usd": 0.0012,
  "engine_version": "catalogue-parse-v1",
  "input": {
    "filename_ext": "csv",
    "kind": "tabular",
    "sheets_ignored": 0
  },
  "llm_calls": 1,
  "llm_used": true,
  "request_id": "d2dc15bd-006d-4db5-b555-cfa1c7f67b79",
  "rows": [
    {
      "cost": 4,
      "currency": "EUR",
      "currency_source": "hint",
      "description": "Wool socks for men with reinforced heel",
      "description_en": "Wool socks for men with reinforced heel",
      "details": "Warm & soft",
      "group_key": "wool-socks",
      "gtin": "8001234567897",
      "input_hash": "1260e9f59ed3c03782aed44128fe2cb75809436df18f6c3c8a1084950f592e0f",
      "sku": "SOCK-BL-42",
      "source_language": "en",
      "source_row": 1,
      "value": 12.5,
      "warnings": [],
      "weight_kg": 0.085
    },
    {
      "cost": 4,
      "currency": "EUR",
      "currency_source": "hint",
      "description": "Wool socks for men with reinforced heel",
      "description_en": "Wool socks for men with reinforced heel",
      "group_key": "wool-socks",
      "input_hash": "15d0dbfc71257862f620359c54059364472000f9b14f4bdd0454eb83c056916d",
      "sku": "SOCK-RD-42",
      "source_language": "en",
      "source_row": 2,
      "value": 12.5,
      "warnings": [
        {
          "code": "DESCRIPTION_INHERITED"
        }
      ],
      "weight_kg": 0.09
    },
    {
      "cost": 6,
      "currency": "EUR",
      "currency_source": "hint",
      "description": "Maglietta di cotone con il logo",
      "description_en": "Cotton t-shirt with the logo",
      "details": "100% cotton",
      "group_key": "cotton-tee",
      "input_hash": "289d4ef4acaebce4a733c0fd8423c84cc203ce0fb307d73a5ed7a9be62161311",
      "sku": "TEE-1",
      "source_language": "it",
      "source_row": 3,
      "value": 19.9,
      "warnings": [],
      "weight_kg": 0.2
    }
  ],
  "summary": {
    "fields_filled": {
      "dimensions_cm": 0,
      "gtin": 1,
      "hs_code_in_file": 0,
      "origin": 0,
      "sku": 3,
      "value": 3,
      "weight_kg": 3
    },
    "rows_read": 3,
    "rows_skipped": 0,
    "rows_with_warnings": 1,
    "source_languages": {
      "en": 2,
      "it": 1
    }
  },
  "took_ms": 430,
  "unmapped_headers": [],
  "warnings": []
}

Modelli

Oggetti usati dalle richieste e dalle risposte di questa pagina.

Body_parseCatalogue

  • Name
    allow_llm
    Type
    boolean
    Description

    Predefinito: true.

  • Name
    column_map
    Type
    string · può essere null
    Description

    JSON object mapping exact headers to catalogue fields

  • Name
    currency_hint
    Type
    string · può essere null
    Description
  • Name
    file
    Type
    string
    obbligatorio
    Description

    Catalogue file: CSV, XLSX, JSON, PDF or photos (PNG, JPG, JPEG)

  • Name
    locale
    Type
    string · può essere null
    Description

CatalogueParseResponse

  • Name
    capabilities
    Type
    CatalogueCapabilities
    obbligatorio
    Description
  • Name
    columns
    Type
    array of CatalogueColumn
    obbligatorio
    Description
  • Name
    cost_usd
    Type
    number
    obbligatorio
    Description
  • Name
    engine_version
    Type
    string
    obbligatorio
    Description
  • Name
    input
    Type
    CatalogueInput
    obbligatorio
    Description
  • Name
    llm_calls
    Type
    integer
    obbligatorio
    Description
  • Name
    llm_used
    Type
    boolean
    obbligatorio
    Description
  • Name
    request_id
    Type
    string
    obbligatorio
    Description
  • Name
    rows
    Type
    array of CatalogueRow
    obbligatorio
    Description
  • Name
    summary
    Type
    CatalogueSummary
    obbligatorio
    Description
  • Name
    took_ms
    Type
    integer
    obbligatorio
    Description
  • Name
    unmapped_headers
    Type
    array of string
    obbligatorio
    Description
  • Name
    warnings
    Type
    array of CatalogueWarning
    obbligatorio
    Description

CatalogueCapabilities

  • Name
    classification
    Type
    boolean
    Description

    Predefinito: false.

CatalogueColumn

  • Name
    confidence
    Type
    number
    obbligatorio
    Description
  • Name
    currency
    Type
    string · può essere null
    Description
  • Name
    field
    Type
    string
    obbligatorio
    Description
  • Name
    method
    Type
    string
    obbligatorio
    Description
  • Name
    source_header
    Type
    string
    obbligatorio
    Description
  • Name
    unit
    Type
    string · può essere null
    Description

CatalogueInput

  • Name
    filename_ext
    Type
    string
    obbligatorio
    Description
  • Name
    kind
    Type
    string
    obbligatorio
    Description
  • Name
    pages_in_file
    Type
    integer · può essere null
    Description
  • Name
    pages_read
    Type
    integer · può essere null
    Description
  • Name
    sheet
    Type
    string · può essere null
    Description
  • Name
    sheets_ignored
    Type
    integer
    Description

    Predefinito: 0.

CatalogueRow

  • Name
    classification
    Type
    null
    Description
  • Name
    cost
    Type
    number · può essere null
    obbligatorio
    Description
  • Name
    currency
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    currency_source
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    description
    Type
    string
    obbligatorio
    Description
  • Name
    description_en
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    details
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    dimensions_cm
    Type
    DimensionsCM · può essere null
    obbligatorio
    Description
  • Name
    extraction_confidence
    Type
    string · può essere null
    Description
  • Name
    group_key
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    gtin
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    hs_code_in_file
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    input_hash
    Type
    string
    obbligatorio
    Description
  • Name
    origin
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    sku
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    source_language
    Type
    string · può essere null
    obbligatorio
    Description
  • Name
    source_row
    Type
    integer
    obbligatorio
    Description

    1-based index of the data row after the header row, blank rows included; not the file line number.

  • Name
    value
    Type
    number · può essere null
    obbligatorio
    Description
  • Name
    warnings
    Type
    array of RowWarning
    obbligatorio
    Description
  • Name
    weight_kg
    Type
    number · può essere null
    obbligatorio
    Description

DimensionsCM

  • Name
    h
    Type
    number · può essere null
    obbligatorio
    Description
  • Name
    l
    Type
    number · può essere null
    obbligatorio
    Description
  • Name
    w
    Type
    number · può essere null
    obbligatorio
    Description

RowWarning

  • Name
    code
    Type
    string
    obbligatorio
    Description
  • Name
    field
    Type
    string · può essere null
    Description

CatalogueSummary

  • Name
    fields_filled
    Type
    map of integer
    obbligatorio
    Description
  • Name
    rows_read
    Type
    integer
    obbligatorio
    Description
  • Name
    rows_skipped
    Type
    integer
    obbligatorio
    Description
  • Name
    rows_with_warnings
    Type
    integer
    obbligatorio
    Description
  • Name
    source_languages
    Type
    map of integer
    obbligatorio
    Description

CatalogueWarning

  • Name
    code
    Type
    string
    obbligatorio
    Description
  • Name
    details
    Type
    object · può essere null
    Description
  • Name
    message
    Type
    string
    obbligatorio
    Description

ErrorDetail

Body of every error returned through FastAPI's `HTTPException`.

  • Name
    detail
    Type
    string
    obbligatorio
    Description

    Human-readable reason. Not a stable machine code.

CatalogueErrorResponse

CatalogueErrorDetail

  • Name
    code
    Type
    string
    obbligatorio
    Description
  • Name
    details
    Type
    object · può essere null
    Description
  • Name
    message
    Type
    string
    obbligatorio
    Description

Was this page helpful?