Shopware icon

Shopware

Shopware

Actions778

Document → Create Document

AI-generated

Overview

This node operation allows creating a new Document resource in the Shopware system. It is useful for automating document management tasks such as generating invoices, delivery notes, or other order-related documents within an e-commerce workflow. For example, after an order is placed, this node can be used to create a corresponding invoice document automatically.

Use Case Examples

  1. Automatically create an invoice document for a new order.
  2. Generate a delivery note document when an order is shipped.

Properties

Name Meaning
Response Data format for the response, either basic or detailed information about the created document.
Id Unique identifier for the document to be created.
Document Type Id Identifier for the type of document being created.
File Type File type of the document, e.g., PDF, DOCX.
Referenced Document Id Optional ID of a referenced document related to this document.
Order Id Identifier of the order associated with the document.
Document Media File Id ID of the media file associated with the document.
Order Version Id Version ID of the order related to the document.
Config Configuration settings for the document in JSON format.
Sent Boolean flag indicating if the document has been sent.
Static Boolean flag indicating if the document is static.
Deep Link Code Code used for deep linking to the document.
Document Number Number assigned to the document.
Custom Fields Custom fields for additional document data in JSON format.
Created At Timestamp when the document was created.
Updated At Timestamp when the document was last updated.
Document Type Detailed JSON object describing the document type and related configurations.
Order Detailed JSON object describing the order associated with the document.
Referenced Document Detailed JSON object describing the referenced document.
Dependent Documents Array of JSON objects describing documents dependent on this document.
Document Media File Detailed JSON object describing the media file associated with the document.
Request Options Node-level request options such as batching, SSL settings, proxy, and timeout.

Output

JSON

  • id - Unique identifier of the created document.
  • documentTypeId - Identifier of the document type.
  • fileType - File type of the document.
  • orderId - Identifier of the associated order.
  • sent - Indicates if the document has been sent.
  • static - Indicates if the document is static.
  • deepLinkCode - Deep link code for accessing the document.
  • documentNumber - Number assigned to the document.
  • config - Configuration settings of the document.
  • customFields - Custom fields associated with the document.
  • createdAt - Creation timestamp of the document.
  • updatedAt - Last update timestamp of the document.
  • documentType - Detailed information about the document type.
  • order - Detailed information about the associated order.
  • referencedDocument - Information about the referenced document.
  • dependentDocuments - List of documents dependent on this document.
  • documentMediaFile - Information about the media file linked to the document.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Document Type Id, File Type, Order Id, Config, Deep Link Code) are provided to avoid validation errors.
  • If the API returns authentication errors, verify that the Shopware Admin API credentials are correctly configured.
  • Timeout errors can occur if the server is slow; adjust the timeout setting in Request Options accordingly.
  • If SSL certificate validation fails, enable 'Ignore SSL Issues' in Request Options if appropriate for your environment.

Discussion