{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/print-one/json-schema/print-one-add-campaign-item-response-dto-schema.json",
  "title": "AddCampaignItemResponseDto",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/print-one-openapi.json#/components/schemas/AddCampaignItemResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique ID for the order"
    },
    "companyId": {
      "type": "string",
      "description": "Unique ID for the company"
    },
    "templateId": {
      "type": "string",
      "description": "Template ID for the order"
    },
    "templateVersion": {
      "type": "number",
      "description": "Version number of the template used for the order"
    },
    "finish": {
      "type": "string",
      "enum": [
        "GLOSSY",
        "MATTE"
      ],
      "description": "Finish of the order"
    },
    "format": {
      "type": "string",
      "enum": [
        "POSTCARD_A5",
        "POSTCARD_A6",
        "POSTCARD_SQ15",
        "POSTCARD_MAXI",
        "POSTCARD_DIN_LONG",
        "GREETINGCARD_SQ14",
        "LETTER_A4",
        "SELFMAILER_MAXI"
      ],
      "description": "Format of the order. Can be null in the instance of a failed order without a valid design"
    },
    "doubleSided": {
      "type": "boolean",
      "description": "Whether the order is double sided or not (only when the product supports double-sided)"
    },
    "sender": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the sender"
        },
        "address": {
          "type": "string",
          "description": "Address of the sender"
        },
        "addressLine2": {
          "type": "string",
          "description": "Address line 2 of the sender"
        },
        "postalCode": {
          "type": "string",
          "description": "Postal code of the sender"
        },
        "city": {
          "type": "string",
          "description": "City of the sender"
        },
        "country": {
          "type": "string",
          "description": "Country of the sender"
        }
      },
      "description": "Address information of the sender"
    },
    "recipient": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the sender"
        },
        "address": {
          "type": "string",
          "description": "Address of the sender"
        },
        "addressLine2": {
          "type": "string",
          "description": "Address line 2 of the sender"
        },
        "postalCode": {
          "type": "string",
          "description": "Postal code of the sender"
        },
        "city": {
          "type": "string",
          "description": "City of the sender"
        },
        "country": {
          "type": "string",
          "description": "Country of the sender"
        }
      },
      "description": "Address information of the recipient"
    },
    "definitiveCountryId": {
      "type": "string",
      "description": "Country ID of the order"
    },
    "region": {
      "type": "string",
      "description": "Region of the order"
    },
    "deliverySpeed": {
      "type": "string",
      "enum": [
        "FAST",
        "SLOW"
      ],
      "description": "Delivery speed of the order"
    },
    "stampId": {
      "type": "string",
      "description": "ID of the postal stamp that was used for this order. This property is optionally returned and only available as early preview (please apply if you wish to use this function)."
    },
    "billingId": {
      "type": "string",
      "description": "Shows up on invoice"
    },
    "status": {
      "type": "string",
      "description": "Status of the order"
    },
    "friendlyStatus": {
      "type": "string",
      "description": "Friendly status of the order"
    },
    "warnings": {
      "description": "Warnings of the order",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "type": "object",
      "description": "Metadata set by Print.one",
      "additionalProperties": true
    },
    "sendDate": {
      "format": "date-time",
      "type": "string",
      "description": "Date the order is scheduled to be sent"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string",
      "description": "Date the order was created"
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string",
      "description": "Date the order was last updated"
    },
    "anonymizedAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ],
      "description": "Timestamp of when the order was anonymized"
    },
    "campaignId": {
      "type": "string",
      "description": "ID of the campaign this item belongs to"
    },
    "errors": {
      "description": "Errors of the item",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ErrorDto"
      }
    },
    "draft": {
      "type": "boolean",
      "description": "If the item is marked as draft"
    },
    "destination": {
      "type": "string",
      "enum": [
        "NETHERLANDS",
        "GERMANY",
        "INTERNATIONAL"
      ],
      "description": "Destination of the item"
    },
    "mergeVariables": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      },
      "description": "Optional personalization data (can be an empty object)"
    },
    "importId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ID of the linked import"
    },
    "auditLogs": {
      "description": "Audit logs for the item",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AuditLogDto"
      }
    }
  },
  "required": [
    "id",
    "companyId",
    "templateId",
    "templateVersion",
    "finish",
    "format",
    "doubleSided",
    "sender",
    "recipient",
    "definitiveCountryId",
    "region",
    "deliverySpeed",
    "billingId",
    "status",
    "friendlyStatus",
    "warnings",
    "metadata",
    "sendDate",
    "createdAt",
    "updatedAt",
    "anonymizedAt",
    "campaignId",
    "errors",
    "draft",
    "destination",
    "importId",
    "auditLogs"
  ],
  "$defs": {
    "AuditLogDto": {
      "type": "object",
      "properties": {
        "log": {
          "type": "object",
          "description": "The audit log data"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string",
          "description": "The timestamp of the audit log"
        }
      },
      "required": [
        "log",
        "createdAt"
      ]
    },
    "ErrorDto": {
      "type": "object",
      "properties": {
        "code": {
          "type": "number",
          "description": "Unique code identifying the error type, or -1 if it could not be recognized"
        },
        "status": {
          "type": "number",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16
          ],
          "description": "The gRPC status code of the error"
        },
        "message": {
          "type": "string",
          "description": "A human readable description of the error"
        },
        "errors": {
          "description": "Child errors, present on aggregate errors that group multiple underlying failures",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ErrorDto"
          }
        }
      },
      "required": [
        "code",
        "status",
        "message"
      ]
    }
  }
}