Shopware icon

Shopware

Shopware

Actions778

Document → Update Document

AI-generated

Overview

This node operation updates a document in the Shopware system. It is useful for scenarios where you need to modify existing document details such as document type, file type, order association, media files, and custom configurations. For example, updating an invoice document with new information or linking it to a different order version.

Use Case Examples

  1. Updating an invoice document's file type and associated order ID.
  2. Modifying the configuration JSON of a document to change its settings.
  3. Linking a document to a referenced document or dependent documents for complex document relationships.

Properties

Name Meaning
Id Identifier for the document to update, required to specify which document to modify.
Response Data format for the response, used to specify the response format if needed.
Document Type Id Identifier for the type of document, required to define the document category.
File Type Type of the file associated with the document, required to specify the file format.
Referenced Document Id Identifier for a referenced document, used to link this document to another.
Order Id Identifier for the order associated with the document, required to link the document to an order.
Document Media File Id Identifier for the media file associated with the document.
Order Version Id Identifier for the version of the order associated with the document.
Config JSON configuration object for the document, required to specify document settings.
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, required for direct access.
Document Number Number assigned to the document.
Custom Fields JSON object for custom fields associated with the document.
Created At Timestamp for when the document was created.
Updated At Timestamp for when the document was last updated.
Document Type JSON object representing the document type details and related configurations.
Order JSON object representing the order details associated with the document.
Referenced Document JSON object representing the referenced document details.
Dependent Documents JSON array of documents that depend on this document.
Document Media File JSON object representing the media file associated with the document.

Output

JSON

  • id - The unique identifier of the updated document.
  • documentTypeId - The identifier of the document type.
  • fileType - The file type of the document.
  • referencedDocumentId - The identifier of the referenced document, if any.
  • orderId - The identifier of the associated order.
  • documentMediaFileId - The identifier of the associated media file.
  • orderVersionId - The identifier of the order version.
  • config - The configuration object of the document.
  • sent - Indicates if the document has been sent.
  • static - Indicates if the document is static.
  • deepLinkCode - The deep link code for the document.
  • documentNumber - The document number.
  • customFields - Custom fields associated with the document.
  • createdAt - The creation timestamp of the document.
  • updatedAt - The last update timestamp of the document.
  • documentType - The detailed document type object.
  • order - The detailed order object associated with the document.
  • referencedDocument - The detailed referenced document object.
  • dependentDocuments - Array of dependent documents.
  • documentMediaFile - The detailed media file object associated with the document.

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 API key credential is correctly configured and has necessary permissions.
  • For JSON fields like Config, Custom Fields, Document Type, Order, Referenced Document, Dependent Documents, and Document Media File, ensure the JSON is well-formed to prevent parsing errors.

Discussion