/** * WooCommerce Node - Version 1 * Discriminator: resource=order, operation=create */ interface Credentials { wooCommerceApi: CredentialReference; } /** Create a customer */ export type WooCommerceV1OrderCreateParams = { resource: 'order'; operation: 'create'; /** * Additional Fields * @default {} */ additionalFields?: { /** Currency the order was created with */ currency?: string | Expression | PlaceholderValue; /** User ID who owns the order. 0 for guests. */ customerId?: string | Expression | PlaceholderValue; /** Note left by customer during checkout */ customerNote?: string | Expression | PlaceholderValue; /** Parent order ID */ parentId?: string | Expression | PlaceholderValue; /** Payment Method ID */ paymentMethodId?: string | Expression | PlaceholderValue; /** Payment Method Title */ paymentMethodTitle?: string | Expression | PlaceholderValue; /** Whether the order is paid. It will set the status to processing and reduce stock items. * @default false */ setPaid?: boolean | Expression; /** A named status for the order * @default pending */ status?: 'cancelled' | 'completed' | 'failed' | 'on-hold' | 'pending' | 'processing' | 'refunded' | 'trash' | Expression; /** Unique transaction ID */ transactionID?: string | Expression | PlaceholderValue; }; /** * Billing address * @default {} */ billingUi?: { /** Address */ billingValues?: { /** First Name */ firstName?: string | Expression | PlaceholderValue; /** Last Name */ lastName?: string | Expression | PlaceholderValue; /** Company */ company?: string | Expression | PlaceholderValue; /** Address Line 1 */ address_1?: string | Expression | PlaceholderValue; /** Address Line 2 */ address_2?: string | Expression | PlaceholderValue; /** ISO code or name of the state, province or district */ city?: string | Expression | PlaceholderValue; /** Postal Code */ postcode?: string | Expression | PlaceholderValue; /** Country */ country?: string | Expression | PlaceholderValue; /** Email */ email?: string | Expression | PlaceholderValue; /** Phone */ phone?: string | Expression | PlaceholderValue; }; }; /** * Coupons line data * @default {} */ couponLinesUi?: { /** Coupon Line */ couponLinesValues?: Array<{ /** Coupon code */ code?: string | Expression | PlaceholderValue; /** Meta data * @default {} */ metadataUi?: { /** Metadata */ metadataValues?: Array<{ /** Name of the metadata key to add */ key?: string | Expression | PlaceholderValue; /** Value to set for the metadata key */ value?: string | Expression | PlaceholderValue; }>; }; }>; }; /** * Fee line data * @default {} */ feeLinesUi?: { /** Fee Line */ feeLinesValues?: Array<{ /** Fee name */ name?: string | Expression | PlaceholderValue; /** Tax class of fee */ taxClass?: string | Expression | PlaceholderValue; /** Tax class of fee */ taxStatus?: 'taxable' | 'none' | Expression; /** Line total (after discounts) */ total?: string | Expression | PlaceholderValue; /** Meta data * @default {} */ metadataUi?: { /** Metadata */ metadataValues?: Array<{ /** Name of the metadata key to add */ key?: string | Expression | PlaceholderValue; /** Value to set for the metadata key */ value?: string | Expression | PlaceholderValue; }>; }; }>; }; /** * Line item data * @default {} */ lineItemsUi?: { /** Line Item */ lineItemsValues?: Array<{ /** Product name */ name?: string | Expression | PlaceholderValue; /** Product ID * @default 0 */ productId?: number | Expression; /** Variation ID, if applicable * @default 0 */ variationId?: number | Expression; /** Quantity ordered * @default 1 */ quantity?: number | Expression; /** Slug of the tax class of product */ taxClass?: string | Expression | PlaceholderValue; /** Line subtotal (before discounts) */ subtotal?: string | Expression | PlaceholderValue; /** Line total (after discounts) */ total?: string | Expression | PlaceholderValue; /** Meta data * @default {} */ metadataUi?: { /** Metadata */ metadataValues?: Array<{ /** Name of the metadata key to add */ key?: string | Expression | PlaceholderValue; /** Value to set for the metadata key */ value?: string | Expression | PlaceholderValue; }>; }; }>; }; /** * Meta data * @default {} */ metadataUi?: { /** Metadata */ metadataValues?: Array<{ /** Name of the metadata key to add */ key?: string | Expression | PlaceholderValue; /** Value to set for the metadata key */ value?: string | Expression | PlaceholderValue; }>; }; /** * Shipping address * @default {} */ shippingUi?: { /** Address */ shippingValues?: { /** First Name */ firstName?: string | Expression | PlaceholderValue; /** Last Name */ lastName?: string | Expression | PlaceholderValue; /** Company */ company?: string | Expression | PlaceholderValue; /** Address Line 1 */ address_1?: string | Expression | PlaceholderValue; /** Address Line 2 */ address_2?: string | Expression | PlaceholderValue; /** ISO code or name of the state, province or district */ city?: string | Expression | PlaceholderValue; /** Postal Code */ postcode?: string | Expression | PlaceholderValue; /** Country */ country?: string | Expression | PlaceholderValue; }; }; /** * Shipping line data * @default {} */ shippingLinesUi?: { /** Fee Line */ shippingLinesValues?: Array<{ /** Shipping method name */ methodTitle?: string | Expression | PlaceholderValue; /** Shipping method ID */ 'method ID'?: string | Expression | PlaceholderValue; /** Line total (after discounts) */ total?: string | Expression | PlaceholderValue; /** Meta data * @default {} */ metadataUi?: { /** Metadata */ metadataValues?: Array<{ /** Name of the metadata key to add */ key?: string | Expression | PlaceholderValue; /** Value to set for the metadata key */ value?: string | Expression | PlaceholderValue; }>; }; }>; }; }; export type WooCommerceV1OrderCreateOutput = { _links?: { collection?: Array<{ href?: string; }>; self?: Array<{ href?: string; }>; }; billing?: { address_1?: string; address_2?: string; city?: string; company?: string; country?: string; email?: string; first_name?: string; last_name?: string; phone?: string; postcode?: string; state?: string; }; cart_hash?: string; cart_tax?: string; created_via?: string; currency?: string; currency_symbol?: string; customer_id?: number; customer_ip_address?: string; customer_note?: string; customer_user_agent?: string; date_created?: string; date_created_gmt?: string; date_modified?: string; date_modified_gmt?: string; discount_tax?: string; discount_total?: string; fee_lines?: Array<{ amount?: string; id?: number; name?: string; tax_class?: string; tax_status?: string; total?: string; total_tax?: string; }>; id?: number; is_editable?: boolean; line_items?: Array<{ id?: number; image?: { src?: string; }; meta_data?: Array<{ display_key?: string; display_value?: string; id?: number; key?: string; value?: string; }>; name?: string; product_id?: number; quantity?: number; subtotal?: string; subtotal_tax?: string; tax_class?: string; total?: string; total_tax?: string; variation_id?: number; }>; meta_data?: Array<{ id?: number; key?: string; }>; needs_processing?: boolean; number?: string; order_key?: string; parent_id?: number; payment_method?: string; payment_method_title?: string; payment_url?: string; prices_include_tax?: boolean; shipping?: { address_1?: string; address_2?: string; city?: string; company?: string; country?: string; first_name?: string; last_name?: string; phone?: string; postcode?: string; state?: string; }; shipping_lines?: Array<{ id?: number; instance_id?: string; method_id?: string; method_title?: string; total?: string; total_tax?: string; }>; shipping_tax?: string; shipping_total?: string; status?: string; total?: string; total_tax?: string; transaction_id?: string; version?: string; }; export type WooCommerceV1OrderCreateNode = { type: 'n8n-nodes-base.wooCommerce'; version: 1; credentials?: Credentials; config: NodeConfig; output?: Items; };