{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/print-one/json-schema/print-one-campaign-import-details-response-dto-schema.json",
  "title": "CampaignImportDetailsResponseDto",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/print-one-openapi.json#/components/schemas/CampaignImportDetailsResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "estimatedOrderCount": {
      "type": "number",
      "description": "Estimated order count based on the amount of CSV rows"
    },
    "processedOrderCount": {
      "type": "number",
      "description": "Amount of orders that have currently been processed from the CSV"
    },
    "failedOrderCount": {
      "type": "number",
      "description": "Amount of orders that have failed because of an error during processing order"
    },
    "cancelledOrderCount": {
      "type": "number",
      "description": "Amount of orders that have failed because of an error during processing order"
    },
    "totalOrderCount": {
      "type": "number",
      "description": "Sum of both processed and failed orders, could be used to calculate a progress percentage"
    },
    "status": {
      "type": "string",
      "description": "The status of the CSV order"
    },
    "friendlyStatus": {
      "type": "string",
      "description": "The friendly status of the CSV order",
      "enum": [
        "Processing",
        "Success",
        "Failed",
        "Cancelled"
      ]
    },
    "mapping": {
      "type": "object",
      "description": "The mapping used for this CSV order"
    },
    "sendDate": {
      "format": "date-time",
      "type": "string",
      "description": "Date the csv order is scheduled to be sent"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string",
      "description": "Date the csv order was created"
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string",
      "description": "Date the csv order was last updated"
    },
    "errors": {
      "type": "string",
      "description": "List of errors encountered during processing of the import"
    },
    "campaignId": {
      "type": "string",
      "description": "The id of the campaign to which the CSV belongs"
    },
    "draft": {
      "type": "boolean",
      "description": "If the order is marked as draft"
    },
    "originId": {
      "type": "string",
      "description": "The origin ID of the import"
    },
    "originSource": {
      "type": "string",
      "description": "The origin source of the import"
    },
    "csvDownloadUrl": {
      "type": "string",
      "description": "URL to download the originally uploaded CSV file. Only available for manual CSV imports, up to 7 days after upload."
    }
  },
  "required": [
    "id",
    "estimatedOrderCount",
    "processedOrderCount",
    "failedOrderCount",
    "cancelledOrderCount",
    "totalOrderCount",
    "status",
    "friendlyStatus",
    "mapping",
    "sendDate",
    "createdAt",
    "updatedAt",
    "errors",
    "campaignId",
    "draft",
    "originId",
    "originSource"
  ]
}