Skip to main content

ServiceProductImportPreviewResponse

successbooleanrequired

Always true on a 2xx response.

Example: true
data objectrequired

What approving the import will do.

importIdstring<uuid>required

Import id.

Example: 5b0c8a6e-2f4d-4d6e-9a53-7c1d2e3f4a5b
statusProductImportStatusrequired

Import status.

Possible values: [UPLOADED, MAPPING, VALIDATING, PREVIEW, COMMITTING, COMPLETED, FAILED, ROLLED_BACK]

modeProductImportModerequired

Import mode.

Possible values: [CREATE_ONLY, UPSERT]

totalRowsnumberrequired

Rows found in the file.

Example: 120
validRowsnumberrequired

Rows that passed validation.

Example: 118
errorRowsnumberrequired

Rows that failed validation.

Example: 1
warningRowsnumberrequired

Rows that passed with a warning.

Example: 1
createCountnumberrequired

Products the import will create.

Example: 100
updateCountnumberrequired

Products the import will update.

Example: 18
totalChunksnumberrequired

Number of processing chunks.

Example: 3
sampleErrors object[]required

Up to 50 failing rows, with the reason for each.

  • Array [
  • rowNumbernumberrequired

    Row number in the file, starting at 1.

    Example: 7
    skustring

    The row's SKU, when it has one.

    Example: SKU-1001
    errorsstring[]required

    What is wrong with the row.

    Example: ["Unknown unit of measure"]
  • ]
  • sampleRows object[]required

    Up to 10 rows that will be written, so you can see what approving will do.

  • Array [
  • rowNumbernumberrequired

    Row number in the file, starting at 1.

    Example: 2
    skustring

    The row's SKU.

    Example: SKU-1001
    productNamestring

    The row's product name.

    Example: Sample Widget
    actionstring

    What the import will do with the row, such as CREATE or UPDATE.

    Example: CREATE
  • ]
  • autoAppliedRulesstring[]required

    Adjustments the import made for you, such as matching a unit spelling to one of your units.

    Example: ["Unit \"pcs\" matched to \"EA\""]
    currencySummary object[]required

    How many rows carry price tiers in each currency.

  • Array [
  • currencystringrequired

    ISO 4217 currency code of the price tiers.

    Example: USD
    isBasebooleanrequired

    True when this is the workspace's own currency.

    Example: true
    rowCountnumberrequired

    Rows that carry price tiers in this currency.

    Example: 100
  • ]
  • ServiceProductImportPreviewResponse
    {
    "success": true,
    "data": {
    "importId": "5b0c8a6e-2f4d-4d6e-9a53-7c1d2e3f4a5b",
    "status": "UPLOADED",
    "mode": "CREATE_ONLY",
    "totalRows": 120,
    "validRows": 118,
    "errorRows": 1,
    "warningRows": 1,
    "createCount": 100,
    "updateCount": 18,
    "totalChunks": 3,
    "sampleErrors": [
    {
    "rowNumber": 7,
    "sku": "SKU-1001",
    "errors": [
    "Unknown unit of measure"
    ]
    }
    ],
    "sampleRows": [
    {
    "rowNumber": 2,
    "sku": "SKU-1001",
    "productName": "Sample Widget",
    "action": "CREATE"
    }
    ],
    "autoAppliedRules": [
    "Unit \"pcs\" matched to \"EA\""
    ],
    "currencySummary": [
    {
    "currency": "USD",
    "isBase": true,
    "rowCount": 100
    }
    ]
    }
    }