{
  "openapi": "3.1.0",
  "info": {
    "title": "Invoice Falcon API v3",
    "version": "3.0.0",
    "description": "Invoice Falcon's action-driven API: invoices, quotes, credit notes and packing slips for Shopify orders, plus the settings behind them. Every action is self-describing (description, aliases, JSON request schema) and also reachable through `/help`, `skill.md`, `llms.txt` and the MCP server. All endpoints require the `X-Auth-Token` API key from the dashboard's Settings → API.",
    "contact": {
      "name": "Invoice Falcon Support",
      "email": "invoice.falcon@artossoftware.com",
      "url": "https://app.invoicefalcon.com"
    }
  },
  "servers": [
    {
      "url": "https://app.invoicefalcon.com/api/v3/external",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Customers"
    },
    {
      "name": "Documents"
    },
    {
      "name": "Orders"
    },
    {
      "name": "Templates"
    }
  ],
  "paths": {
    "/account/automation": {
      "get": {
        "operationId": "account.automation.read",
        "summary": "Read automation settings",
        "description": "What the store automates: whether invoices are emailed automatically, after what delay and on which order condition (any order, a payment status, a fulfillment status or a shipment status, narrowed by customer and order tags and by sales channel); automatic credit notes on refunds; the pay-now button in emails; and payment reminders (due days, interval, before/after, extra recipients). Read-only.\n\n`automatic_invoices.when.payment_status` values: `paid` (Paid), `pending` (Pending), `refunded` (Refunded), `partially_paid` (Partially paid), `authorized` (Authorized), `voided` (Voided).\n\n`automatic_invoices.when.fulfillment_status` values: `shipped` (Fulfilled), `unshipped` (Unfulfilled), `partial` (Partially fulfilled), `in_progress` (In progress), `on_hold` (On hold).\n\n`automatic_invoices.when.shipment_status` values: `shipped` (Shipped), `delivered` (Delivered), `in_transit` (In transit).\n\n`payment_reminders.send` values: `after` (After the due date), `before` (Before the due date), `both` (Before and after the due date).",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Automation"
                },
                "example": {
                  "automatic_invoices": {
                    "enabled": true,
                    "delay_minutes": null,
                    "when": {
                      "payment_status": "paid",
                      "fulfillment_status": null,
                      "shipment_status": null,
                      "trigger": "payment_status"
                    },
                    "only_customer_tags": null,
                    "except_customer_tags": null,
                    "only_order_tags": null,
                    "except_order_tags": null
                  },
                  "automatic_credit_notes": {
                    "enabled": false,
                    "email_customer": false
                  },
                  "pay_now_button": {
                    "enabled": false
                  },
                  "payment_reminders": {
                    "enabled": true,
                    "automatic": true,
                    "due_after_days": null,
                    "every_days": 5,
                    "send": "after",
                    "also_send_to": "",
                    "only_to_these_addresses": false,
                    "include_payment_link": false,
                    "active": true,
                    "also_send_to_addresses": []
                  },
                  "paid_features_available": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "automatic invoicing settings",
          "are invoices sent automatically",
          "when do invoices go out",
          "payment reminder settings",
          "automatic credit notes",
          "pay now button",
          "automation rules"
        ],
        "x-value-labels": {
          "automatic_invoices.when.payment_status": {
            "paid": "Paid",
            "pending": "Pending",
            "refunded": "Refunded",
            "partially_paid": "Partially paid",
            "authorized": "Authorized",
            "voided": "Voided"
          },
          "automatic_invoices.when.fulfillment_status": {
            "shipped": "Fulfilled",
            "unshipped": "Unfulfilled",
            "partial": "Partially fulfilled",
            "in_progress": "In progress",
            "on_hold": "On hold"
          },
          "automatic_invoices.when.shipment_status": {
            "shipped": "Shipped",
            "delivered": "Delivered",
            "in_transit": "In transit"
          },
          "payment_reminders.send": {
            "after": "After the due date",
            "before": "Before the due date",
            "both": "Before and after the due date"
          }
        }
      },
      "patch": {
        "operationId": "account.automation.update",
        "summary": "Update automation settings",
        "description": "Change what the store automates: automatic invoice emails and their condition (any order, a payment, fulfillment or shipment status, narrowed by customer and order tags and by sales channel), automatic credit notes on refunds, the Pay now button, and payment reminders. Deep partial. Returns the automation section as the read shows it.\n\n**Note:** Applies to orders and invoices from now on; nothing is sent for past orders. Tag and status conditions, automatic reminders, automatic credit notes and the Pay now button need a paid plan.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Automation"
                },
                "example": {
                  "automatic_invoices": {
                    "enabled": true,
                    "delay_minutes": 5,
                    "when": {
                      "payment_status": "paid",
                      "fulfillment_status": null,
                      "shipment_status": null,
                      "trigger": "payment_status"
                    },
                    "only_customer_tags": null,
                    "except_customer_tags": null,
                    "only_order_tags": null,
                    "except_order_tags": null
                  },
                  "automatic_credit_notes": {
                    "enabled": false,
                    "email_customer": false
                  },
                  "pay_now_button": {
                    "enabled": false
                  },
                  "payment_reminders": {
                    "enabled": true,
                    "automatic": false,
                    "due_after_days": null,
                    "every_days": 5,
                    "send": "after",
                    "also_send_to": "",
                    "only_to_these_addresses": false,
                    "include_payment_link": false,
                    "active": false,
                    "also_send_to_addresses": []
                  },
                  "paid_features_available": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "turn on automatic invoicing",
          "send invoices automatically when paid",
          "stop automatic invoices",
          "enable payment reminders",
          "remind customers every 7 days",
          "create credit notes on refund",
          "turn off the pay now button",
          "only invoice customers tagged wholesale",
          "only invoice online store orders",
          "skip marketplace orders"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "automatic_invoices": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Email an invoice for every order that meets the condition."
                      },
                      "delay_minutes": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1,
                        "maximum": 30,
                        "description": "Wait this long after the order before sending (1-30); null sends at once."
                      },
                      "when": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "trigger": {
                            "type": "string",
                            "enum": [
                              "any_order",
                              "payment_status",
                              "fulfillment_status",
                              "shipment_status"
                            ],
                            "description": "Which condition applies. `any_order` clears the three statuses; the others need the matching status set."
                          },
                          "payment_status": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "paid",
                              "pending",
                              "refunded",
                              "partially_paid",
                              "authorized",
                              "voided"
                            ],
                            "description": "Send when the order reaches this payment status. Clears the other two."
                          },
                          "fulfillment_status": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "shipped",
                              "unshipped",
                              "partial",
                              "in_progress",
                              "on_hold"
                            ],
                            "description": "Send when the order reaches this fulfillment status. Clears the other two."
                          },
                          "shipment_status": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "shipped",
                              "delivered",
                              "in_transit"
                            ],
                            "description": "Send when the shipment reaches this status. Clears the other two."
                          }
                        }
                      },
                      "only_customer_tags": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Only customers with one of these tags (comma-separated)."
                      },
                      "except_customer_tags": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Never for customers with one of these tags."
                      },
                      "only_order_tags": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Only orders with one of these tags."
                      },
                      "except_order_tags": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Never for orders with one of these tags."
                      },
                      "only_sales_channels": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Only orders from these sales channels (comma-separated Shopify source names such as web, pos, amazon); blank means any."
                      }
                    }
                  },
                  "automatic_credit_notes": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Create a credit note when Shopify records a refund."
                      },
                      "email_customer": {
                        "type": "boolean",
                        "description": "Also email the credit note to the customer."
                      }
                    }
                  },
                  "pay_now_button": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Show a Pay now button in invoice emails for unpaid orders."
                      }
                    }
                  },
                  "payment_reminders": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Payment reminders are available for unpaid invoices."
                      },
                      "automatic": {
                        "type": "boolean",
                        "description": "Send reminders automatically instead of by hand."
                      },
                      "due_after_days": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0,
                        "description": "Days after the invoice date an invoice is due."
                      },
                      "every_days": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Days between reminders (at least 1)."
                      },
                      "send": {
                        "type": "string",
                        "enum": [
                          "after",
                          "before",
                          "both"
                        ],
                        "description": "Before the due date, after it, or both."
                      },
                      "also_send_to": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Extra recipients, comma-separated."
                      },
                      "only_to_these_addresses": {
                        "type": "boolean",
                        "description": "Send reminders only to `also_send_to`, not the customer."
                      },
                      "include_payment_link": {
                        "type": "boolean",
                        "description": "Put the payment link in reminder emails."
                      }
                    }
                  }
                }
              },
              "example": {
                "automatic_invoices": {
                  "enabled": true,
                  "delay_minutes": 5,
                  "when": {
                    "trigger": "payment_status",
                    "payment_status": "paid"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/documents": {
      "get": {
        "operationId": "account.documents.read",
        "summary": "Read document settings",
        "description": "The document defaults: invoice numbering (prefix, next number, order number reuse), which dates are printed, document language and auto-detection, multicurrency, PDF file name, the business name, address, contact and tax registration shown on every document, invoice locking, EU VAT footer notes and the \"Created with Invoice Falcon\" brand. Read-only.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                },
                "example": {
                  "numbering": {
                    "invoice_prefix": "INV",
                    "next_invoice_number": null,
                    "use_order_number": false,
                    "credit_notes_use_invoice_number": false,
                    "per_template_numbering_available": true
                  },
                  "dates": {
                    "use_order_created_date": false,
                    "use_paid_date": false
                  },
                  "language": {
                    "document_locale": "en",
                    "auto_detect_customer_language": false,
                    "translate_product_names": false,
                    "available_locales": [
                      "az",
                      "bg",
                      "cs"
                    ]
                  },
                  "currency": {
                    "multicurrency": true,
                    "show_currency_code": true
                  },
                  "pdf": {
                    "file_name": null
                  },
                  "business": {
                    "name": "Acme GmbH",
                    "address_line_1": null,
                    "address_line_2": null,
                    "city_line": null,
                    "country_line": null,
                    "email": null,
                    "phone": null
                  },
                  "tax": {
                    "registration_number": null,
                    "shown_as": null
                  },
                  "compliance": {
                    "lock_invoices_after_issue": false
                  },
                  "eu_vat_footer_notes": {
                    "outside_eu": null,
                    "inside_eu": null,
                    "available": false
                  },
                  "branding": {
                    "show_invoice_falcon_brand": true,
                    "removal_available": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "document settings",
          "invoice numbering",
          "business address on invoices",
          "invoice language",
          "tax id on invoices",
          "pdf file name",
          "are invoices locked after issue",
          "next invoice number"
        ]
      },
      "patch": {
        "operationId": "account.documents.update",
        "summary": "Update document settings",
        "description": "Change the document defaults every template inherits: invoice numbering, which dates are printed, language and currency, the PDF file name, the business name, address and contact, the tax registration, invoice locking, EU VAT footer notes and the Invoice Falcon brand line. Deep partial. Returns the documents section as the read shows it.\n\n**Note:** Applies to every document generated from now on; existing PDFs are unchanged. Multicurrency and removing the brand line need a paid plan.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                },
                "example": {
                  "numbering": {
                    "invoice_prefix": "INV",
                    "next_invoice_number": "1200",
                    "use_order_number": false,
                    "credit_notes_use_invoice_number": false,
                    "per_template_numbering_available": true
                  },
                  "dates": {
                    "use_order_created_date": false,
                    "use_paid_date": false
                  },
                  "language": {
                    "document_locale": "en",
                    "auto_detect_customer_language": false,
                    "translate_product_names": false,
                    "available_locales": [
                      "az",
                      "bg",
                      "cs"
                    ]
                  },
                  "currency": {
                    "multicurrency": true,
                    "show_currency_code": true
                  },
                  "pdf": {
                    "file_name": null
                  },
                  "business": {
                    "name": "Acme GmbH",
                    "address_line_1": null,
                    "address_line_2": null,
                    "city_line": null,
                    "country_line": null,
                    "email": null,
                    "phone": null
                  },
                  "tax": {
                    "registration_number": null,
                    "shown_as": null
                  },
                  "compliance": {
                    "lock_invoices_after_issue": false
                  },
                  "eu_vat_footer_notes": {
                    "outside_eu": null,
                    "inside_eu": null,
                    "available": false
                  },
                  "branding": {
                    "show_invoice_falcon_brand": true,
                    "removal_available": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "change invoice prefix",
          "set the next invoice number",
          "update business address on invoices",
          "change document language",
          "set my vat number",
          "lock invoices after issue",
          "remove invoice falcon branding",
          "change the pdf file name"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "numbering": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "invoice_prefix": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Prefix of invoice numbers, e.g. INV."
                      },
                      "next_invoice_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The number the next invoice takes (digits only)."
                      },
                      "use_order_number": {
                        "type": "boolean",
                        "description": "Number invoices after the Shopify order number instead of a counter."
                      },
                      "credit_notes_use_invoice_number": {
                        "type": "boolean",
                        "description": "Credit notes take the invoice's number."
                      }
                    }
                  },
                  "dates": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "use_order_created_date": {
                        "type": "boolean",
                        "description": "Print the order date as the invoice date."
                      },
                      "use_paid_date": {
                        "type": "boolean",
                        "description": "Print the payment date as the invoice date."
                      },
                      "delivery_date_attribute": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Name of the order attribute holding the delivery date the buyer chose at checkout, e.g. Liefertermin. It becomes the fulfillment date; blank uses the Shopify fulfillment."
                      },
                      "delivery_date_from_tags": {
                        "type": "boolean",
                        "description": "Also read the delivery date from a date-shaped order tag (11-02-2026) when the attribute is absent."
                      },
                      "invoicing_start_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Orders placed before this date (YYYY-MM-DD, in the shop timezone) are never invoiced: not automatically, not from the customer account or order status page, and the order page asks before creating one. Null invoices any order."
                      }
                    }
                  },
                  "language": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "document_locale": {
                        "type": "string",
                        "enum": [
                          "az",
                          "bg",
                          "cs",
                          "da",
                          "de",
                          "el",
                          "en",
                          "es",
                          "es-MX",
                          "et",
                          "fi",
                          "fr",
                          "it",
                          "ja",
                          "ko",
                          "lt",
                          "lv",
                          "nl",
                          "nn",
                          "pl",
                          "pt",
                          "ro",
                          "sk",
                          "sl",
                          "sv",
                          "zh"
                        ],
                        "description": "Language documents are printed in."
                      },
                      "auto_detect_customer_language": {
                        "type": "boolean",
                        "description": "Use the customer's checkout language when known."
                      },
                      "translate_product_names": {
                        "type": "boolean",
                        "description": "Print translated product names where Shopify has them."
                      }
                    }
                  },
                  "currency": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "multicurrency": {
                        "type": "boolean",
                        "description": "Print in the currency the customer paid in."
                      },
                      "show_currency_code": {
                        "type": "boolean",
                        "description": "Print the currency code next to amounts."
                      }
                    }
                  },
                  "pdf": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "file_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "PDF file name pattern, e.g. invoice-{{ invoice_number }}."
                      }
                    }
                  },
                  "business": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Business name printed on documents."
                      },
                      "address_line_1": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "address_line_2": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "city_line": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "City and region line."
                      },
                      "country_line": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Country and postcode line."
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  },
                  "tax": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "registration_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "VAT / GST / ABN number."
                      },
                      "shown_as": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Label printed before it, e.g. VAT No."
                      }
                    }
                  },
                  "compliance": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "lock_invoices_after_issue": {
                        "type": "boolean",
                        "description": "Shopify order updates (refunds, cancellations, edits) no longer change an issued invoice; corrections go on a credit note. Manual edits and regenerate still work."
                      }
                    }
                  },
                  "eu_vat_footer_notes": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "outside_eu": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Footer note for customers outside the EU (migrated stores only)."
                      },
                      "inside_eu": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Footer note for customers inside the EU (migrated stores only)."
                      }
                    }
                  },
                  "branding": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "show_invoice_falcon_brand": {
                        "type": "boolean",
                        "description": "Print \"Created with Invoice Falcon\"; turning it off needs a paid plan."
                      }
                    }
                  }
                }
              },
              "example": {
                "business": {
                  "name": "Acme GmbH"
                },
                "numbering": {
                  "next_invoice_number": "1200"
                }
              }
            }
          }
        }
      }
    },
    "/account/e_invoicing": {
      "get": {
        "operationId": "account.e_invoicing.read",
        "summary": "Read e-invoicing settings",
        "description": "The e-invoicing setup: whether it is available for the store (German stores), switched on and actually active (paid plan and a complete seller profile), whether e-invoices are generated automatically or on request, and the seller profile (legal name, VAT id or tax number, city, postcode, small-business status, bank details) with the values resolved from store details where the profile leaves them blank. Read-only.\n\n`generation` values: `automatic` (Generate with every invoice), `manual` (Generate on request).",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EInvoicing"
                },
                "example": {
                  "enabled": false,
                  "generation": "automatic",
                  "seller": {
                    "legal_name": null,
                    "vat_id": null,
                    "tax_number": null,
                    "city": null,
                    "zip": null,
                    "small_business": false,
                    "country_code": "DE",
                    "resolved": {
                      "legal_name": "Acme GmbH",
                      "city": "Barwaha, khargone",
                      "zip": "451115"
                    }
                  },
                  "bank": {
                    "iban": null,
                    "bic": null,
                    "name": null
                  },
                  "available": false,
                  "active": false,
                  "manual_mode": false,
                  "ready": false,
                  "configured": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "e-invoicing settings",
          "is e-invoicing on",
          "xrechnung setup",
          "zugferd settings",
          "e-invoice seller profile",
          "why is my e-invoice not generated"
        ],
        "x-value-labels": {
          "generation": {
            "automatic": "Generate with every invoice",
            "manual": "Generate on request"
          }
        }
      },
      "patch": {
        "operationId": "account.e_invoicing.update",
        "summary": "Update e-invoicing settings",
        "description": "Change the e-invoicing setup of a German store: switch it on or off, choose automatic or on-request generation, and edit the seller profile (legal name, VAT id or tax number, city, postcode, small-business status) and bank details. Deep partial. Returns the e_invoicing section, including whether it is now active.\n\n**Note:** Applies to invoices created from now on. E-invoicing is only available to stores in Germany and needs a paid plan; `active` in the response says whether e-invoices will actually be generated (enabled, paid plan and a profile with a legal name and a VAT id or tax number).",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EInvoicing"
                },
                "example": {
                  "enabled": true,
                  "generation": "automatic",
                  "seller": {
                    "legal_name": "Acme GmbH",
                    "vat_id": "DE123456789",
                    "tax_number": null,
                    "city": null,
                    "zip": null,
                    "small_business": false,
                    "country_code": "DE",
                    "resolved": {
                      "legal_name": "Acme GmbH",
                      "city": "Barwaha, khargone",
                      "zip": "451115"
                    }
                  },
                  "bank": {
                    "iban": "DE89370400440532013000",
                    "bic": null,
                    "name": null
                  },
                  "available": true,
                  "active": true,
                  "manual_mode": false,
                  "ready": true,
                  "configured": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "turn on e-invoicing",
          "set up xrechnung",
          "enter my vat id for e-invoices",
          "add my iban",
          "generate e-invoices only on request",
          "disable e-invoicing",
          "zugferd settings"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Generate e-invoices (XRechnung/ZUGFeRD) for this store."
                  },
                  "generation": {
                    "type": "string",
                    "enum": [
                      "automatic",
                      "manual"
                    ],
                    "description": "automatic: with every invoice; manual: only for invoices you request one for."
                  },
                  "seller": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "legal_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Legal entity name; blank uses the business name."
                      },
                      "vat_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "USt-IdNr: DE followed by 9 digits."
                      },
                      "tax_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Steuernummer, if there is no VAT id."
                      },
                      "city": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Seller city; blank uses the Shopify address."
                      },
                      "zip": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Seller postcode; blank uses the Shopify address."
                      },
                      "small_business": {
                        "type": "boolean",
                        "description": "Kleinunternehmer (§19 UStG): no VAT shown."
                      }
                    }
                  },
                  "bank": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "iban": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "IBAN for the payment block on unpaid invoices."
                      },
                      "bic": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Bank name."
                      }
                    }
                  }
                }
              },
              "example": {
                "enabled": true,
                "generation": "automatic",
                "seller": {
                  "legal_name": "Acme GmbH",
                  "vat_id": "DE123456789"
                },
                "bank": {
                  "iban": "DE89370400440532013000"
                }
              }
            }
          }
        }
      }
    },
    "/account/emails": {
      "get": {
        "operationId": "account.emails.read",
        "summary": "Read email settings",
        "description": "The email language and, for each document type (invoice, quote, credit note, payment reminder), the subject and body the store sends, with `customized` telling whether that is the merchant's own text or the default for the language. Read-only.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Email"
                },
                "example": {
                  "locale": "en",
                  "custom_text": false,
                  "templates": {
                    "invoice": {
                      "subject": "Your invoice {{order_number}}",
                      "body": "Hi",
                      "customized": true,
                      "in_use": false
                    },
                    "quote": {
                      "subject": "{{shop_name}} - Quote for your Order {{order_number}}",
                      "body": "Hello,\n\nThank you for shopping at {{shop_name}}. We have attached the Quote for your Order {{order_number}} to this email.\n\nRegards,\nThe {{shop_name}} Team",
                      "customized": false,
                      "in_use": false
                    },
                    "credit_note": {
                      "subject": "{{shop_name}} - Credit Note {{order_number}}",
                      "body": "Hello,\n\nPlease find attached the credit note for your order to this email.\n\nRegards,\nThe {{shop_name}} Team",
                      "customized": false,
                      "in_use": false
                    },
                    "payment_reminder": {
                      "subject": "{{shop_name}} - Reminder for your Invoice {{order_number}}",
                      "body": "Hello,\n\nThank you for shopping at {{shop_name}}. This is a gentle reminder that your invoice {{invoice_number}} is past due.\n\nIf you have already paid this invoice, please disregard this message.\n\nBest,\nThe {{shop_name}} Team",
                      "customized": false,
                      "in_use": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "email templates",
          "what does my invoice email say",
          "email subject and body",
          "email language",
          "custom email text",
          "payment reminder email text"
        ]
      },
      "patch": {
        "operationId": "account.emails.update",
        "summary": "Update email settings",
        "description": "Change the language emails go out in and whether the store's own email text is used instead of the default. Deep partial. To change the text itself use PATCH /account/emails/:kind. Returns the emails section as the read shows it.\n\n**Note:** Applies to every email sent from now on. Custom email text needs a paid plan.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Email"
                },
                "example": {
                  "locale": "de",
                  "custom_text": true,
                  "templates": {
                    "invoice": {
                      "subject": "{{shop_name}} - Ihre Rechnung zur Bestellung Nr. {{order_number}}",
                      "body": "Hallo,\n\nvielen Dank für Ihren Einkauf bei {{shop_name}}. Im Anhang finden Sie die Rechnung für Ihre Bestellung {{order_number}}.\n\nMit freundlichen Grüßen\n\ndas Team von {{shop_name}}",
                      "customized": false,
                      "in_use": false
                    },
                    "quote": {
                      "subject": "{{shop_name}} - Ihr Angebot {{order_number}}",
                      "body": "Hallo, danke für die Kontaktaufnahme {{shop_name}}. Wie gewünscht habe ich Ihr Angebot an diese E-Mail angehängt. Bitte werfen Sie einen Blick darauf und teilen Sie mir mit, wie Sie fortfahren möchten.\n\nMit freundlichen Grüßen\n\ndas Team von {{shop_name}}",
                      "customized": false,
                      "in_use": false
                    },
                    "credit_note": {
                      "subject": "{{shop_name}} - Gutschrift {{order_number}}",
                      "body": "Hallo, an dieser E-Mail finden Sie die Gutschrift für Ihre Bestellung.\n\nMit freundlichen Grüßen\n\ndas Team von {{shop_name}}",
                      "customized": false,
                      "in_use": false
                    },
                    "payment_reminder": {
                      "subject": "{{shop_name}} - Erinnerung an Ihre Rechnung Nr. {{order_number}}",
                      "body": "Hallo,\ndanke für den Einkauf bei {{shop_name}}. Dies ist eine sanfte Erinnerung daran, dass Ihre Rechnung überfällig ist.\n\nWenn Sie diese Rechnung bereits bezahlt haben, ignorieren Sie diese Nachricht bitte.\n\nBeste,\nDas {{shop_name}}-Team",
                      "customized": false,
                      "in_use": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "change email language",
          "send emails in german",
          "use my own email text",
          "turn off custom email text",
          "email locale",
          "switch to default email text"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "az",
                      "bg",
                      "cs",
                      "da",
                      "de",
                      "el",
                      "en",
                      "es",
                      "es-MX",
                      "et",
                      "fi",
                      "fr",
                      "it",
                      "ja",
                      "ko",
                      "lt",
                      "lv",
                      "nl",
                      "nn",
                      "pl",
                      "pt",
                      "ro",
                      "sk",
                      "sl",
                      "sv",
                      "zh"
                    ],
                    "description": "Language of the default email texts (and of the subject/body placeholders)."
                  },
                  "custom_text": {
                    "type": "boolean",
                    "description": "Use the store's own subject and body (see PATCH /account/emails/:kind) instead of the default text for the language."
                  }
                }
              },
              "example": {
                "locale": "de",
                "custom_text": true
              }
            }
          }
        }
      }
    },
    "/account/emails/{kind}": {
      "patch": {
        "operationId": "account.emails.update_template",
        "summary": "Update one email template",
        "description": "Set the store's own subject and/or body for one email kind: invoice, quote, credit_note or payment_reminder. Liquid placeholders are allowed and checked. Sending the default text (or an empty string) returns that field to the default for the language. The text is only sent when `custom_text` is true (PATCH /account/emails); each template says `in_use`. Returns the emails section.\n\n**Note:** Used for every email of that kind from now on, as long as custom text is on (`custom_text` in PATCH /account/emails).",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailUpdateTemplate"
                },
                "example": {
                  "locale": "en",
                  "custom_text": false,
                  "templates": {
                    "invoice": {
                      "subject": "Invoice {{invoice_number}}",
                      "body": "Thanks!",
                      "customized": true,
                      "in_use": false
                    },
                    "quote": {
                      "subject": "{{shop_name}} - Quote for your Order {{order_number}}",
                      "body": "Hello,\n\nThank you for shopping at {{shop_name}}. We have attached the Quote for your Order {{order_number}} to this email.\n\nRegards,\nThe {{shop_name}} Team",
                      "customized": false,
                      "in_use": false
                    },
                    "credit_note": {
                      "subject": "{{shop_name}} - Credit Note {{order_number}}",
                      "body": "Hello,\n\nPlease find attached the credit note for your order to this email.\n\nRegards,\nThe {{shop_name}} Team",
                      "customized": false,
                      "in_use": false
                    },
                    "payment_reminder": {
                      "subject": "{{shop_name}} - Reminder for your Invoice {{order_number}}",
                      "body": "Hello,\n\nThank you for shopping at {{shop_name}}. This is a gentle reminder that your invoice {{invoice_number}} is past due.\n\nIf you have already paid this invoice, please disregard this message.\n\nBest,\nThe {{shop_name}} Team",
                      "customized": false,
                      "in_use": false
                    }
                  },
                  "notice": "Saved, but not used yet: emails send the default text until custom_text is true (PATCH /account/emails {\"custom_text\": true})."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "change the invoice email text",
          "edit email subject",
          "edit the payment reminder email",
          "customise the quote email",
          "reset the email body to default",
          "set credit note email wording"
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "invoice, quote, credit_note or payment_reminder."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "description": "The email subject; Liquid placeholders such as {{order_number}} are allowed.",
                    "type": "string"
                  },
                  "body": {
                    "description": "The email body; Liquid placeholders are allowed.",
                    "type": "string"
                  }
                }
              },
              "examples": {
                "subject": {
                  "summary": "Change the invoice email subject",
                  "value": {
                    "subject": "Your invoice {{invoice_number}} from {{shop_name}}"
                  }
                },
                "both": {
                  "summary": "Change the subject and body",
                  "value": {
                    "subject": "Invoice for order {{order_number}}",
                    "body": "Hi {{customer_name}},\n\nYour invoice for order {{order_number}} is attached."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/integrations": {
      "get": {
        "operationId": "account.integrations.read",
        "summary": "Read integration settings",
        "description": "What the store has connected: whether an API key exists (never the key itself), the payment processor used for pay-now links and its mode, and the per-language texts of the Customer Accounts invoice download widget. Read-only.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Integration"
                },
                "example": {
                  "api_key": {
                    "configured": true
                  },
                  "payment_processor": {
                    "connected": false,
                    "name": null,
                    "stripe_checkout_v2": false
                  },
                  "customer_accounts": {
                    "translations": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "integrations",
          "is stripe connected",
          "do I have an API key",
          "customer accounts translations",
          "payment processor settings",
          "connected apps"
        ]
      }
    },
    "/account/integrations/api_key/rotate": {
      "post": {
        "operationId": "account.integrations.rotate_api_key",
        "summary": "Rotate the API key",
        "description": "Replace the store's API key with a new one and return it. The old key stops working at once, including for the request that rotated it. The key is shown only in this response.\n\n**Note:** Every integration using the old key must be updated. Not offered to assistants. Send it first without `confirm`: nothing changes and the 409 `confirmation_required` says what would. Tell the merchant, ask, and resend with `confirm: true` (`?confirm=true` on a DELETE) only after they agree.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Integration"
                },
                "example": {
                  "api_key": {
                    "configured": true,
                    "key": "if_api_key_YOUR_KEY"
                  },
                  "payment_processor": {
                    "connected": false,
                    "name": null,
                    "stripe_checkout_v2": false
                  },
                  "customer_accounts": {
                    "translations": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "rotate api key",
          "regenerate api key",
          "new api key",
          "reset api key",
          "my api key was leaked"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "description": "Send true only after the merchant agreed. Without it the key is kept and the 409 says what would happen.",
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "confirm": true
              }
            }
          }
        }
      }
    },
    "/account/plan": {
      "get": {
        "operationId": "account.billing.read",
        "summary": "Read plan",
        "description": "The shop's Invoice Falcon plan and this billing cycle's usage: the plan name, whether it is paid, the Free plan monthly invoice limit and how many orders have been invoiced against it, and when the cycle resets. Read-only.\n\n`tier` values: `free` (Free), `pro` (Pro), `partner` (Partner).",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Billing"
                },
                "example": {
                  "tier": "pro",
                  "plan_name": "ultimate",
                  "price_per_month": "9.99",
                  "paid": true,
                  "is_partner": true,
                  "usage": {
                    "orders_invoiced_this_cycle": 1,
                    "monthly_limit": 50,
                    "remaining": 49,
                    "counted": "An order counts once per cycle when one of its documents is emailed, printed, downloaded or rendered; creating or listing invoices does not.",
                    "cycle_started_on": "2026-11-10",
                    "cycle_resets_on": "2026-12-10"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "what plan am i on",
          "plan and usage",
          "how many invoices have i used",
          "monthly limit",
          "when does my limit reset",
          "am i on the free plan"
        ],
        "x-value-labels": {
          "tier": {
            "free": "Free",
            "pro": "Pro",
            "partner": "Partner"
          }
        }
      }
    },
    "/account/sending": {
      "get": {
        "operationId": "account.sending.read",
        "summary": "Read sending settings",
        "description": "How the store sends email: the custom \"from\" address and whether its domain is verified (and therefore in use), who gets a copy of every invoice email (a BCC list and an optional customer metafield holding extra recipients), and whether sending is currently allowed. Read-only.\n\n`status.unlimited_sending` values: `standard` (Standard limits), `pending` (Unlimited sending requested), `approved` (Unlimited sending approved).",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sending"
                },
                "example": {
                  "from": {
                    "email": "billing@example.com",
                    "verified": true,
                    "in_use": true
                  },
                  "copies": {
                    "enabled": true,
                    "to": "a@example.com; b@example.com",
                    "customer_metafield": "",
                    "to_addresses": [
                      "a@example.com",
                      "b@example.com"
                    ]
                  },
                  "status": {
                    "sending_allowed": true,
                    "unlimited_sending": "standard"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "email sender settings",
          "what address do my invoices come from",
          "is my sending domain verified",
          "bcc settings",
          "who gets copies of invoice emails",
          "can I send emails"
        ],
        "x-value-labels": {
          "status.unlimited_sending": {
            "standard": "Standard limits",
            "pending": "Unlimited sending requested",
            "approved": "Unlimited sending approved"
          }
        }
      },
      "patch": {
        "operationId": "account.sending.update",
        "summary": "Update sending settings",
        "description": "Change how the store sends email: the custom \"from\" address, whether copies of every invoice email go to the store and to which addresses, and the customer metafield that adds recipients. Deep partial: only the fields sent change. Returns the sending section as the read shows it.\n\n**Note:** Applies to every email sent from now on. A new from address is checked against the verified sending domains at once; `from.verified` in the response says whether it is in use. Copies, the metafield and the custom from address need a paid plan.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Sending"
                },
                "example": {
                  "from": {
                    "email": "billing@acme.example",
                    "verified": true,
                    "in_use": true
                  },
                  "copies": {
                    "enabled": true,
                    "to": "a@acme.example, b@acme.example",
                    "customer_metafield": "",
                    "to_addresses": [
                      "a@acme.example",
                      "b@acme.example"
                    ]
                  },
                  "status": {
                    "sending_allowed": true,
                    "unlimited_sending": "standard"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "change the from address",
          "send invoice emails from my domain",
          "bcc me on invoices",
          "send a copy of every invoice",
          "stop copying invoice emails",
          "set the cc metafield",
          "change sender email"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "from": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The address invoice emails come from. Its domain must be verified (DKIM) before it is used; until then emails go out from the Invoice Falcon address. Null returns to the default sender."
                      }
                    }
                  },
                  "copies": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Send a copy of every invoice email to the addresses in `to`."
                      },
                      "to": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Addresses for the copies, separated by commas or semicolons."
                      },
                      "customer_metafield": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "A Shopify customer metafield (namespace.key) holding extra recipients for that customer. Blank to stop using one."
                      }
                    }
                  }
                }
              },
              "example": {
                "from": {
                  "email": "billing@acme.example"
                },
                "copies": {
                  "enabled": true,
                  "to": "a@acme.example, b@acme.example"
                }
              }
            }
          }
        }
      }
    },
    "/account/setup": {
      "get": {
        "operationId": "account.setup.read",
        "summary": "Read setup settings",
        "description": "The store's setup state: store name, domain, country, currency and timezone; plan name; when the app was installed and onboarding finished; which interface the store uses; and the getting-started checklist (design picked, editor opened, first document, automatic invoicing). Read-only.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Setup"
                },
                "example": {
                  "store": {
                    "name": "Invoice Static Store",
                    "domain": "invoice-falcon-static-test-store.myshopify.com",
                    "email": "nexasky@gmail.com",
                    "country_code": "IN",
                    "currency": "INR",
                    "timezone": "America/New_York"
                  },
                  "plan_name": "ultimate",
                  "installed_at": "2026-11-10T08:35:15Z",
                  "onboarded": false,
                  "onboarded_at": null,
                  "interface": "v3",
                  "migrated_from": null,
                  "checklist": {
                    "dismissed": false,
                    "steps": {
                      "template_design": false,
                      "visual_editor": false,
                      "first_document": false,
                      "automatic_invoicing": true
                    },
                    "completed_count": 1,
                    "total": 4,
                    "visual_editor_template_id": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "setup status",
          "onboarding checklist",
          "is the store set up",
          "store details",
          "what is left to set up",
          "store timezone and currency"
        ]
      }
    },
    "/account/setup/dismiss": {
      "post": {
        "operationId": "account.setup.dismiss_checklist",
        "summary": "Dismiss setup checklist",
        "description": "Hide the getting-started checklist on the dashboard home for good. Idempotent. Returns the setup section.\n\n**Note:** The checklist does not come back; its steps are still reported by GET /account/setup.",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Setup"
                },
                "example": {
                  "store": {
                    "name": "Invoice Static Store",
                    "domain": "invoice-falcon-static-test-store.myshopify.com",
                    "email": "nexasky@gmail.com",
                    "country_code": "IN",
                    "currency": "INR",
                    "timezone": "America/New_York"
                  },
                  "plan_name": "ultimate",
                  "installed_at": "2026-11-10T08:35:15Z",
                  "onboarded": false,
                  "onboarded_at": null,
                  "interface": "v3",
                  "migrated_from": null,
                  "checklist": {
                    "dismissed": true,
                    "steps": {
                      "template_design": false,
                      "visual_editor": false,
                      "first_document": false,
                      "automatic_invoicing": false
                    },
                    "completed_count": 0,
                    "total": 4,
                    "visual_editor_template_id": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "dismiss the setup checklist",
          "hide getting started",
          "skip onboarding checklist",
          "remove the checklist from home"
        ]
      }
    },
    "/customers": {
      "get": {
        "operationId": "customers.list",
        "summary": "List customers",
        "description": "The customers Invoice Falcon stores: those on one of its documents, edited in the app or added in it. Not every Shopify customer (Invoice Falcon no longer copies them). Alphabetical, with contact details, tax and EORI numbers, tags and default address. `q` searches name, email, phone, tax number, EORI number and tags. Offset pages (`page`, `per_page`). Read-only.",
        "tags": [
          "Customers"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CustomerRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "id": 34,
                      "shopify_customer_id": "gid://shopify/Customer/9001",
                      "name": "Zoe Quinn",
                      "first_name": "Zoe",
                      "last_name": "Quinn",
                      "email": "zoe@example.com",
                      "phone": null,
                      "tax_number": "DE123",
                      "eori_number": null,
                      "tags": [
                        "vip",
                        "wholesale"
                      ],
                      "edited_in_app": false,
                      "default_address": {
                        "id": 588,
                        "kind": "default_address",
                        "name": null,
                        "first_name": null,
                        "last_name": null,
                        "company": "Quinn GmbH",
                        "address1": "1 Main St",
                        "address2": null,
                        "city": "Berlin",
                        "province": null,
                        "zip": "10115",
                        "country": "Germany",
                        "country_code": "DE",
                        "phone": null,
                        "tax_number": null,
                        "eori_number": null
                      },
                      "created_at": "2026-11-10T08:50:31Z",
                      "updated_at": "2026-11-10T08:50:31Z"
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "list customers",
          "find customer",
          "search customers by email",
          "customers with a VAT number",
          "who is this customer",
          "customer list"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page number, from 1."
            },
            "description": "Page number, from 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, 1-100 (default 25)."
            },
            "description": "Rows per page, 1-100 (default 25)."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Free text matched against name, email, phone, tax number, EORI number and tags."
            },
            "description": "Free text matched against name, email, phone, tax number, EORI number and tags."
          }
        ]
      }
    },
    "/customers/{id}": {
      "get": {
        "operationId": "customers.read",
        "summary": "Read customer",
        "description": "One customer with every address on file and the documents issued to them: how many, and the most recent five with their numbers and sent/paid times. Accepts the Invoice Falcon customer id (a number) or the Shopify customer gid (gid://shopify/Customer/123). Read-only.",
        "tags": [
          "Customers"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "example": {
                  "id": 32,
                  "shopify_customer_id": "gid://shopify/Customer/9001",
                  "name": "Zoe Quinn",
                  "first_name": "Zoe",
                  "last_name": "Quinn",
                  "email": "zoe@example.com",
                  "phone": null,
                  "tax_number": "DE123",
                  "eori_number": null,
                  "tags": [
                    "vip",
                    "wholesale"
                  ],
                  "edited_in_app": false,
                  "default_address": {
                    "id": 587,
                    "kind": "default_address",
                    "name": null,
                    "first_name": null,
                    "last_name": null,
                    "company": "Quinn GmbH",
                    "address1": "1 Main St",
                    "address2": null,
                    "city": "Berlin",
                    "province": null,
                    "zip": "10115",
                    "country": "Germany",
                    "country_code": "DE",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "created_at": "2026-11-10T08:50:31Z",
                  "updated_at": "2026-11-10T08:50:31Z",
                  "note": null,
                  "addresses": [
                    {
                      "id": 587,
                      "kind": "default_address",
                      "name": null,
                      "first_name": null,
                      "last_name": null,
                      "company": "Quinn GmbH",
                      "address1": "1 Main St",
                      "address2": null,
                      "city": "Berlin",
                      "province": null,
                      "zip": "10115",
                      "country": "Germany",
                      "country_code": "DE",
                      "phone": null,
                      "tax_number": null,
                      "eori_number": null
                    }
                  ],
                  "documents": {
                    "count": 1,
                    "recent": [
                      {
                        "id": 980191020,
                        "type": "invoice",
                        "number": "INV-9",
                        "shopify_order_id": "gid://shopify/Order/1",
                        "created_at": "2026-11-10T08:50:31Z",
                        "sent_at": "2026-01-02T00:00:00Z",
                        "paid_at": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show customer",
          "customer details",
          "customer addresses",
          "invoices for a customer",
          "how many invoices did this customer get"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Invoice Falcon customer id (a number), or the Shopify customer gid gid://shopify/Customer/123."
          }
        ]
      }
    },
    "/documents/bulk": {
      "get": {
        "operationId": "documents.bulk.list",
        "summary": "List bulk jobs",
        "description": "The shop bulk jobs, newest first, as the Bulk actions page lists them: kind, status, progress, count and the download link of finished PDF jobs.\n\n`status` values: `preparing` (Preparing), `pending` (Queued), `processing` (Running), `finalizing` (Finishing), `complete` (Complete), `failed` (Failed), `cancelled` (Cancelled).\n\n`kind` values: `print` (PDF print / download), `send` (Email send), `csv` (CSV export).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BulkRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "job_id": 13,
                      "kind": "print",
                      "status": "pending",
                      "progress": 0,
                      "count": 1,
                      "failure_reason": null,
                      "download_url": null,
                      "delivery_method": "print",
                      "processing_type": null,
                      "template_name": "default",
                      "from": null,
                      "to": null,
                      "created_at": "2026-11-10T08:35:18Z",
                      "updated_at": "2026-11-10T08:35:18Z"
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "list bulk jobs",
          "bulk action history",
          "my bulk downloads",
          "recent bulk prints",
          "running bulk jobs",
          "bulk exports"
        ],
        "x-value-labels": {
          "status": {
            "preparing": "Preparing",
            "pending": "Queued",
            "processing": "Running",
            "finalizing": "Finishing",
            "complete": "Complete",
            "failed": "Failed",
            "cancelled": "Cancelled"
          },
          "kind": {
            "print": "PDF print / download",
            "send": "Email send",
            "csv": "CSV export"
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "preparing",
                "pending",
                "processing",
                "finalizing",
                "complete",
                "failed",
                "cancelled"
              ],
              "description": "Only jobs in this status (pending, processing, complete, failed, cancelled). One of: `preparing` (Preparing), `pending` (Queued), `processing` (Running), `finalizing` (Finishing), `complete` (Complete), `failed` (Failed), `cancelled` (Cancelled)."
            },
            "description": "Only jobs in this status (pending, processing, complete, failed, cancelled). One of: `preparing` (Preparing), `pending` (Queued), `processing` (Running), `finalizing` (Finishing), `complete` (Complete), `failed` (Failed), `cancelled` (Cancelled)."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "1-based page number."
            },
            "description": "1-based page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, default 25, max 100."
            },
            "description": "Rows per page, default 25, max 100."
          }
        ]
      }
    },
    "/documents/bulk/{job_id}": {
      "get": {
        "operationId": "documents.bulk.read",
        "summary": "Read a bulk job",
        "description": "One bulk job: status (pending, processing, finalizing, complete, failed, cancelled), progress, the invoices done and failed by number, the failure reason, and for a finished PDF job a signed download link valid for one week.\n\n`status` values: `preparing` (Preparing), `pending` (Queued), `processing` (Running), `finalizing` (Finishing), `complete` (Complete), `failed` (Failed), `cancelled` (Cancelled).\n\n`kind` values: `print` (PDF print / download), `send` (Email send), `csv` (CSV export).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bulk"
                },
                "example": {
                  "job_id": 13,
                  "kind": "print",
                  "status": "pending",
                  "progress": 0,
                  "count": 1,
                  "completed": [],
                  "failed": [],
                  "failure_reason": null,
                  "download_url": null,
                  "delivery_method": "print",
                  "processing_type": null,
                  "template_name": "default",
                  "from": null,
                  "to": null,
                  "created_at": "2026-11-10T08:35:18Z",
                  "updated_at": "2026-11-10T08:35:18Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "bulk job status",
          "is my bulk download ready",
          "bulk print progress",
          "download bulk pdf",
          "check bulk send",
          "bulk action result"
        ],
        "x-value-labels": {
          "status": {
            "preparing": "Preparing",
            "pending": "Queued",
            "processing": "Running",
            "finalizing": "Finishing",
            "complete": "Complete",
            "failed": "Failed",
            "cancelled": "Cancelled"
          },
          "kind": {
            "print": "PDF print / download",
            "send": "Email send",
            "csv": "CSV export"
          }
        },
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/bulk/{job_id}/cancel": {
      "post": {
        "operationId": "documents.bulk.cancel",
        "summary": "Cancel a bulk job",
        "description": "Cancels a bulk job that has not finished, as the Bulk actions page does. Work already done stays done (emails already sent are sent); the job stops picking up more invoices.\n\n**Note:** Emails the job already sent cannot be recalled.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bulk"
                },
                "example": {
                  "job_id": 13,
                  "kind": "print",
                  "status": "cancelled",
                  "progress": 0,
                  "count": 1,
                  "completed": [],
                  "failed": [],
                  "failure_reason": null,
                  "download_url": null,
                  "delivery_method": "print",
                  "processing_type": null,
                  "template_name": "default",
                  "from": null,
                  "to": null,
                  "created_at": "2026-11-10T08:35:18Z",
                  "updated_at": "2026-11-10T08:35:18Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "cancel bulk job",
          "stop bulk print",
          "stop bulk send",
          "abort bulk action",
          "cancel bulk download",
          "halt bulk job"
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/bulk/print": {
      "post": {
        "operationId": "documents.bulk.print",
        "summary": "Print invoices in bulk",
        "description": "Starts a bulk PDF job for many invoices, as the Invoices page bulk print / download does: pick invoices by id or by the list filters, get one merged PDF (bundle) or a zip of single PDFs (separate). Returns 202 with a job id; poll GET /documents/bulk/:job_id for progress and the download link.\n\n**Note:** Asynchronous: only one bulk job may run per shop at a time (429 bulk_action_in_progress). Limited to 5,000 invoices. Free text search (q) is not supported here; use ids or date / status filters.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkPrint"
                },
                "example": {
                  "job_id": 12,
                  "status": "pending",
                  "count": 0,
                  "kind": "print"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the job was queued. Poll the returned job id for progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkPrint"
                },
                "example": {
                  "job_id": 12,
                  "status": "pending",
                  "count": 0,
                  "kind": "print"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "bulk print invoices",
          "download many invoices",
          "export invoices as pdf",
          "print all invoices",
          "zip of invoices",
          "print invoices for a date range",
          "download last month invoices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Invoice ids to include. Without ids the list filters below select the invoices."
                  },
                  "document_type": {
                    "enum": [
                      "invoice",
                      "quote",
                      "credit_note",
                      "pro_forma"
                    ],
                    "description": "Which documents when filtering: 'invoice' (default), 'quote', 'credit_note' or 'pro_forma'."
                  },
                  "link": {
                    "enum": [
                      "linked",
                      "not_linked",
                      "trashed"
                    ],
                    "description": "'linked' (created from a Shopify order), 'not_linked' (standalone) or 'trashed'."
                  },
                  "processing_type": {
                    "enum": [
                      "bundle",
                      "separate"
                    ],
                    "description": "'bundle' (one merged PDF, default) or 'separate' (zip of single PDFs)."
                  },
                  "delivery_method": {
                    "enum": [
                      "print",
                      "download"
                    ],
                    "description": "'download' (default) or 'print', as the dashboard distinguishes them."
                  },
                  "status": {
                    "description": "Shopify financial status of the order, one or many ('paid', 'pending').",
                    "type": "string"
                  },
                  "from": {
                    "description": "Created on or after this date (ISO 8601).",
                    "type": "string"
                  },
                  "to": {
                    "description": "Created on or before this date (ISO 8601).",
                    "type": "string"
                  },
                  "template_name": {
                    "description": "Template to render with (default 'default').",
                    "type": "string"
                  }
                }
              },
              "examples": {
                "ids": {
                  "summary": "One merged PDF of chosen invoices",
                  "value": {
                    "ids": [
                      48213,
                      48190,
                      48177
                    ]
                  }
                },
                "filter": {
                  "summary": "Zip of last month's paid invoices",
                  "value": {
                    "status": "paid",
                    "from": "2026-02-01",
                    "to": "2026-02-28",
                    "processing_type": "separate",
                    "template_name": "default"
                  }
                },
                "quotes": {
                  "summary": "Every quote not linked to an order",
                  "value": {
                    "document_type": "quote",
                    "link": "not_linked"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/bulk/send": {
      "post": {
        "operationId": "documents.bulk.send",
        "summary": "Send invoices in bulk",
        "description": "Emails many invoices to their customers in one job, as the Invoices page bulk send does: pick invoices by id, or by a created date range with optional status / link / document type. Returns 202 with a job id; GET /documents/bulk/:job_id reports which were sent.\n\n**Note:** Sends emails to customers as soon as the job runs; there is no confirmation step. Refused when the shop cannot send email (email_sending_disabled). Only one bulk job may run per shop at a time (429 bulk_action_in_progress). Filtering needs both from and to.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkPrint"
                },
                "example": {
                  "job_id": 10,
                  "status": "pending",
                  "count": 0,
                  "kind": "send"
                }
              }
            }
          },
          "202": {
            "description": "Accepted: the job was queued. Poll the returned job id for progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkPrint"
                },
                "example": {
                  "job_id": 10,
                  "status": "pending",
                  "count": 0,
                  "kind": "send"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "bulk send invoices",
          "email all unpaid invoices",
          "send invoices for a date range",
          "send many invoices",
          "email these invoices",
          "mass send invoices"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "Invoice ids to include. Without ids the list filters below select the invoices."
                  },
                  "document_type": {
                    "enum": [
                      "invoice",
                      "quote",
                      "credit_note",
                      "pro_forma"
                    ],
                    "description": "Which documents when filtering: 'invoice' (default), 'quote', 'credit_note' or 'pro_forma'."
                  },
                  "link": {
                    "enum": [
                      "linked",
                      "not_linked",
                      "trashed"
                    ],
                    "description": "'linked' (created from a Shopify order), 'not_linked' (standalone) or 'trashed'."
                  },
                  "status": {
                    "description": "Shopify financial status of the order, one or many ('paid', 'pending').",
                    "type": [
                      "string",
                      "array"
                    ],
                    "items": {
                      "type": "string"
                    }
                  },
                  "from": {
                    "description": "Created on or after this date (ISO 8601).",
                    "type": "string"
                  },
                  "to": {
                    "description": "Created on or before this date (ISO 8601).",
                    "type": "string"
                  }
                }
              },
              "examples": {
                "ids": {
                  "summary": "Email chosen invoices",
                  "value": {
                    "ids": [
                      48213,
                      48190
                    ]
                  }
                },
                "filter": {
                  "summary": "Email every pending invoice from March",
                  "value": {
                    "status": [
                      "pending",
                      "partially_paid"
                    ],
                    "from": "2026-03-01",
                    "to": "2026-03-31"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/credit_notes": {
      "post": {
        "operationId": "documents.credit_notes.create",
        "summary": "Create credit note",
        "description": "Raises a credit note for an invoice, as the order page does: a copy of the invoice with the next credit note number that credits the full invoice, then renders its PDF and returns it in full. If the invoice already has a credit note, that one is returned with already_existed: true. Partial credits are not supported; edit the credit note lines in the dashboard editor.\n\n**Note:** Creates a new numbered document and renders a PDF (counts against a free plan invoice limit). With send_email: true it also emails the credit note to the customer immediately.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The resource, when it already existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                },
                "example": {
                  "id": 980190966,
                  "document_type": "credit_note",
                  "invoice_number": "1",
                  "title": "Credit Note",
                  "order": null,
                  "customer": {
                    "id": 4,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:17Z",
                  "credited": {
                    "invoice_number": "#1001",
                    "invoice_id": 980190965,
                    "shopify_order_id": "gid://shopify/Order/12213474623569"
                  },
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2026-11-10T00:00:00Z",
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 473,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 474,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 475,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:17Z",
                  "refunds": [],
                  "already_existed": true
                }
              }
            }
          },
          "201": {
            "description": "Created: the new resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNote"
                },
                "example": {
                  "id": 980190966,
                  "document_type": "credit_note",
                  "invoice_number": "1",
                  "title": "Credit Note",
                  "order": null,
                  "customer": {
                    "id": 4,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:17Z",
                  "credited": {
                    "invoice_number": "#1001",
                    "invoice_id": 980190965,
                    "shopify_order_id": "gid://shopify/Order/12213474623569"
                  },
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2026-11-10T00:00:00Z",
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 473,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 474,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 475,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:17Z",
                  "refunds": [],
                  "already_existed": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "create credit note",
          "credit this invoice",
          "issue credit note",
          "refund invoice as credit note",
          "raise credit note for invoice",
          "new credit note",
          "cancel invoice with credit note"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invoice_id": {
                    "description": "The invoice to credit (its id from GET /documents/invoices).",
                    "type": "integer"
                  },
                  "send_email": {
                    "description": "true emails the credit note to the customer right after creating it (default false).",
                    "type": "boolean"
                  },
                  "generate_pdf": {
                    "description": "false skips rendering the PDF (default true).",
                    "type": "boolean"
                  },
                  "template_id": {
                    "description": "Template to render with. Default: the shop default credit note template.",
                    "type": "integer"
                  }
                },
                "required": [
                  "invoice_id"
                ]
              },
              "examples": {
                "plain": {
                  "summary": "Credit an invoice",
                  "value": {
                    "invoice_id": 48213
                  }
                },
                "email": {
                  "summary": "Credit an invoice and email the credit note",
                  "value": {
                    "invoice_id": 48213,
                    "send_email": true
                  }
                },
                "template": {
                  "summary": "Credit with a specific template, no PDF yet",
                  "value": {
                    "invoice_id": 48213,
                    "template_id": 313,
                    "generate_pdf": false
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "documents.credit_notes.list",
        "summary": "List credit notes",
        "description": "The credit notes the Credit notes tab lists, newest first, as list rows: credit note number, the invoice and Shopify order it credits, customer, total, and when it was sent or printed. q matches the credit note number and the credited invoice number. Read-only.\n\n`financial_status` values: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CreditNoteRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "id": 980191085,
                      "document_type": "credit_note",
                      "invoice_number": "1",
                      "title": "Credit Note",
                      "order": null,
                      "customer": {
                        "id": 49,
                        "name": "Customer 1",
                        "email": "cus1@gmail.com"
                      },
                      "financial_status": "paid",
                      "currency": "USD",
                      "total": "1100.22",
                      "issued_on": "2026-11-10",
                      "due_on": null,
                      "sent_at": null,
                      "printed_at": null,
                      "reminder_sent_at": null,
                      "paid": true,
                      "edited": false,
                      "trashed": false,
                      "e_invoice_status": null,
                      "created_at": "2026-11-10T09:56:58Z",
                      "credited": {
                        "invoice_number": "#1001",
                        "invoice_id": 980191084,
                        "shopify_order_id": "gid://shopify/Order/12213474623569"
                      }
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "list credit notes",
          "show credit notes",
          "find a credit note",
          "credit notes for an invoice",
          "refund documents",
          "credit notes this month"
        ],
        "x-value-labels": {
          "financial_status": {
            "pending": "Payment pending",
            "authorized": "Authorized",
            "partially_paid": "Partially paid",
            "paid": "Paid",
            "partially_refunded": "Partially refunded",
            "refunded": "Refunded",
            "voided": "Voided",
            "expired": "Expired",
            "cancelled": "Cancelled"
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "1-based page number."
            },
            "description": "1-based page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, default 25, max 100."
            },
            "description": "Rows per page, default 25, max 100."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Free text over the credit note number, the credited invoice number and the customer email."
            },
            "description": "Free text over the credit note number, the credited invoice number and the customer email."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Created on or after this date (ISO 8601).",
              "type": [
                "string",
                "object"
              ]
            },
            "description": "Created on or after this date (ISO 8601)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Created on or before this date (ISO 8601).",
              "type": "string"
            },
            "description": "Created on or before this date (ISO 8601)."
          }
        ]
      }
    },
    "/documents/credit_notes/{id}": {
      "delete": {
        "operationId": "documents.credit_notes.delete",
        "summary": "Delete credit note",
        "description": "Deletes a credit note permanently, as the dashboard does. The credited invoice is untouched and a new credit note can be raised for it afterwards. (An invoice created by mistake has its own permanent delete: DELETE /documents/invoices/:id/permanent.)\n\n**Note:** Permanent: the document, its PDF and its history are removed. Cannot be undone. Send it first without `confirm`: nothing changes and the 409 `confirmation_required` says what would. Tell the merchant, ask, and resend with `confirm: true` (`?confirm=true` on a DELETE) only after they agree.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteDelete"
                },
                "example": {
                  "id": 980190964,
                  "deleted": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "delete credit note",
          "remove credit note",
          "discard credit note",
          "undo credit note",
          "cancel credit note",
          "erase credit note"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Send true only after the merchant agreed. Without it nothing is deleted and the 409 says what would be.",
              "type": "boolean"
            },
            "description": "Send true only after the merchant agreed. Without it nothing is deleted and the 409 says what would be."
          }
        ]
      },
      "get": {
        "operationId": "documents.credit_notes.read",
        "summary": "Read credit note",
        "description": "One credit note in full: the invoice shape (numbers, dates, totals, customer, addresses, line items, PDF availability) plus the credited invoice and Shopify order, and the Shopify refunds on that order with their reason and lines. 404 for an id that is not a credit note. Read-only.\n\n`financial_status` values: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled).\n\n`e_invoice_status` values: `generated` (E-invoice embedded in the PDF), `fallback` (Standard PDF (e-invoice could not be built)).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteRead"
                },
                "example": {
                  "id": 980191077,
                  "document_type": "credit_note",
                  "invoice_number": "1",
                  "title": "Credit Note",
                  "order": null,
                  "customer": {
                    "id": 47,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T09:56:58Z",
                  "credited": {
                    "invoice_number": "#1001",
                    "invoice_id": 980191076,
                    "shopify_order_id": "gid://shopify/Order/12213474623569"
                  },
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2026-11-10T00:00:00Z",
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 575,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 576,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 577,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T09:56:58Z",
                  "refunds": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show credit note",
          "credit note details",
          "open credit note",
          "which invoice does this credit note credit",
          "credit note pdf link",
          "refund lines on a credit note"
        ],
        "x-value-labels": {
          "financial_status": {
            "pending": "Payment pending",
            "authorized": "Authorized",
            "partially_paid": "Partially paid",
            "paid": "Paid",
            "partially_refunded": "Partially refunded",
            "refunded": "Refunded",
            "voided": "Voided",
            "expired": "Expired",
            "cancelled": "Cancelled"
          },
          "e_invoice_status": {
            "generated": "E-invoice embedded in the PDF",
            "fallback": "Standard PDF (e-invoice could not be built)"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/credit_notes/{id}/pdf": {
      "post": {
        "operationId": "documents.credit_notes.print",
        "summary": "Print credit note",
        "description": "Renders the credit note PDF (or reuses the stored one when nothing changed) and returns a signed download URL valid for one week, the file name and when it was generated.\n\n**Note:** Rendering a new PDF counts against a free plan invoice limit.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNotePrint"
                },
                "example": {
                  "id": 980190964,
                  "url": null,
                  "filename": null,
                  "generated_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "download credit note pdf",
          "get credit note pdf",
          "print credit note",
          "regenerate credit note pdf",
          "credit note pdf link",
          "render credit note"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regenerate": {
                    "description": "true renders the PDF again even when the stored one is current (default false).",
                    "type": "boolean"
                  },
                  "template_id": {
                    "description": "Template to render with. Default: the shop default for this document type.",
                    "type": "integer"
                  }
                }
              },
              "examples": {
                "stored": {
                  "summary": "Get the stored PDF",
                  "value": {}
                },
                "regenerate": {
                  "summary": "Render the PDF again with another template",
                  "value": {
                    "regenerate": true,
                    "template_id": 313
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/credit_notes/{id}/send": {
      "post": {
        "operationId": "documents.credit_notes.send",
        "summary": "Send credit note",
        "description": "Emails a credit note to the customer through the shop sender, as the Send button does: renders the PDF when needed, attaches it, records the send and returns the credit note in full. Recipient, cc, subject and message can be overridden for this one email.\n\n**Note:** Sends an email to the customer immediately. Refused when the shop cannot send email (code email_sending_disabled).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreditNoteRead"
                },
                "example": {
                  "id": 980190964,
                  "document_type": "credit_note",
                  "invoice_number": "1",
                  "title": "Credit Note",
                  "order": null,
                  "customer": {
                    "id": 3,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:16Z",
                  "credited": {
                    "invoice_number": "#1001",
                    "invoice_id": 980190963,
                    "shopify_order_id": "gid://shopify/Order/12213474623569"
                  },
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2026-11-10T00:00:00Z",
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 467,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 468,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 469,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:16Z",
                  "refunds": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "send credit note",
          "email credit note",
          "email the credit note to the customer",
          "resend credit note",
          "send credit note to another address",
          "mail the credit note"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "description": "Recipient email address. Default: the email on the order.",
                    "type": "string"
                  },
                  "cc": {
                    "description": "Extra recipient copied on the email.",
                    "type": "string"
                  },
                  "subject": {
                    "description": "Email subject. Default: the subject configured for this document type.",
                    "type": "string"
                  },
                  "message": {
                    "description": "Email body. Default: the email text configured for this document type.",
                    "type": "string"
                  },
                  "template_id": {
                    "description": "Template to render the PDF with. Default: the shop default for this document type.",
                    "type": "integer"
                  }
                }
              },
              "examples": {
                "default": {
                  "summary": "Send to the customer's email",
                  "value": {}
                },
                "custom": {
                  "summary": "Send with a CC and your own subject",
                  "value": {
                    "to": "jane.doe@example.com",
                    "cc": "accounts@example.com",
                    "subject": "Credit note for order #1001",
                    "message": "Your refund has been processed.",
                    "template_id": 313
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/invoices": {
      "post": {
        "operationId": "documents.invoices.create",
        "summary": "Create invoice",
        "description": "Creates the invoice for a Shopify order the way the order page does: reads the order from Shopify, builds the invoice with its line items, taxes and addresses, renders the PDF and returns the full invoice. If the shop already has an invoice for that order (most are created by the order webhook) that invoice is returned with already_existed: true instead of a duplicate.\n\n**Note:** Renders a PDF, which counts against a free plan invoice limit. With send_email: true it also emails the invoice to the customer immediately. An order placed before the store's invoicing start date (account/documents → dates.invoicing_start_date) is refused with 422 before_invoicing_start_date unless ignore_start_date is true; confirm with the merchant first.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The resource, when it already existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "example": {
                  "id": 980190995,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/424242",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 19,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:20Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 518,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 519,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 520,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:20Z",
                  "already_existed": true
                }
              }
            }
          },
          "201": {
            "description": "Created: the new resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "example": {
                  "id": 980190995,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/424242",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 19,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:20Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 518,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 519,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 520,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:20Z",
                  "already_existed": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "create invoice",
          "invoice this order",
          "generate invoice for order",
          "make an invoice",
          "new invoice",
          "invoice order #1001",
          "issue invoice"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_id": {
                    "description": "The Shopify order: a gid (gid://shopify/Order/123), a bare id, or the order name ('#1001').",
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "send_email": {
                    "description": "true emails the invoice to the order customer right after creating it (default false).",
                    "type": "boolean"
                  },
                  "generate_pdf": {
                    "description": "false skips rendering the PDF (default true).",
                    "type": "boolean"
                  },
                  "template_id": {
                    "description": "Template to render with. Default: the shop default invoice template.",
                    "type": "integer"
                  },
                  "ignore_start_date": {
                    "description": "true creates the invoice even though the order was placed before the invoicing start date (default false).",
                    "type": "boolean"
                  }
                },
                "required": [
                  "order_id"
                ]
              },
              "examples": {
                "by_name": {
                  "summary": "Invoice an order by its name",
                  "value": {
                    "order_id": "#1001"
                  }
                },
                "email": {
                  "summary": "Create and email the invoice",
                  "value": {
                    "order_id": "gid://shopify/Order/5873241604411",
                    "send_email": true
                  }
                },
                "no_pdf": {
                  "summary": "Create without rendering the PDF",
                  "value": {
                    "order_id": 5873241604411,
                    "generate_pdf": false
                  }
                },
                "template": {
                  "summary": "Create with a specific template",
                  "value": {
                    "order_id": "#1001",
                    "template_id": 311
                  }
                },
                "before_start_date": {
                  "summary": "Invoice an order placed before the invoicing start date, after the merchant confirmed",
                  "value": {
                    "order_id": "#1001",
                    "ignore_start_date": true
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "documents.invoices.list",
        "summary": "List invoices",
        "description": "The invoices the V3 Invoices page lists, newest first, as list rows (number, order, customer, financial status, total, sent / printed / reminder timestamps). Invoices only by default; pass document_type to list quotes, credit notes or pro forma invoices from the same table. Trashed invoices are left out unless link=trashed. Read-only.\n\n`document_type` values: `invoice` (Invoice), `quote` (Quote), `credit_note` (Credit note), `pro_forma` (Pro forma invoice), `custom` (Custom invoice).\n\n`financial_status` values: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled).\n\n`link` values: `linked` (Created from a Shopify order), `not_linked` (Standalone (no Shopify order)), `trashed` (In the trash).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "id": 980191068,
                      "document_type": "invoice",
                      "invoice_number": "#1001",
                      "title": "Invoice",
                      "order": {
                        "shopify_order_id": "gid://shopify/Order/12213474623569",
                        "name": "#1001",
                        "number": 1001
                      },
                      "customer": {
                        "id": 43,
                        "name": "Customer 1",
                        "email": "cus1@gmail.com"
                      },
                      "financial_status": "paid",
                      "currency": "USD",
                      "total": "1100.22",
                      "issued_on": "2025-12-11",
                      "due_on": null,
                      "sent_at": null,
                      "printed_at": null,
                      "reminder_sent_at": null,
                      "paid": true,
                      "edited": false,
                      "trashed": true,
                      "e_invoice_status": null,
                      "created_at": "2026-11-10T09:41:43Z"
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "list invoices",
          "show my invoices",
          "find an invoice",
          "search invoices",
          "unpaid invoices",
          "invoices for an order",
          "invoices from last month",
          "trashed invoices"
        ],
        "x-value-labels": {
          "document_type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "credit_note": "Credit note",
            "pro_forma": "Pro forma invoice",
            "custom": "Custom invoice"
          },
          "financial_status": {
            "pending": "Payment pending",
            "authorized": "Authorized",
            "partially_paid": "Partially paid",
            "paid": "Paid",
            "partially_refunded": "Partially refunded",
            "refunded": "Refunded",
            "voided": "Voided",
            "expired": "Expired",
            "cancelled": "Cancelled"
          },
          "link": {
            "linked": "Created from a Shopify order",
            "not_linked": "Standalone (no Shopify order)",
            "trashed": "In the trash"
          }
        },
        "parameters": [
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "invoice",
                "quote",
                "credit_note",
                "pro_forma",
                "custom"
              ],
              "description": "Which documents: 'invoice' (default), 'quote', 'credit_note', 'pro_forma', 'custom'. One of: `invoice` (Invoice), `quote` (Quote), `credit_note` (Credit note), `pro_forma` (Pro forma invoice), `custom` (Custom invoice)."
            },
            "description": "Which documents: 'invoice' (default), 'quote', 'credit_note', 'pro_forma', 'custom'. One of: `invoice` (Invoice), `quote` (Quote), `credit_note` (Credit note), `pro_forma` (Pro forma invoice), `custom` (Custom invoice)."
          },
          {
            "name": "link",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "linked",
                "not_linked",
                "trashed"
              ],
              "description": "'linked' (created from a Shopify order), 'not_linked' (standalone) or 'trashed'. One of: `linked` (Created from a Shopify order), `not_linked` (Standalone (no Shopify order)), `trashed` (In the trash)."
            },
            "description": "'linked' (created from a Shopify order), 'not_linked' (standalone) or 'trashed'. One of: `linked` (Created from a Shopify order), `not_linked` (Standalone (no Shopify order)), `trashed` (In the trash)."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "created_at desc",
                "created_at asc"
              ],
              "description": "'created_at desc' (default) or 'created_at asc'."
            },
            "description": "'created_at desc' (default) or 'created_at asc'."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "1-based page number."
            },
            "description": "1-based page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, default 25, max 100."
            },
            "description": "Rows per page, default 25, max 100."
          },
          {
            "name": "financial_status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Shopify financial status of the order, one or many ('paid', 'pending,partially_paid'). One of: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled).",
              "enum": [
                "pending",
                "authorized",
                "partially_paid",
                "paid",
                "partially_refunded",
                "refunded",
                "voided",
                "expired",
                "cancelled"
              ]
            },
            "description": "Shopify financial status of the order, one or many ('paid', 'pending,partially_paid'). One of: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Created on or after this date (ISO 8601).",
              "type": [
                "string",
                "object"
              ]
            },
            "description": "Created on or after this date (ISO 8601)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Created on or before this date (ISO 8601).",
              "type": "string"
            },
            "description": "Created on or before this date (ISO 8601)."
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The Shopify order, as a gid (gid://shopify/Order/123) or a bare number.",
              "type": [
                "string",
                "integer"
              ]
            },
            "description": "The Shopify order, as a gid (gid://shopify/Order/123) or a bare number."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Free text over invoice number, order name, customer name and email."
            },
            "description": "Free text over invoice number, order name, customer name and email."
          }
        ]
      }
    },
    "/documents/invoices/{id}": {
      "delete": {
        "operationId": "documents.invoices.delete",
        "summary": "Delete invoice",
        "description": "Moves an invoice to the trash, as the Invoices page does: it leaves the lists, keeps its number and PDF, and can be restored. Nothing is deleted permanently and Shopify is not touched.\n\n**Note:** Reversible with POST /documents/invoices/:id/restore. Trashed invoices are still returned by GET /documents/invoices?link=trashed. Trashing does not free the invoice number: opening the order shows the same invoice again. To free a number taken by mistake, use DELETE /documents/invoices/:id/permanent.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDelete"
                },
                "example": {
                  "id": 980190991,
                  "trashed": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "trash invoice",
          "delete invoice",
          "remove invoice",
          "move invoice to trash",
          "hide invoice",
          "discard invoice"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "operationId": "documents.invoices.read",
        "summary": "Read invoice",
        "description": "One document in full, as the order page and the invoice editor show it: numbers, dates, financial status, totals in the document currency, customer, billing and shipping addresses, line items with tax and discount, shipping and tax lines, notes, the Shopify order link, whether a PDF is stored (with a one-week signed URL) and the e-invoice state. Any document type the shop issued can be read here; document_type says which. Read-only: it never generates or regenerates the PDF.\n\n`document_type` values: `invoice` (Invoice), `quote` (Quote), `credit_note` (Credit note), `pro_forma` (Pro forma invoice), `custom` (Custom invoice).\n\n`financial_status` values: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled).\n\n`fulfillment_status` values: `fulfilled` (Fulfilled), `partial` (Partially fulfilled), `unfulfilled` (Unfulfilled), `restocked` (Restocked).\n\n`e_invoice_status` values: `generated` (E-invoice embedded in the PDF), `fallback` (Standard PDF (e-invoice could not be built)).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceRead"
                },
                "example": {
                  "id": 980191062,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/12213474623569",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 40,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T09:41:42Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 551,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 552,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 553,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T09:41:42Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show invoice",
          "invoice details",
          "open invoice",
          "what is on this invoice",
          "invoice totals",
          "invoice line items",
          "invoice pdf link"
        ],
        "x-value-labels": {
          "document_type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "credit_note": "Credit note",
            "pro_forma": "Pro forma invoice",
            "custom": "Custom invoice"
          },
          "financial_status": {
            "pending": "Payment pending",
            "authorized": "Authorized",
            "partially_paid": "Partially paid",
            "paid": "Paid",
            "partially_refunded": "Partially refunded",
            "refunded": "Refunded",
            "voided": "Voided",
            "expired": "Expired",
            "cancelled": "Cancelled"
          },
          "fulfillment_status": {
            "fulfilled": "Fulfilled",
            "partial": "Partially fulfilled",
            "unfulfilled": "Unfulfilled",
            "restocked": "Restocked"
          },
          "e_invoice_status": {
            "generated": "E-invoice embedded in the PDF",
            "fallback": "Standard PDF (e-invoice could not be built)"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "documents.invoices.update",
        "summary": "Update invoice",
        "description": "Edits the fields of one invoice the invoice editor lets a merchant change: document number, issue, due, tax and fulfilment dates, PO number, payment terms, the order note, the footer note and up to four custom fields. Only the keys sent change; returns the full invoice.\n\n**Note:** Marks the invoice edited, so a Shopify resync no longer overwrites it until it is regenerated. Allowed even when the shop locks issued invoices: the lock stops Shopify resyncs, not merchant edits. The stored PDF is re-rendered on the next download or send.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceRead"
                },
                "example": {
                  "id": 980190979,
                  "document_type": "invoice",
                  "invoice_number": "INV-77",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/12213474623569",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 11,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": "2026-03-01",
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:18Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": "2026-03-01",
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": "PO-9",
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 494,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 495,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 496,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": "Thanks",
                    "note_attributes": []
                  },
                  "custom_fields": [
                    {
                      "title": "Ref",
                      "body": "X1"
                    }
                  ],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:18Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "edit invoice",
          "change invoice due date",
          "change invoice number",
          "add note to invoice",
          "set po number on invoice",
          "update invoice fields",
          "change invoice date",
          "edit custom fields"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "invoice_number": {
                    "type": "string",
                    "description": "Document number shown on the invoice."
                  },
                  "issued_on": {
                    "type": "string",
                    "format": "date",
                    "description": "Invoice date (YYYY-MM-DD)."
                  },
                  "due_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Due date; null or \"\" clears it."
                  },
                  "tax_date": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Tax point date; null clears it."
                  },
                  "fulfilled_on": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "description": "Fulfilment date; null clears it."
                  },
                  "po_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Purchase order number; null clears it."
                  },
                  "payment_terms": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Payment terms text; null clears it."
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Order note printed on the invoice; null clears it."
                  },
                  "custom_note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Footer note for this invoice; null clears it."
                  },
                  "custom_fields": {
                    "type": "array",
                    "description": "Up to 4 {title, body} pairs; replaces the existing set, [] clears them."
                  }
                }
              },
              "example": {
                "invoice_number": "INV-77",
                "due_on": "2026-03-01",
                "po_number": "PO-9",
                "custom_note": "Thanks",
                "custom_fields": [
                  {
                    "title": "Ref",
                    "body": "X1"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/documents/invoices/{id}/history": {
      "get": {
        "operationId": "documents.invoices.history",
        "summary": "Invoice history",
        "description": "What happened to a document: every time it was emailed (to which address, whether that is the customer's, and whether it was automatic, a payment reminder, a bulk send or a BCC copy), printed, downloaded or opened, newest first, plus the emails sent for it with the recipient and the delivery, open, click and bounce timestamps the mail provider reported. The last 200 of each. Read-only.\n\n`event` values: `sent` (Emailed to the customer), `reminder_sent` (Payment reminder emailed), `copy_sent` (Copy emailed to the shop (BCC)), `printed` (Printed), `downloaded` (Downloaded), `viewed` (Opened in the dashboard), `rendered` (Rendered on the customer account page).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceHistory"
                },
                "example": {
                  "invoice_id": 980191021,
                  "invoice_number": "INV-2",
                  "customer_email": null,
                  "events": [
                    {
                      "id": 46,
                      "event": "sent",
                      "at": "2026-11-10T09:07:40Z",
                      "automatic": false,
                      "bulk": false,
                      "template": "default",
                      "to": "test@example.com"
                    }
                  ],
                  "emails": [
                    {
                      "id": 5,
                      "to": "test@example.com",
                      "kind": "invoice",
                      "sent_at": "2026-11-10T09:07:40Z",
                      "delivered_at": null,
                      "opened_at": null,
                      "clicked_at": null,
                      "bounced_at": null,
                      "bounce_reason": null,
                      "rejected_at": null,
                      "complained_at": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "invoice history",
          "was this invoice sent",
          "when was the invoice emailed",
          "invoice activity",
          "did the customer open the invoice",
          "did the invoice bounce",
          "who received this invoice"
        ],
        "x-value-labels": {
          "event": {
            "sent": "Emailed to the customer",
            "reminder_sent": "Payment reminder emailed",
            "copy_sent": "Copy emailed to the shop (BCC)",
            "printed": "Printed",
            "downloaded": "Downloaded",
            "viewed": "Opened in the dashboard",
            "rendered": "Rendered on the customer account page"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/invoices/{id}/mark_paid": {
      "post": {
        "operationId": "documents.invoices.mark_paid",
        "summary": "Mark invoice paid",
        "description": "Marks an invoice paid on the document: sets its financial status to paid and the paid-at time, the same field edit the invoice editor saves. Payment reminders stop for it. Shopify is not told; the order itself keeps its own payment state.\n\n**Note:** Changes the invoice document only (it is marked edited, so a Shopify resync no longer overwrites it). Does not record a payment in Shopify. Calling it on an invoice that is already paid changes nothing and returns the invoice as it is.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceRead"
                },
                "example": {
                  "id": 980191007,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/12213474623569",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 25,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:22Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 536,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 537,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 538,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "mark invoice paid",
          "mark as paid",
          "invoice was paid",
          "record payment on invoice",
          "set invoice paid",
          "customer paid this invoice"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "paid_at": {
                    "description": "When it was paid (ISO 8601). Default: now.",
                    "type": "string"
                  }
                }
              },
              "examples": {
                "now": {
                  "summary": "Mark paid now",
                  "value": {}
                },
                "date": {
                  "summary": "Mark paid on a past date",
                  "value": {
                    "paid_at": "2026-03-14T10:30:00Z"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/invoices/{id}/mark_unpaid": {
      "post": {
        "operationId": "documents.invoices.mark_unpaid",
        "summary": "Mark invoice unpaid",
        "description": "Reverts a paid mark: sets the invoice financial status back to pending and clears the paid-at time, the same field edit the invoice editor saves. Shopify is not told.\n\n**Note:** Changes the invoice document only; payment reminders resume if enabled. Calling it on an invoice that is not marked paid changes nothing and returns the invoice as it is.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceRead"
                },
                "example": {
                  "id": 980191007,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/12213474623569",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 25,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "pending",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": false,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:22Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 536,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 537,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 538,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "mark invoice unpaid",
          "mark as unpaid",
          "undo mark paid",
          "invoice not paid after all",
          "set invoice pending",
          "reopen invoice"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/invoices/{id}/pdf": {
      "post": {
        "operationId": "documents.invoices.print",
        "summary": "Print invoice",
        "description": "Renders the invoice PDF (or reuses the stored one when nothing changed) and returns a signed download URL valid for one week, the file name and when it was generated. Records a download in the invoice history. To only get the link, read the invoice instead (`pdf.url`); use this for a fresh render or when no PDF is stored yet.\n\n**Note:** Rendering a new PDF counts against a free plan invoice limit; reusing a stored one does not. To only get the link, read GET /documents/invoices/:id first: `pdf.url` is the signed link whenever `pdf.available` is true. Call this when it is false or the merchant wants a fresh render.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoicePrint"
                },
                "example": {
                  "id": 980191015,
                  "url": null,
                  "filename": null,
                  "generated_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "download invoice pdf",
          "get invoice pdf",
          "print invoice",
          "regenerate invoice pdf",
          "invoice pdf link",
          "render invoice"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regenerate": {
                    "description": "true renders the PDF again even when the stored one is current (default false).",
                    "type": "boolean"
                  },
                  "template_id": {
                    "description": "Template to render with. Default: the shop default for this document type.",
                    "type": "integer"
                  }
                }
              },
              "examples": {
                "stored": {
                  "summary": "Get the stored PDF",
                  "value": {}
                },
                "regenerate": {
                  "summary": "Render the PDF again with another template",
                  "value": {
                    "regenerate": true,
                    "template_id": 311
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/invoices/{id}/permanent": {
      "delete": {
        "operationId": "documents.invoices.destroy",
        "summary": "Destroy invoice",
        "description": "Deletes an invoice permanently so its number can be used again. For an invoice created by mistake (an order opened by accident) that was never emailed. When the invoice holds the latest sequential number, `rewind_counter: true` also sets the template's next invoice number back to it. Refused for an invoice that was emailed, has a credit note or has an e-invoice: raise a credit note for those instead. Paid plans only.\n\n**Note:** Permanent: the document, its PDF and its history are removed. Cannot be undone. Opening the order again creates a new invoice. Send it first without `confirm`: nothing changes and the 409 `confirmation_required` says what would, including whether the counter can be rewound. Tell the merchant, ask, and resend with `confirm: true` (`?confirm=true` on a DELETE) only after they agree. To hide an invoice without freeing its number, trash it instead (DELETE /documents/invoices/:id).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceDestroy"
                },
                "example": {
                  "id": 980191001,
                  "number": "A26-1",
                  "deleted": true,
                  "next_invoice_number": "1"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "delete invoice permanently",
          "permanently delete invoice",
          "erase invoice",
          "free up invoice number",
          "reuse invoice number",
          "undo invoice",
          "remove accidental invoice",
          "delete invoice and reset numbering"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Send true only after the merchant agreed. Without it nothing is deleted and the 409 says what would be.",
              "type": "boolean"
            },
            "description": "Send true only after the merchant agreed. Without it nothing is deleted and the 409 says what would be."
          },
          {
            "name": "rewind_counter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "true also sets the numbering template's next invoice number back to this invoice's number. Only honoured when the invoice holds the latest number; otherwise rewinding would hand that number out twice."
            },
            "description": "true also sets the numbering template's next invoice number back to this invoice's number. Only honoured when the invoice holds the latest number; otherwise rewinding would hand that number out twice."
          }
        ]
      }
    },
    "/documents/invoices/{id}/restore": {
      "post": {
        "operationId": "documents.invoices.restore",
        "summary": "Restore invoice",
        "description": "Takes an invoice out of the trash so it shows in the lists again. Returns the full invoice; a no-op for an invoice that is not trashed.\n\n**Note:** Changes the trashed flag only.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceRead"
                },
                "example": {
                  "id": 980190991,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/12213474623569",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 17,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:20Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 512,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 513,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 514,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:20Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "restore invoice",
          "untrash invoice",
          "recover deleted invoice",
          "bring back invoice",
          "undo delete invoice",
          "restore from trash"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/invoices/{id}/send": {
      "post": {
        "operationId": "documents.invoices.send",
        "summary": "Send invoice",
        "description": "Emails an invoice to its customer through the shop sender, exactly as the Send button does: renders the PDF when needed, attaches it, records the send in the invoice history and returns the full invoice. Recipient, cc, subject and message can be overridden for this one email.\n\n**Note:** Sends an email to the customer immediately. Refused when the shop cannot send email (code email_sending_disabled) or the order has no email address.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceRead"
                },
                "example": {
                  "id": 980190993,
                  "document_type": "invoice",
                  "invoice_number": "#1001",
                  "title": "Invoice",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/12213474623569",
                    "name": "#1001",
                    "number": 1001
                  },
                  "customer": {
                    "id": 18,
                    "name": "Customer 1",
                    "email": "cus1@gmail.com",
                    "shopify_customer_id": "gid://shopify/Customer/23935678808145",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": "paid",
                  "currency": "USD",
                  "total": "1100.22",
                  "issued_on": "2025-12-11",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": true,
                  "edited": false,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:20Z",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": "2025-12-11T00:00:00Z",
                    "issued_on": "2025-12-11",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": "manual",
                  "locale": "en",
                  "totals": {
                    "currency": "USD",
                    "taxes_included": false,
                    "subtotal": "1497.95",
                    "discounts": "494.32",
                    "shipping": "6.90",
                    "tax": "89.69",
                    "duties": "0.00",
                    "total": "1100.22",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": null,
                    "address2": null,
                    "city": null,
                    "province": null,
                    "zip": null,
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "shipping_address": {
                    "name": "Customer 1",
                    "first_name": "Customer",
                    "last_name": "1",
                    "company": null,
                    "address1": "New York",
                    "address2": null,
                    "city": "New York",
                    "province": "New York",
                    "zip": "10004",
                    "country": "United States",
                    "country_code": "US",
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null
                  },
                  "line_items": [
                    {
                      "id": 515,
                      "title": "The Videographer Snowboard",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "885.95",
                      "discount": "0.00",
                      "discounted_unit_price": "885.95",
                      "total_discount": "0.00",
                      "tax": "78.63",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "885.95",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 516,
                      "title": "Custom 1",
                      "variant_title": null,
                      "sku": null,
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "12.00",
                      "discount": "0.00",
                      "discounted_unit_price": "12.00",
                      "total_discount": "0.00",
                      "tax": "1.07",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "12.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    },
                    {
                      "id": 517,
                      "title": "The Collection Snowboard: Hydrogen",
                      "variant_title": null,
                      "sku": "9506.11.21",
                      "barcode": null,
                      "product_type": null,
                      "quantity": 1,
                      "unit_price": "600.00",
                      "discount": "0.00",
                      "discounted_unit_price": "600.00",
                      "total_discount": "0.00",
                      "tax": "53.25",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375"
                        }
                      ],
                      "total": "600.00",
                      "refunded_quantity": 0,
                      "image_url": null,
                      "properties": [],
                      "note": null
                    }
                  ],
                  "shipping_lines": [
                    {
                      "title": "Standard",
                      "price": "6.90",
                      "discount": "0.00",
                      "tax": "0.62",
                      "tax_lines": [
                        {
                          "title": "New York State Tax",
                          "rate": "4.0",
                          "amount": "0.28"
                        },
                        {
                          "title": "New York City City Tax",
                          "rate": "4.5",
                          "amount": "0.31"
                        },
                        {
                          "title": "Metropolitan Commuter Transportation District",
                          "rate": "0.375",
                          "amount": "0.03"
                        }
                      ]
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "New York State Tax",
                      "rate": "4.0",
                      "amount": "40.42"
                    },
                    {
                      "title": "New York City City Tax",
                      "rate": "4.5",
                      "amount": "45.47"
                    },
                    {
                      "title": "Metropolitan Commuter Transportation District",
                      "rate": "0.375",
                      "amount": "3.80"
                    }
                  ],
                  "discount_codes": [
                    "Order discount in percentage"
                  ],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:20Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "send invoice",
          "email invoice",
          "email this invoice to the customer",
          "resend invoice",
          "send invoice to another address",
          "mail the invoice"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "description": "Recipient email address. Default: the email on the order.",
                    "type": "string"
                  },
                  "cc": {
                    "description": "Extra recipient copied on the email.",
                    "type": "string"
                  },
                  "subject": {
                    "description": "Email subject. Default: the subject configured for this document type.",
                    "type": "string"
                  },
                  "message": {
                    "description": "Email body. Default: the email text configured for this document type.",
                    "type": "string"
                  },
                  "template_id": {
                    "description": "Template to render the PDF with. Default: the shop default for this document type.",
                    "type": "integer"
                  }
                }
              },
              "examples": {
                "default": {
                  "summary": "Send to the order's email",
                  "value": {}
                },
                "custom": {
                  "summary": "Send to another address with your own message",
                  "value": {
                    "to": "accounts@example.com",
                    "cc": "jane.doe@example.com",
                    "subject": "Invoice #1001 from Example Store",
                    "message": "Hi, your invoice is attached. Thanks for your order!",
                    "template_id": 311
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/packing_slips/{invoice_id}": {
      "get": {
        "operationId": "documents.packing_slips.read",
        "summary": "Read packing slip",
        "description": "Whether a packing slip PDF is stored for an invoice, and a one-week signed URL to it when it is. A packing slip is the invoice rendered through a packing-slip template; it exists only after it was printed or downloaded once. Read-only: it never renders the PDF.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackingSlip"
                },
                "example": {
                  "invoice_id": 980191049,
                  "invoice_number": "INV-42",
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/42",
                    "name": "#1042",
                    "number": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "packing slip for invoice",
          "packing slip pdf",
          "is there a packing slip",
          "download packing slip",
          "delivery note for order"
        ],
        "parameters": [
          {
            "name": "invoice_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/quotes": {
      "post": {
        "operationId": "documents.quotes.create",
        "summary": "Create quote",
        "description": "Creates the quote for a Shopify draft order the way the Quotes page does: reads the draft order from Shopify, builds the quote with its line items and addresses (and the payment link when the draft has an invoice URL), renders the PDF and returns the full quote. If the shop already has a quote for that draft order it is returned with already_existed: true.\n\n**Note:** Renders a PDF, which counts against a free plan invoice limit. With send_email: true it also emails the quote to the customer immediately.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The resource, when it already existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                },
                "example": {
                  "id": 980191017,
                  "document_type": "quote",
                  "invoice_number": "Q-1001",
                  "title": "Quote",
                  "order": {
                    "shopify_order_id": "gid://shopify/DraftOrder/555",
                    "name": "#D1001",
                    "number": null
                  },
                  "customer": {
                    "id": null,
                    "name": null,
                    "email": "quote@example.com",
                    "shopify_customer_id": null,
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": null,
                  "currency": "EUR",
                  "total": "50.00",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": false,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:25Z",
                  "shopify_draft_order_id": "gid://shopify/DraftOrder/555",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": null,
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": null,
                  "locale": null,
                  "totals": {
                    "currency": "EUR",
                    "taxes_included": null,
                    "subtotal": "0.00",
                    "discounts": "0.00",
                    "shipping": "0.00",
                    "tax": "0.00",
                    "duties": "0.00",
                    "total": "0.00",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": null,
                  "shipping_address": null,
                  "line_items": [],
                  "shipping_lines": [],
                  "tax_lines": [],
                  "discount_codes": [],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:25Z",
                  "payment_url": "https://shop.example/pay/abc",
                  "already_existed": true
                }
              }
            }
          },
          "201": {
            "description": "Created: the new resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                },
                "example": {
                  "id": 980191017,
                  "document_type": "quote",
                  "invoice_number": "Q-1001",
                  "title": "Quote",
                  "order": {
                    "shopify_order_id": "gid://shopify/DraftOrder/555",
                    "name": "#D1001",
                    "number": null
                  },
                  "customer": {
                    "id": null,
                    "name": null,
                    "email": "quote@example.com",
                    "shopify_customer_id": null,
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": null,
                  "currency": "EUR",
                  "total": "50.00",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": false,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:25Z",
                  "shopify_draft_order_id": "gid://shopify/DraftOrder/555",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": null,
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": null,
                  "locale": null,
                  "totals": {
                    "currency": "EUR",
                    "taxes_included": null,
                    "subtotal": "0.00",
                    "discounts": "0.00",
                    "shipping": "0.00",
                    "tax": "0.00",
                    "duties": "0.00",
                    "total": "0.00",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": null,
                  "shipping_address": null,
                  "line_items": [],
                  "shipping_lines": [],
                  "tax_lines": [],
                  "discount_codes": [],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:25Z",
                  "payment_url": "https://shop.example/pay/abc",
                  "already_existed": false
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "create quote",
          "quote this draft order",
          "generate quote",
          "make a quote",
          "new quote",
          "quote for draft order",
          "send quote for draft"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "draft_order_id": {
                    "description": "The Shopify draft order: a gid (gid://shopify/DraftOrder/123), a bare id, or its name ('#D1').",
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "send_email": {
                    "description": "true emails the quote to the draft order customer right after creating it (default false).",
                    "type": "boolean"
                  },
                  "generate_pdf": {
                    "description": "false skips rendering the PDF (default true).",
                    "type": "boolean"
                  },
                  "template_id": {
                    "description": "Template to render with. Default: the shop default quote template.",
                    "type": "integer"
                  }
                },
                "required": [
                  "draft_order_id"
                ]
              },
              "examples": {
                "by_name": {
                  "summary": "Quote a draft order by its name",
                  "value": {
                    "draft_order_id": "#D12"
                  }
                },
                "email": {
                  "summary": "Create and email the quote",
                  "value": {
                    "draft_order_id": "gid://shopify/DraftOrder/1146789216411",
                    "send_email": true
                  }
                },
                "template": {
                  "summary": "Create with a specific template",
                  "value": {
                    "draft_order_id": "#D12",
                    "template_id": 312,
                    "generate_pdf": true
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "documents.quotes.list",
        "summary": "List quotes",
        "description": "The quotes the Draft orders page knows about: invoices raised from Shopify draft orders, newest first, as list rows. A quote is the same record as an invoice with document_type 'quote', so the rows read like invoice rows plus the draft order gid. Trashed quotes are left out unless link=trashed. Read-only.\n\n`document_type` values: `invoice` (Invoice), `quote` (Quote), `credit_note` (Credit note), `pro_forma` (Pro forma invoice), `custom` (Custom invoice).\n\n`link` values: `linked` (Created from a Shopify order), `not_linked` (Standalone (no Shopify order)), `trashed` (In the trash).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuoteRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "id": 980191056,
                      "document_type": "quote",
                      "invoice_number": "Q-1001",
                      "title": "Quote",
                      "order": {
                        "shopify_order_id": "gid://shopify/DraftOrder/990777",
                        "name": "#D1001",
                        "number": null
                      },
                      "customer": {
                        "id": null,
                        "name": null,
                        "email": "quote@example.com"
                      },
                      "financial_status": null,
                      "currency": "EUR",
                      "total": "50.00",
                      "issued_on": "2026-11-10",
                      "due_on": null,
                      "sent_at": null,
                      "printed_at": null,
                      "reminder_sent_at": null,
                      "paid": false,
                      "edited": true,
                      "trashed": false,
                      "e_invoice_status": null,
                      "created_at": "2026-11-10T09:24:23Z",
                      "shopify_draft_order_id": "gid://shopify/DraftOrder/990777"
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "list quotes",
          "show my quotes",
          "draft order invoices",
          "find a quote",
          "quotes for a draft order",
          "quotes from last week"
        ],
        "x-value-labels": {
          "document_type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "credit_note": "Credit note",
            "pro_forma": "Pro forma invoice",
            "custom": "Custom invoice"
          },
          "link": {
            "linked": "Created from a Shopify order",
            "not_linked": "Standalone (no Shopify order)",
            "trashed": "In the trash"
          }
        },
        "parameters": [
          {
            "name": "link",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "linked",
                "not_linked",
                "trashed"
              ],
              "description": "'trashed' to list quotes in the trash instead. One of: `linked` (Created from a Shopify order), `not_linked` (Standalone (no Shopify order)), `trashed` (In the trash)."
            },
            "description": "'trashed' to list quotes in the trash instead. One of: `linked` (Created from a Shopify order), `not_linked` (Standalone (no Shopify order)), `trashed` (In the trash)."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "created_at desc",
                "created_at asc"
              ],
              "description": "'created_at desc' (default) or 'created_at asc'."
            },
            "description": "'created_at desc' (default) or 'created_at asc'."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "1-based page number."
            },
            "description": "1-based page number."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, default 25, max 100."
            },
            "description": "Rows per page, default 25, max 100."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Created on or after this date (ISO 8601).",
              "type": [
                "string",
                "object"
              ]
            },
            "description": "Created on or after this date (ISO 8601)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Created on or before this date (ISO 8601).",
              "type": "string"
            },
            "description": "Created on or before this date (ISO 8601)."
          },
          {
            "name": "order_id",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The Shopify draft order, as a gid (gid://shopify/DraftOrder/123) or a bare number.",
              "type": [
                "string",
                "integer"
              ]
            },
            "description": "The Shopify draft order, as a gid (gid://shopify/DraftOrder/123) or a bare number."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Free text over quote number, draft order name, customer name and email."
            },
            "description": "Free text over quote number, draft order name, customer name and email."
          }
        ]
      }
    },
    "/documents/quotes/{id}": {
      "get": {
        "operationId": "documents.quotes.read",
        "summary": "Read quote",
        "description": "One quote in full: the invoice shape (numbers, dates, totals, customer, addresses, line items, PDF availability) plus the Shopify draft order gid and the payment link. 404 for an id that is not a quote; invoices and credit notes have their own reads. Read-only.\n\n`document_type` values: `invoice` (Invoice), `quote` (Quote), `credit_note` (Credit note), `pro_forma` (Pro forma invoice), `custom` (Custom invoice).\n\n`financial_status` values: `pending` (Payment pending), `authorized` (Authorized), `partially_paid` (Partially paid), `paid` (Paid), `partially_refunded` (Partially refunded), `refunded` (Refunded), `voided` (Voided), `expired` (Expired), `cancelled` (Cancelled).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteRead"
                },
                "example": {
                  "id": 980191059,
                  "document_type": "quote",
                  "invoice_number": "Q-1001",
                  "title": "Quote",
                  "order": {
                    "shopify_order_id": "gid://shopify/DraftOrder/990777",
                    "name": "#D1001",
                    "number": null
                  },
                  "customer": {
                    "id": null,
                    "name": null,
                    "email": "quote@example.com",
                    "shopify_customer_id": null,
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": null,
                  "currency": "EUR",
                  "total": "50.00",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": false,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T09:24:24Z",
                  "shopify_draft_order_id": "gid://shopify/DraftOrder/990777",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": null,
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": null,
                  "locale": null,
                  "totals": {
                    "currency": "EUR",
                    "taxes_included": null,
                    "subtotal": "0.00",
                    "discounts": "0.00",
                    "shipping": "0.00",
                    "tax": "0.00",
                    "duties": "0.00",
                    "total": "0.00",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": null,
                  "shipping_address": null,
                  "line_items": [],
                  "shipping_lines": [],
                  "tax_lines": [],
                  "discount_codes": [],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T09:24:24Z",
                  "payment_url": "https://shop.example/pay/abc"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show quote",
          "quote details",
          "open quote",
          "what is on this quote",
          "quote pdf link",
          "quote for draft order"
        ],
        "x-value-labels": {
          "document_type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "credit_note": "Credit note",
            "pro_forma": "Pro forma invoice",
            "custom": "Custom invoice"
          },
          "financial_status": {
            "pending": "Payment pending",
            "authorized": "Authorized",
            "partially_paid": "Partially paid",
            "paid": "Paid",
            "partially_refunded": "Partially refunded",
            "refunded": "Refunded",
            "voided": "Voided",
            "expired": "Expired",
            "cancelled": "Cancelled"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/documents/quotes/{id}/pdf": {
      "post": {
        "operationId": "documents.quotes.print",
        "summary": "Print quote",
        "description": "Renders the quote PDF (or reuses the stored one when nothing changed) and returns a signed download URL valid for one week, the file name and when it was generated.\n\n**Note:** Rendering a new PDF counts against a free plan invoice limit.",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuotePrint"
                },
                "example": {
                  "id": 980191018,
                  "url": null,
                  "filename": null,
                  "generated_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "download quote pdf",
          "get quote pdf",
          "print quote",
          "regenerate quote pdf",
          "quote pdf link",
          "render quote"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "regenerate": {
                    "description": "true renders the PDF again even when the stored one is current (default false).",
                    "type": "boolean"
                  },
                  "template_id": {
                    "description": "Template to render with. Default: the shop default for this document type.",
                    "type": "integer"
                  }
                }
              },
              "examples": {
                "stored": {
                  "summary": "Get the stored PDF",
                  "value": {}
                },
                "regenerate": {
                  "summary": "Render the PDF again with another template",
                  "value": {
                    "regenerate": true,
                    "template_id": 312
                  }
                }
              }
            }
          }
        }
      }
    },
    "/documents/quotes/{id}/send": {
      "post": {
        "operationId": "documents.quotes.send",
        "summary": "Send quote",
        "description": "Emails a quote to the customer through the shop sender, as the Send button does: renders the PDF when needed, attaches it, records the send and returns the quote in full. Recipient, cc, subject and message can be overridden for this one email.\n\n**Note:** Sends an email to the customer immediately. Refused when the shop cannot send email (code email_sending_disabled).",
        "tags": [
          "Documents"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteRead"
                },
                "example": {
                  "id": 980191018,
                  "document_type": "quote",
                  "invoice_number": "Q-1001",
                  "title": "Quote",
                  "order": {
                    "shopify_order_id": "gid://shopify/DraftOrder/990777",
                    "name": "#D1001",
                    "number": null
                  },
                  "customer": {
                    "id": null,
                    "name": null,
                    "email": "quote@example.com",
                    "shopify_customer_id": null,
                    "phone": null,
                    "tax_number": null,
                    "eori_number": null,
                    "tags": []
                  },
                  "financial_status": null,
                  "currency": "EUR",
                  "total": "50.00",
                  "issued_on": "2026-11-10",
                  "due_on": null,
                  "sent_at": null,
                  "printed_at": null,
                  "reminder_sent_at": null,
                  "paid": false,
                  "edited": true,
                  "trashed": false,
                  "e_invoice_status": null,
                  "created_at": "2026-11-10T08:35:26Z",
                  "shopify_draft_order_id": "gid://shopify/DraftOrder/990777",
                  "fulfillment_status": null,
                  "dates": {
                    "order_placed_at": null,
                    "issued_on": "2026-11-10",
                    "due_on": null,
                    "tax_date": null,
                    "fulfilled_on": null
                  },
                  "po_number": null,
                  "payment_terms": null,
                  "payment_gateway": null,
                  "locale": null,
                  "totals": {
                    "currency": "EUR",
                    "taxes_included": null,
                    "subtotal": "0.00",
                    "discounts": "0.00",
                    "shipping": "0.00",
                    "tax": "0.00",
                    "duties": "0.00",
                    "total": "0.00",
                    "total_paid": "0.00",
                    "total_refunded": "0.00",
                    "total_due": "0.00"
                  },
                  "billing_address": null,
                  "shipping_address": null,
                  "line_items": [],
                  "shipping_lines": [],
                  "tax_lines": [],
                  "discount_codes": [],
                  "notes": {
                    "note": null,
                    "custom_note": null,
                    "note_attributes": []
                  },
                  "custom_fields": [],
                  "tags": [],
                  "tracking": {
                    "companies": null,
                    "numbers": null
                  },
                  "pdf": {
                    "available": false,
                    "filename": null,
                    "url": null,
                    "generated_at": null
                  },
                  "e_invoice": {
                    "status": null,
                    "requested": false,
                    "error": null
                  },
                  "updated_at": "2026-11-10T08:35:26Z",
                  "payment_url": "https://shop.example/pay/abc"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "send quote",
          "email quote",
          "email the quote to the customer",
          "resend quote",
          "send quote to another address",
          "mail the quote"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "description": "Recipient email address. Default: the email on the order.",
                    "type": "string"
                  },
                  "cc": {
                    "description": "Extra recipient copied on the email.",
                    "type": "string"
                  },
                  "subject": {
                    "description": "Email subject. Default: the subject configured for this document type.",
                    "type": "string"
                  },
                  "message": {
                    "description": "Email body. Default: the email text configured for this document type.",
                    "type": "string"
                  },
                  "template_id": {
                    "description": "Template to render the PDF with. Default: the shop default for this document type.",
                    "type": "integer"
                  }
                }
              },
              "examples": {
                "default": {
                  "summary": "Send to the draft order's email",
                  "value": {}
                },
                "custom": {
                  "summary": "Send to another address with your own message",
                  "value": {
                    "to": "buyer@example.com",
                    "subject": "Your quote #D12",
                    "message": "Here is the quote we discussed.",
                    "template_id": 312
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "get": {
        "operationId": "orders.list",
        "summary": "List orders",
        "description": "The Shopify orders of the store as the Orders page lists them, newest first, each with the Invoice Falcon invoice that exists for it (number, when it was sent, printed or downloaded, e-invoice state) or `invoice: null` when none was made yet. Filters match the page: payment status, fulfillment status, a created date range and a free-text search. Pages by Shopify cursor: pass `page.end_cursor` as `after` for the next page. Read-only; it never creates invoices.\n\n`financial_status` values: `paid` (Paid), `pending` (Pending), `refunded` (Refunded), `partially_paid` (Partially paid), `partially_refunded` (Partially refunded), `authorized` (Authorized), `voided` (Voided), `expired` (Expired).\n\n`fulfillment_status` values: `fulfilled` (Fulfilled), `unfulfilled` (Unfulfilled), `partially_fulfilled` (Partially fulfilled), `in_progress` (In progress), `on_hold` (On hold), `pending_fulfillment` (Pending), `scheduled` (Scheduled), `restocked` (Restocked).\n\n`invoice.type` values: `invoice` (Invoice), `quote` (Quote), `pro_forma` (Pro forma invoice), `credit_note` (Credit note), `custom` (Custom document).\n\n`invoice.e_invoice.status` values: `generated` (E-invoice embedded), `fallback` (Standard PDF), `requested` (Requested).",
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrderRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/CursorPage"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "shopify_order_id": "gid://shopify/Order/5551001",
                      "kind": "order",
                      "order_number": "#1001",
                      "created_at": "2026-03-01T10:00:00Z",
                      "processed_at": "2026-03-01T10:00:00Z",
                      "financial_status": "paid",
                      "fulfillment_status": "fulfilled",
                      "currency": "EUR",
                      "total": "120.50",
                      "customer": {
                        "name": "Ann Lee",
                        "email": "ann@example.com"
                      },
                      "invoice": {
                        "id": 980191045,
                        "type": "invoice",
                        "number": "INV-77",
                        "created_at": "2026-11-10T09:24:21Z",
                        "sent_at": "2026-03-02T10:00:00Z",
                        "printed_at": "2026-03-03T10:00:00Z",
                        "downloaded_at": null,
                        "reminder_sent_at": null,
                        "e_invoice": {
                          "status": null,
                          "error": null,
                          "requested": false
                        }
                      },
                      "cursor": "cur5551001"
                    },
                    {
                      "shopify_order_id": "gid://shopify/Order/5551002",
                      "kind": "order",
                      "order_number": "#1002",
                      "created_at": "2026-03-01T10:00:00Z",
                      "processed_at": "2026-03-01T10:00:00Z",
                      "financial_status": "paid",
                      "fulfillment_status": "fulfilled",
                      "currency": "EUR",
                      "total": "120.50",
                      "customer": {
                        "name": "Ann Lee",
                        "email": "ann@example.com"
                      },
                      "invoice": null,
                      "cursor": "cur5551002"
                    }
                  ],
                  "page": {
                    "size": 25,
                    "has_next_page": true,
                    "has_previous_page": false,
                    "start_cursor": "a",
                    "end_cursor": "z",
                    "total": 2
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "x-aliases": [
          "list orders",
          "show my orders",
          "recent orders",
          "orders without an invoice",
          "unpaid orders",
          "orders from last week",
          "find order",
          "which orders were invoiced"
        ],
        "x-value-labels": {
          "financial_status": {
            "paid": "Paid",
            "pending": "Pending",
            "refunded": "Refunded",
            "partially_paid": "Partially paid",
            "partially_refunded": "Partially refunded",
            "authorized": "Authorized",
            "voided": "Voided",
            "expired": "Expired"
          },
          "fulfillment_status": {
            "fulfilled": "Fulfilled",
            "unfulfilled": "Unfulfilled",
            "partially_fulfilled": "Partially fulfilled",
            "in_progress": "In progress",
            "on_hold": "On hold",
            "pending_fulfillment": "Pending",
            "scheduled": "Scheduled",
            "restocked": "Restocked"
          },
          "invoice.type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "pro_forma": "Pro forma invoice",
            "credit_note": "Credit note",
            "custom": "Custom document"
          },
          "invoice.e_invoice.status": {
            "generated": "E-invoice embedded",
            "fallback": "Standard PDF",
            "requested": "Requested"
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, 1-100 (default 25)."
            },
            "description": "Rows per page, 1-100 (default 25)."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cursor of the last row of the previous page (page.end_cursor), to go forward."
            },
            "description": "Cursor of the last row of the previous page (page.end_cursor), to go forward."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cursor of the first row of the next page (page.start_cursor), to go back."
            },
            "description": "Cursor of the first row of the next page (page.start_cursor), to go back."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Free text, in Shopify order search syntax: an order number (\"#1001\"), a customer name or email, or a field filter (\"tag:wholesale\", \"sku:ABC\")."
            },
            "description": "Free text, in Shopify order search syntax: an order number (\"#1001\"), a customer name or email, or a field filter (\"tag:wholesale\", \"sku:ABC\")."
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Only orders created on or after this date (YYYY-MM-DD, shop time zone)."
            },
            "description": "Only orders created on or after this date (YYYY-MM-DD, shop time zone)."
          },
          {
            "name": "created_at_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Only orders created on or before this date (YYYY-MM-DD, shop time zone)."
            },
            "description": "Only orders created on or before this date (YYYY-MM-DD, shop time zone)."
          },
          {
            "name": "financial_status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Payment status filter: paid, pending, refunded, partially_paid, authorized, voided. One of: `paid` (Paid), `pending` (Pending), `refunded` (Refunded), `partially_paid` (Partially paid), `partially_refunded` (Partially refunded), `authorized` (Authorized), `voided` (Voided), `expired` (Expired).",
              "enum": [
                "paid",
                "pending",
                "refunded",
                "partially_paid",
                "partially_refunded",
                "authorized",
                "voided",
                "expired"
              ]
            },
            "description": "Payment status filter: paid, pending, refunded, partially_paid, authorized, voided. One of: `paid` (Paid), `pending` (Pending), `refunded` (Refunded), `partially_paid` (Partially paid), `partially_refunded` (Partially refunded), `authorized` (Authorized), `voided` (Voided), `expired` (Expired)."
          },
          {
            "name": "fulfillment_status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Fulfillment filter: shipped, unshipped, partial, in_progress, on_hold (shipped = fulfilled, unshipped = unfulfilled). One of: `fulfilled` (Fulfilled), `unfulfilled` (Unfulfilled), `partially_fulfilled` (Partially fulfilled), `in_progress` (In progress), `on_hold` (On hold), `pending_fulfillment` (Pending), `scheduled` (Scheduled), `restocked` (Restocked).",
              "enum": [
                "fulfilled",
                "unfulfilled",
                "partially_fulfilled",
                "in_progress",
                "on_hold",
                "pending_fulfillment",
                "scheduled",
                "restocked"
              ]
            },
            "description": "Fulfillment filter: shipped, unshipped, partial, in_progress, on_hold (shipped = fulfilled, unshipped = unfulfilled). One of: `fulfilled` (Fulfilled), `unfulfilled` (Unfulfilled), `partially_fulfilled` (Partially fulfilled), `in_progress` (In progress), `on_hold` (On hold), `pending_fulfillment` (Pending), `scheduled` (Scheduled), `restocked` (Restocked)."
          }
        ]
      }
    },
    "/orders/{id}": {
      "get": {
        "operationId": "orders.read",
        "summary": "Read order",
        "description": "One Shopify order as the order page shows it: customer, addresses, line items, totals and tax lines from Shopify, plus every Invoice Falcon document that exists for it (invoice, credit notes) with their numbers and send/print/download times. Accepts a gid, a bare Shopify id or the order number (\"#1001\" or \"1001\"). Read-only.\n\n`financial_status` values: `paid` (Paid), `pending` (Pending), `refunded` (Refunded), `partially_paid` (Partially paid), `partially_refunded` (Partially refunded), `authorized` (Authorized), `voided` (Voided), `expired` (Expired).\n\n`fulfillment_status` values: `fulfilled` (Fulfilled), `unfulfilled` (Unfulfilled), `partially_fulfilled` (Partially fulfilled), `in_progress` (In progress), `on_hold` (On hold), `pending_fulfillment` (Pending), `scheduled` (Scheduled), `restocked` (Restocked).\n\n`documents.type` values: `invoice` (Invoice), `quote` (Quote), `pro_forma` (Pro forma invoice), `credit_note` (Credit note), `custom` (Custom document).\n\n`documents.e_invoice.status` values: `generated` (E-invoice embedded), `fallback` (Standard PDF), `requested` (Requested).",
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "example": {
                  "shopify_order_id": "gid://shopify/Order/5551001",
                  "kind": "order",
                  "order_number": "#1001",
                  "created_at": "2026-03-01T10:00:00Z",
                  "processed_at": "2026-03-01T10:00:00Z",
                  "financial_status": "paid",
                  "fulfillment_status": "fulfilled",
                  "currency": "EUR",
                  "total": "120.50",
                  "customer": {
                    "shopify_customer_id": "gid://shopify/Customer/42",
                    "name": "Ann Lee",
                    "email": "ann@example.com",
                    "phone": null,
                    "note": null,
                    "default_address": null
                  },
                  "invoice": {
                    "id": 980191041,
                    "type": "invoice",
                    "number": "INV-77",
                    "created_at": "2026-11-10T09:24:20Z",
                    "sent_at": "2026-03-02T10:00:00Z",
                    "printed_at": "2026-03-03T10:00:00Z",
                    "downloaded_at": null,
                    "reminder_sent_at": null,
                    "e_invoice": {
                      "status": null,
                      "error": null,
                      "requested": false
                    }
                  },
                  "email": "ann@example.com",
                  "phone": null,
                  "note": "Gift",
                  "cancelled_at": null,
                  "totals": {
                    "subtotal": "100.00",
                    "shipping": "10.00",
                    "tax": "10.50",
                    "discounts": "0.00",
                    "total": "120.50"
                  },
                  "shipping_method": "Standard",
                  "billing_address": {
                    "name": "Ann Lee",
                    "first_name": "Ann",
                    "last_name": "Lee",
                    "address1": "1 Main St",
                    "address2": null,
                    "city": "Berlin",
                    "province": null,
                    "province_code": null,
                    "country": "Germany",
                    "country_code": "DE",
                    "zip": "10115",
                    "phone": null
                  },
                  "shipping_address": null,
                  "line_items": [
                    {
                      "id": "gid://shopify/LineItem/9",
                      "title": "Hat",
                      "variant_title": "Red",
                      "sku": "HAT-R",
                      "barcode": null,
                      "quantity": 2,
                      "unit_price": "50.00",
                      "total": "100.00",
                      "image_url": null,
                      "selling_plan": null,
                      "product_id": "gid://shopify/Product/88",
                      "variant_id": "gid://shopify/ProductVariant/77"
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "VAT",
                      "rate": 0.19,
                      "amount": "10.50"
                    }
                  ],
                  "documents": [
                    {
                      "id": 980191041,
                      "type": "invoice",
                      "number": "INV-77",
                      "created_at": "2026-11-10T09:24:20Z",
                      "sent_at": "2026-03-02T10:00:00Z",
                      "printed_at": "2026-03-03T10:00:00Z",
                      "downloaded_at": null,
                      "reminder_sent_at": null,
                      "paid_at": null,
                      "pdf_ready": false,
                      "e_invoice": {
                        "status": null,
                        "error": null,
                        "requested": false
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show order",
          "order details",
          "what did we send for order",
          "is order 1001 invoiced",
          "open order",
          "order line items",
          "documents for an order"
        ],
        "x-value-labels": {
          "financial_status": {
            "paid": "Paid",
            "pending": "Pending",
            "refunded": "Refunded",
            "partially_paid": "Partially paid",
            "partially_refunded": "Partially refunded",
            "authorized": "Authorized",
            "voided": "Voided",
            "expired": "Expired"
          },
          "fulfillment_status": {
            "fulfilled": "Fulfilled",
            "unfulfilled": "Unfulfilled",
            "partially_fulfilled": "Partially fulfilled",
            "in_progress": "In progress",
            "on_hold": "On hold",
            "pending_fulfillment": "Pending",
            "scheduled": "Scheduled",
            "restocked": "Restocked"
          },
          "documents.type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "pro_forma": "Pro forma invoice",
            "credit_note": "Credit note",
            "custom": "Custom document"
          },
          "documents.e_invoice.status": {
            "generated": "E-invoice embedded",
            "fallback": "Standard PDF",
            "requested": "Requested"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A Shopify id (gid://shopify/Order/123 or 123) or the order number as the store shows it (\"#1001\" or \"1001\")."
          }
        ]
      }
    },
    "/orders/{id}/troubleshoot": {
      "get": {
        "operationId": "orders.troubleshoot",
        "summary": "Troubleshoot order",
        "description": "Why a customer did not get their invoice, in one call: the order (cancelled? has an email address?), whether an invoice exists and was ever emailed and to which address, bounces and rejections, the store's sender (verified?), whether sending is allowed, the Free plan limit and the automatic-invoice rules. Ends with a `diagnosis` that names the request fixing each finding.\n\n**Note:** Read-only. Start here for a missing-invoice complaint, then run the request a finding names (sends and deletes preview or ask first). Write the `#` of an order number as `%23` in a REST path.",
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderTroubleshoot"
                },
                "example": {
                  "order": {
                    "shopify_order_id": "gid://shopify/Order/5552001",
                    "order_number": "#1080",
                    "created_at": "2026-03-01T10:00:00Z",
                    "financial_status": "paid",
                    "fulfillment_status": "fulfilled",
                    "cancelled_at": null,
                    "email": "ann@example.com"
                  },
                  "document": {
                    "id": 980191022,
                    "type": "invoice",
                    "number": "INV-1",
                    "sent_at": "2026-11-10T09:07:40Z"
                  },
                  "diagnosis": [
                    {
                      "code": "sender_unverified",
                      "severity": "warning",
                      "message": "The custom from address invoicefalcon@molecularapps.com is not verified, so emails do not go out as that address.",
                      "fix": "Verify the sender domain (GET /account/sending shows the state), or clear the address in PATCH /account/sending."
                    },
                    {
                      "code": "automation_off",
                      "severity": "info",
                      "message": "Automatic invoices are off, so invoices go out only when someone sends them.",
                      "fix": "Send it with POST /documents/invoices/:id/send, or turn it on with PATCH /account/automation."
                    },
                    {
                      "code": "delivery_failed",
                      "severity": "problem",
                      "message": "The email to bad@example.com bounced ({\"type\"=>\"Permanent\"}).",
                      "fix": "Confirm the address with the customer and resend with `to`."
                    }
                  ],
                  "verdict": "The email to bad@example.com bounced ({\"type\"=>\"Permanent\"})."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "customer didn't get their invoice",
          "invoice not received",
          "why was the invoice not sent",
          "customer says no email",
          "troubleshoot order",
          "why did the invoice not go out",
          "diagnose order"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A Shopify id (gid://shopify/Order/123 or 123) or the order number as the store shows it (\"#1001\" or \"1001\")."
          }
        ]
      }
    },
    "/orders/drafts": {
      "get": {
        "operationId": "orders.drafts.list",
        "summary": "List drafts",
        "description": "The Shopify draft orders as the Draft orders tab lists them, newest first, each with the quote Invoice Falcon made for it (number, when it was sent, printed or downloaded) or `invoice: null`. Filters: draft status (open, invoice_sent, completed), a created date range and a free-text search. Pages by Shopify cursor. Read-only.\n\n`status` values: `open` (Open), `invoice_sent` (Invoice sent), `completed` (Completed).\n\n`invoice.type` values: `invoice` (Invoice), `quote` (Quote), `pro_forma` (Pro forma invoice), `credit_note` (Credit note), `custom` (Custom document).",
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DraftRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/CursorPage"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "shopify_draft_order_id": "gid://shopify/DraftOrder/700",
                      "kind": "draft_order",
                      "order_number": "#D1",
                      "created_at": "2026-03-01T10:00:00Z",
                      "processed_at": "2026-03-01T10:00:00Z",
                      "financial_status": "paid",
                      "status": "open",
                      "currency": "EUR",
                      "total": "120.50",
                      "customer": {
                        "name": "Ann Lee",
                        "email": "ann@example.com"
                      },
                      "invoice": {
                        "id": 980191038,
                        "type": "quote",
                        "number": "Q-1",
                        "created_at": "2026-11-10T09:24:20Z",
                        "sent_at": null,
                        "printed_at": null,
                        "downloaded_at": null,
                        "reminder_sent_at": null
                      },
                      "cursor": "cur700"
                    }
                  ],
                  "page": {
                    "size": 25,
                    "has_next_page": false,
                    "has_previous_page": false,
                    "start_cursor": null,
                    "end_cursor": null,
                    "total": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        },
        "x-aliases": [
          "list draft orders",
          "show drafts",
          "open quotes",
          "draft orders without a quote",
          "recent drafts",
          "which drafts got a quote"
        ],
        "x-value-labels": {
          "status": {
            "open": "Open",
            "invoice_sent": "Invoice sent",
            "completed": "Completed"
          },
          "invoice.type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "pro_forma": "Pro forma invoice",
            "credit_note": "Credit note",
            "custom": "Custom document"
          }
        },
        "parameters": [
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, 1-100 (default 25)."
            },
            "description": "Rows per page, 1-100 (default 25)."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cursor of the last row of the previous page (page.end_cursor), to go forward."
            },
            "description": "Cursor of the last row of the previous page (page.end_cursor), to go forward."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cursor of the first row of the next page (page.start_cursor), to go back."
            },
            "description": "Cursor of the first row of the next page (page.start_cursor), to go back."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Free text, in Shopify order search syntax: an order number (\"#1001\"), a customer name or email, or a field filter (\"tag:wholesale\", \"sku:ABC\")."
            },
            "description": "Free text, in Shopify order search syntax: an order number (\"#1001\"), a customer name or email, or a field filter (\"tag:wholesale\", \"sku:ABC\")."
          },
          {
            "name": "created_at_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Only orders created on or after this date (YYYY-MM-DD, shop time zone)."
            },
            "description": "Only orders created on or after this date (YYYY-MM-DD, shop time zone)."
          },
          {
            "name": "created_at_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Only orders created on or before this date (YYYY-MM-DD, shop time zone)."
            },
            "description": "Only orders created on or before this date (YYYY-MM-DD, shop time zone)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Draft status filter: open, invoice_sent, completed. One of: `open` (Open), `invoice_sent` (Invoice sent), `completed` (Completed).",
              "enum": [
                "open",
                "invoice_sent",
                "completed"
              ]
            },
            "description": "Draft status filter: open, invoice_sent, completed. One of: `open` (Open), `invoice_sent` (Invoice sent), `completed` (Completed)."
          }
        ]
      }
    },
    "/orders/drafts/{id}": {
      "get": {
        "operationId": "orders.drafts.read",
        "summary": "Read draft",
        "description": "One Shopify draft order as its page shows it: customer, addresses, line items and totals from Shopify, plus the quote Invoice Falcon made for it, if any. Accepts a gid (gid://shopify/DraftOrder/123), a bare id or the draft name (\"#D12\"). Read-only.\n\n`status` values: `open` (Open), `invoice_sent` (Invoice sent), `completed` (Completed).\n\n`documents.type` values: `invoice` (Invoice), `quote` (Quote), `pro_forma` (Pro forma invoice), `credit_note` (Credit note), `custom` (Custom document).",
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Draft"
                },
                "example": {
                  "shopify_draft_order_id": "gid://shopify/DraftOrder/700",
                  "kind": "draft_order",
                  "order_number": "#1001",
                  "created_at": "2026-03-01T10:00:00Z",
                  "processed_at": "2026-03-01T10:00:00Z",
                  "financial_status": "paid",
                  "status": "open",
                  "currency": "EUR",
                  "total": "120.50",
                  "customer": {
                    "shopify_customer_id": "gid://shopify/Customer/42",
                    "name": "Ann Lee",
                    "email": "ann@example.com",
                    "phone": null,
                    "note": null,
                    "default_address": null
                  },
                  "invoice": null,
                  "email": "ann@example.com",
                  "phone": null,
                  "note": "Gift",
                  "cancelled_at": null,
                  "totals": {
                    "subtotal": "100.00",
                    "shipping": "10.00",
                    "tax": "10.50",
                    "discounts": "0.00",
                    "total": "120.50"
                  },
                  "shipping_method": "Standard",
                  "billing_address": {
                    "name": "Ann Lee",
                    "first_name": "Ann",
                    "last_name": "Lee",
                    "address1": "1 Main St",
                    "address2": null,
                    "city": "Berlin",
                    "province": null,
                    "province_code": null,
                    "country": "Germany",
                    "country_code": "DE",
                    "zip": "10115",
                    "phone": null
                  },
                  "shipping_address": null,
                  "line_items": [
                    {
                      "id": "gid://shopify/LineItem/9",
                      "title": "Hat",
                      "variant_title": "Red",
                      "sku": "HAT-R",
                      "barcode": null,
                      "quantity": 2,
                      "unit_price": "50.00",
                      "total": "100.00",
                      "image_url": null,
                      "selling_plan": null,
                      "product_id": "gid://shopify/Product/88",
                      "variant_id": "gid://shopify/ProductVariant/77"
                    }
                  ],
                  "tax_lines": [
                    {
                      "title": "VAT",
                      "rate": 0.19,
                      "amount": "10.50"
                    }
                  ],
                  "documents": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show draft order",
          "draft order details",
          "open quote",
          "is the draft quoted",
          "draft line items"
        ],
        "x-value-labels": {
          "status": {
            "open": "Open",
            "invoice_sent": "Invoice sent",
            "completed": "Completed"
          },
          "documents.type": {
            "invoice": "Invoice",
            "quote": "Quote",
            "pro_forma": "Pro forma invoice",
            "credit_note": "Credit note",
            "custom": "Custom document"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A Shopify id (gid://shopify/Order/123 or 123) or the order number as the store shows it (\"#1001\" or \"1001\")."
          }
        ]
      }
    },
    "/templates": {
      "post": {
        "operationId": "templates.create",
        "summary": "Create template",
        "description": "Create a template from one of the app's designs (see GET /templates/designs): the design sets the document type and the starting layout. Optionally name it and make it the default for regular orders. Returns the new template in full; edit it with PATCH /templates/:id.\n\n**Note:** The new template is not used for any order until it is a default or chosen when printing.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The resource, when it already existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 156,
                  "name": "Main invoice (1)",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": true,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:43Z",
                  "updated_at": "2026-11-10T09:07:43Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "201": {
            "description": "Created: the new resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 156,
                  "name": "Main invoice (1)",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": true,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:43Z",
                  "updated_at": "2026-11-10T09:07:43Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "create a template",
          "add a packing slip template",
          "new invoice template from the modern design",
          "start a template",
          "add another template"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "design": {
                    "description": "Design key from GET /templates/designs, e.g. default, classic, modern.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Template name; defaults to the design name, made unique.",
                    "type": "string"
                  },
                  "set_as_default": {
                    "description": "true to make it the default template for regular orders.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "design"
                ]
              },
              "examples": {
                "design": {
                  "summary": "Create from a design",
                  "value": {
                    "design": "modern"
                  }
                },
                "default": {
                  "summary": "Create, name it and make it the default",
                  "value": {
                    "design": "classic",
                    "name": "Wholesale invoice",
                    "set_as_default": true
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "templates.list",
        "summary": "List templates",
        "description": "The store's document templates (invoices, packing slips, quotes, credit notes, return forms), newest first: name, document type, the design it started from, which order kinds it is the default for, and its logo. Filter with `document_type`. Read-only.\n\n`document_type` values: `invoice` (Invoice), `packing_slip` (Packing slip), `quote` (Quote), `credit_note` (Credit note), `return_form` (Return form).",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TemplateRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "id": 135,
                      "name": "Slip",
                      "document_type": "packing_slip",
                      "design": null,
                      "default_for": {
                        "orders": false,
                        "draft_orders": false,
                        "pos_orders": false,
                        "credit_notes": false
                      },
                      "logo": {
                        "enabled": true,
                        "url": null,
                        "width": 150,
                        "lock_aspect_ratio": true
                      },
                      "created_at": "2026-11-10T09:07:41Z",
                      "updated_at": "2026-11-10T09:07:41Z"
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "list templates",
          "which templates do I have",
          "default invoice template",
          "packing slip templates",
          "show my templates",
          "template list"
        ],
        "x-value-labels": {
          "document_type": {
            "invoice": "Invoice",
            "packing_slip": "Packing slip",
            "quote": "Quote",
            "credit_note": "Credit note",
            "return_form": "Return form"
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page number, from 1."
            },
            "description": "Page number, from 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, 1-100 (default 25)."
            },
            "description": "Rows per page, 1-100 (default 25)."
          },
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only templates of this type: invoice, packing_slip, quote, credit_note or return_form. One of: `invoice` (Invoice), `packing_slip` (Packing slip), `quote` (Quote), `credit_note` (Credit note), `return_form` (Return form).",
              "enum": [
                "invoice",
                "packing_slip",
                "quote",
                "credit_note",
                "return_form"
              ]
            },
            "description": "Only templates of this type: invoice, packing_slip, quote, credit_note or return_form. One of: `invoice` (Invoice), `packing_slip` (Packing slip), `quote` (Quote), `credit_note` (Credit note), `return_form` (Return form)."
          }
        ]
      }
    },
    "/templates/{id}": {
      "delete": {
        "operationId": "templates.delete",
        "summary": "Delete template",
        "description": "Delete a template. A template that is the default for any order kind is refused: make another template the default first. Existing PDFs are kept.\n\n**Note:** Cannot be undone. Documents already generated keep their PDF. Send it first without `confirm`: nothing changes and the 409 `confirmation_required` says what would. Tell the merchant, ask, and resend with `confirm: true` (`?confirm=true` on a DELETE) only after they agree.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateDelete"
                },
                "example": {
                  "id": 170,
                  "deleted": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "delete template",
          "remove a template",
          "get rid of the old invoice template"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Send true only after the merchant agreed. Without it nothing is deleted and the 409 says what would be.",
              "type": "boolean"
            },
            "description": "Send true only after the merchant agreed. Without it nothing is deleted and the 409 says what would be."
          }
        ]
      },
      "get": {
        "operationId": "templates.read",
        "summary": "Read template",
        "description": "One template in full: style (colour, font, date format), numbering, every editor section (order information, payment, shipping, customer, items, order total, extra, social) with its switches and texts, label overrides, content translations and the Liquid source. Read-only.\n\n`document_type` values: `invoice` (Invoice), `packing_slip` (Packing slip), `quote` (Quote), `credit_note` (Credit note), `return_form` (Return form).",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 125,
                  "name": "Main invoice",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": true,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": "https://cdn.example.com/logo.png",
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:41Z",
                  "updated_at": "2026-11-10T09:07:41Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show template",
          "template settings",
          "what does my invoice template show",
          "template details",
          "is the SKU shown on invoices",
          "template liquid code"
        ],
        "x-value-labels": {
          "document_type": {
            "invoice": "Invoice",
            "packing_slip": "Packing slip",
            "quote": "Quote",
            "credit_note": "Credit note",
            "return_form": "Return form"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          }
        ]
      },
      "patch": {
        "operationId": "templates.update",
        "summary": "Update template",
        "description": "Change a template: its name, which order kinds it is the default for, logo, style, numbering, any editor section switch or text (`sections.<group>.<field>`, exactly as the read lists them), label overrides, content translations or the Liquid source. Deep partial. Returns the template in full.\n\n**Note:** Applies to every document generated from this template from now on; existing PDFs are unchanged. Setting a `default_for` kind clears it on the other templates. The Pay now link needs a paid plan.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 175,
                  "name": "Renamed",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": true,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:44Z",
                  "updated_at": "2026-11-10T09:07:44Z",
                  "style": {
                    "accent_color": "#ff0000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "R-",
                    "next_number": "501",
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": false,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "edit template",
          "show the sku on invoices",
          "hide product images on the invoice",
          "rename template",
          "change the accent colour",
          "make this the default invoice template",
          "set the invoice prefix on a template",
          "turn off the footer notes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Template name, unique in the store."
                  },
                  "default_for": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "orders": {
                        "type": "boolean",
                        "description": "Use this template for regular orders by default (clears it on the other templates)."
                      },
                      "draft_orders": {
                        "type": "boolean",
                        "description": "Default for draft orders / quotes."
                      },
                      "pos_orders": {
                        "type": "boolean",
                        "description": "Default for POS orders."
                      },
                      "credit_notes": {
                        "type": "boolean",
                        "description": "Default for credit notes."
                      }
                    }
                  },
                  "logo": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Logo image URL; replaces an uploaded logo."
                      },
                      "width": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Logo width in pixels."
                      },
                      "lock_aspect_ratio": {
                        "type": "boolean"
                      }
                    }
                  },
                  "style": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "accent_color": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Hex colour, e.g. #1a1a1a."
                      },
                      "font_family": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "font_size": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "date_format": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "e.g. MMM DD, YYYY or DD/MM/YYYY."
                      }
                    }
                  },
                  "numbering": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "prefix": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Invoice number prefix for this template."
                      },
                      "next_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Next sequential number (digits). Applied as sent; read the template first."
                      },
                      "use_order_number": {
                        "type": "boolean",
                        "description": "Number invoices after the Shopify order number."
                      },
                      "credit_notes_use_order_number": {
                        "type": "boolean"
                      }
                    }
                  },
                  "sections": {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "order_information": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_invoice_number": {
                            "type": "boolean"
                          },
                          "show_custom_invoice_number": {
                            "type": "boolean"
                          },
                          "show_order_number": {
                            "type": "boolean"
                          },
                          "show_po_number": {
                            "type": "boolean"
                          },
                          "show_delivery_note_number": {
                            "type": "boolean"
                          },
                          "show_order_date": {
                            "type": "boolean"
                          },
                          "show_issue_date": {
                            "type": "boolean"
                          },
                          "show_due_date": {
                            "type": "boolean"
                          },
                          "show_fulfillment_date": {
                            "type": "boolean"
                          },
                          "show_payment_terms": {
                            "type": "boolean"
                          },
                          "show_order_amount": {
                            "type": "boolean"
                          },
                          "show_order_tags": {
                            "type": "boolean"
                          },
                          "show_barcode": {
                            "type": "boolean"
                          },
                          "show_order_barcode": {
                            "type": "boolean"
                          }
                        }
                      },
                      "payment_information": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_payment_address": {
                            "type": "boolean"
                          },
                          "show_payment_method": {
                            "type": "boolean"
                          },
                          "show_payment_breakdown": {
                            "type": "boolean"
                          },
                          "show_credit_card": {
                            "type": "boolean"
                          },
                          "show_financial_status": {
                            "type": "boolean"
                          },
                          "show_discount_code": {
                            "type": "boolean"
                          },
                          "show_tax_date": {
                            "type": "boolean"
                          },
                          "show_tracking_company": {
                            "type": "boolean"
                          },
                          "show_tracking_numbers": {
                            "type": "boolean"
                          },
                          "show_paid_by_customer": {
                            "type": "boolean"
                          }
                        }
                      },
                      "shipping_information": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_shipping_address": {
                            "type": "boolean"
                          }
                        }
                      },
                      "customer_information": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_customer_email": {
                            "type": "boolean"
                          },
                          "show_customer_phone": {
                            "type": "boolean"
                          },
                          "show_customer_note": {
                            "type": "boolean"
                          },
                          "show_localized_tax_id": {
                            "type": "boolean"
                          },
                          "localized_tax_id_string": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      },
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_product_images": {
                            "type": "boolean"
                          },
                          "show_sku": {
                            "type": "boolean"
                          },
                          "show_hs_code": {
                            "type": "boolean"
                          },
                          "show_product_weight": {
                            "type": "boolean"
                          },
                          "show_total_product_weight": {
                            "type": "boolean"
                          },
                          "show_country_of_origin": {
                            "type": "boolean"
                          },
                          "show_product_type": {
                            "type": "boolean"
                          },
                          "show_product_description": {
                            "type": "boolean"
                          },
                          "show_note_attributes": {
                            "type": "boolean"
                          },
                          "show_variants": {
                            "type": "boolean"
                          },
                          "show_selling_plan": {
                            "type": "boolean"
                          },
                          "show_item_discount": {
                            "type": "boolean"
                          },
                          "show_discount_reason": {
                            "type": "boolean"
                          },
                          "show_compare_at_price": {
                            "type": "boolean"
                          },
                          "show_original_price": {
                            "type": "boolean"
                          },
                          "show_properties": {
                            "type": "boolean"
                          },
                          "show_item_barcode": {
                            "type": "boolean"
                          },
                          "show_total_qty": {
                            "type": "boolean"
                          },
                          "show_item_tax": {
                            "type": "boolean"
                          },
                          "show_item_tax_amount": {
                            "type": "boolean"
                          },
                          "group_amount_digits": {
                            "type": "boolean"
                          }
                        }
                      },
                      "order_total": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_subtotal": {
                            "type": "boolean"
                          },
                          "show_order_discount": {
                            "type": "boolean"
                          },
                          "show_order_discount_reason": {
                            "type": "boolean"
                          },
                          "show_discount_breakdown": {
                            "type": "boolean"
                          },
                          "show_tax": {
                            "type": "boolean"
                          },
                          "show_tax_inclusion_label": {
                            "type": "boolean"
                          },
                          "show_tax_breakdown": {
                            "type": "boolean"
                          },
                          "show_shipping": {
                            "type": "boolean"
                          },
                          "show_discounts": {
                            "type": "boolean"
                          },
                          "show_shipping_rate_name": {
                            "type": "boolean"
                          },
                          "show_amount_in_words": {
                            "type": "boolean"
                          },
                          "show_total_weight": {
                            "type": "boolean"
                          },
                          "show_refund_amount": {
                            "type": "boolean"
                          },
                          "show_refund_reason": {
                            "type": "boolean"
                          },
                          "show_payment_link": {
                            "type": "boolean"
                          },
                          "show_balance": {
                            "type": "boolean"
                          }
                        }
                      },
                      "extra": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_order_notes": {
                            "type": "boolean"
                          },
                          "show_footer_notes": {
                            "type": "boolean"
                          },
                          "footer_message": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "show_store_domain": {
                            "type": "boolean"
                          },
                          "store_domain_text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "show_paid_unpaid_watermark": {
                            "type": "boolean"
                          }
                        }
                      },
                      "social": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "show_social_page": {
                            "type": "boolean"
                          },
                          "facebook_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "instagram_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "twitter_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "label_overrides": {
                    "type": "object",
                    "description": "Label text per field, e.g. { \"invoice_number\": \"Rechnungsnummer\" }."
                  },
                  "content_translations": {
                    "type": "object",
                    "description": "Text per field per language, e.g. { \"footer_message\": { \"de\": \"Danke\" } }. The only field is footer_message; languages are the store locale codes (de, fr, es...). Sent whole: it replaces the stored value, and blank entries are dropped, so {} clears every translation."
                  },
                  "liquid_code": {
                    "type": "string",
                    "description": "The Liquid source of the template body."
                  }
                }
              },
              "example": {
                "name": "Renamed",
                "sections": {
                  "items": {
                    "show_sku": false
                  }
                },
                "numbering": {
                  "prefix": "R-",
                  "next_number": "501"
                },
                "style": {
                  "accent_color": "#ff0000"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}/duplicate": {
      "post": {
        "operationId": "templates.duplicate",
        "summary": "Duplicate template",
        "description": "Copy a template, settings, texts and logo included, as \"<name> (copy)\". The copy is not a default for any order kind. Returns the new template in full.\n\n**Note:** Nothing changes for existing documents or for the original template.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The resource, when it already existed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 143,
                  "name": "Main invoice (copy)",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": false,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:42Z",
                  "updated_at": "2026-11-10T09:07:42Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "201": {
            "description": "Created: the new resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 143,
                  "name": "Main invoice (copy)",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": false,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:42Z",
                  "updated_at": "2026-11-10T09:07:42Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "duplicate template",
          "copy template",
          "clone my invoice template",
          "make a copy of a template"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          }
        ]
      }
    },
    "/templates/{id}/set_default": {
      "post": {
        "operationId": "templates.set_default",
        "summary": "Set the default template",
        "description": "Make a template the default for one or more order kinds: orders, draft_orders, pos_orders or credit_notes (default: orders). The previous default for each kind is cleared. Returns the template in full.\n\n**Note:** Applies to documents generated from now on, including automatic invoices.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Template"
                },
                "example": {
                  "id": 138,
                  "name": "Spare",
                  "document_type": "invoice",
                  "design": null,
                  "default_for": {
                    "orders": true,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": true
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:42Z",
                  "updated_at": "2026-11-10T09:07:42Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "set default template",
          "use this template for all orders",
          "make it the default for credit notes",
          "default packing slip",
          "change my default invoice template"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "for": {
                    "description": "Order kinds: orders, draft_orders, pos_orders, credit_notes. Defaults to [\"orders\"].",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "examples": {
                "orders": {
                  "summary": "Default for regular orders",
                  "value": {}
                },
                "kinds": {
                  "summary": "Default for draft and POS orders too",
                  "value": {
                    "for": [
                      "orders",
                      "draft_orders",
                      "pos_orders"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}/versions": {
      "get": {
        "operationId": "templates.versions.list",
        "summary": "List versions",
        "description": "A template's saved revisions, newest first (the last 15 edits are kept): when each was saved, its label if the merchant named it, and which fields changed. Read-only.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VersionRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "id": 20,
                      "label": null,
                      "event": "update",
                      "created_at": "2026-11-10T09:07:41Z",
                      "changed_fields": [
                        "accent_color",
                        "show_sku"
                      ]
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 25,
                    "total": 1,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "template history",
          "template versions",
          "what changed in my template",
          "previous template versions",
          "when was the template last edited"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page number, from 1."
            },
            "description": "Page number, from 1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Rows per page, 1-100 (default 25)."
            },
            "description": "Rows per page, 1-100 (default 25)."
          }
        ]
      }
    },
    "/templates/{id}/versions/{version_id}": {
      "get": {
        "operationId": "templates.versions.read",
        "summary": "Read version",
        "description": "One saved revision of a template with the before and after value of every field that changed in that save. Read-only.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The requested resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Version"
                },
                "example": {
                  "id": 20,
                  "label": null,
                  "event": "update",
                  "created_at": "2026-11-10T09:07:41Z",
                  "changed_fields": [
                    "accent_color",
                    "show_sku"
                  ],
                  "changes": {
                    "accent_color": {
                      "from": "#000000",
                      "to": "#ff0000"
                    },
                    "show_sku": {
                      "from": true,
                      "to": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "show template version",
          "what did this template edit change",
          "template revision details",
          "compare template version"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Version id from the versions list."
          }
        ]
      }
    },
    "/templates/{id}/versions/{version_id}/restore": {
      "post": {
        "operationId": "templates.versions.restore",
        "summary": "Restore version",
        "description": "Put a template back to how it was just before a saved revision was made (see GET /templates/:id/versions: each revision's changes.from is what you get back). The restore itself is not recorded as a revision. Returns the template in full.\n\n**Note:** Applies to documents generated from now on. Later revisions stay in the history.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "The updated resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionRestore"
                },
                "example": {
                  "id": 172,
                  "name": "Main invoice",
                  "document_type": "invoice",
                  "design": {
                    "key": "modern",
                    "name": "Modern"
                  },
                  "default_for": {
                    "orders": true,
                    "draft_orders": false,
                    "pos_orders": false,
                    "credit_notes": false
                  },
                  "logo": {
                    "enabled": true,
                    "url": null,
                    "width": 150,
                    "lock_aspect_ratio": true
                  },
                  "created_at": "2026-11-10T09:07:44Z",
                  "updated_at": "2026-11-10T09:07:44Z",
                  "style": {
                    "accent_color": "#000000",
                    "font_family": "Arial",
                    "font_size": 12,
                    "date_format": "MMM DD, YYYY"
                  },
                  "numbering": {
                    "prefix": "INV",
                    "next_number": null,
                    "use_order_number": true,
                    "credit_notes_use_order_number": false,
                    "sequential_numbering_available": true
                  },
                  "sections": {
                    "order_information": {
                      "show_invoice_number": true,
                      "show_custom_invoice_number": false,
                      "show_order_number": true,
                      "show_po_number": false,
                      "show_delivery_note_number": false,
                      "show_order_date": true,
                      "show_issue_date": false,
                      "show_due_date": false,
                      "show_fulfillment_date": false,
                      "show_payment_terms": false,
                      "show_order_amount": true,
                      "show_order_tags": false,
                      "show_barcode": false,
                      "show_order_barcode": false
                    },
                    "payment_information": {
                      "show_payment_address": true,
                      "show_payment_method": true,
                      "show_payment_breakdown": false,
                      "show_credit_card": true,
                      "show_financial_status": false,
                      "show_discount_code": false,
                      "show_tax_date": false,
                      "show_tracking_company": false,
                      "show_tracking_numbers": false,
                      "show_paid_by_customer": true
                    },
                    "shipping_information": {
                      "show_shipping_address": true
                    },
                    "customer_information": {
                      "show_customer_email": true,
                      "show_customer_phone": true,
                      "show_customer_note": true,
                      "show_localized_tax_id": false,
                      "localized_tax_id_string": "Tax ID"
                    },
                    "items": {
                      "show_product_images": true,
                      "show_sku": true,
                      "show_hs_code": false,
                      "show_product_weight": false,
                      "show_total_product_weight": false,
                      "show_country_of_origin": false,
                      "show_product_type": false,
                      "show_product_description": false,
                      "show_note_attributes": false,
                      "show_variants": true,
                      "show_selling_plan": false,
                      "show_item_discount": false,
                      "show_discount_reason": false,
                      "show_compare_at_price": false,
                      "show_original_price": false,
                      "show_properties": true,
                      "show_item_barcode": false,
                      "show_total_qty": false,
                      "show_item_tax": true,
                      "show_item_tax_amount": true,
                      "group_amount_digits": false
                    },
                    "order_total": {
                      "show_subtotal": true,
                      "show_order_discount": true,
                      "show_order_discount_reason": false,
                      "show_discount_breakdown": false,
                      "show_tax": true,
                      "show_tax_inclusion_label": false,
                      "show_tax_breakdown": true,
                      "show_shipping": true,
                      "show_discounts": true,
                      "show_shipping_rate_name": true,
                      "show_amount_in_words": false,
                      "show_total_weight": false,
                      "show_refund_amount": true,
                      "show_refund_reason": false,
                      "show_payment_link": false,
                      "show_balance": true
                    },
                    "extra": {
                      "show_order_notes": true,
                      "show_footer_notes": false,
                      "footer_message": null,
                      "show_store_domain": false,
                      "store_domain_text": null,
                      "show_paid_unpaid_watermark": false
                    },
                    "social": {
                      "show_social_page": false,
                      "facebook_url": null,
                      "instagram_url": null,
                      "twitter_url": null
                    }
                  },
                  "label_overrides": {},
                  "content_translations": {},
                  "liquid_code": "    <!DOCTYPE html>\n    <html>\n    <head>\n      <meta charset=\"utf-8\">\n      <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Open+Sans:wght@400;600;700&family=No…"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "restore template version",
          "undo template changes",
          "roll back the template",
          "revert my invoice template"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template id."
          },
          {
            "name": "version_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Version id from the versions list."
          }
        ]
      }
    },
    "/templates/designs": {
      "get": {
        "operationId": "templates.designs.list",
        "summary": "List designs",
        "description": "The app-owned starting designs a new template can be created from (Standard, Classic, Modern and so on): key, name, description and document type. Static; the same for every store. Read-only.",
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "One page of rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "page"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DesignRow"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  }
                },
                "example": {
                  "items": [
                    {
                      "key": "default",
                      "name": "Standard",
                      "description": "Clean, professional invoice with a right-aligned header and a bordered totals block.",
                      "document_type": "invoice"
                    },
                    {
                      "key": "classic",
                      "name": "Classic",
                      "description": "Traditional, formal layout with detailed sections — ideal for B2B and accounting.",
                      "document_type": "invoice"
                    },
                    {
                      "key": "modern",
                      "name": "Modern",
                      "description": "Bold accent banner header with a colored totals strip for a contemporary look.",
                      "document_type": "invoice"
                    }
                  ],
                  "page": {
                    "number": 1,
                    "size": 10,
                    "total": 10,
                    "total_pages": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-aliases": [
          "template designs",
          "which designs can I pick",
          "invoice layouts",
          "design gallery",
          "available template styles"
        ],
        "parameters": [
          {
            "name": "document_type",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Only designs for this document type.",
              "type": "string"
            },
            "description": "Only designs for this document type."
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Auth-Token",
        "description": "The API key from Settings → API. `Authorization: Bearer <api_key>` is also accepted."
      }
    },
    "schemas": {
      "Automation": {
        "type": "object",
        "properties": {
          "automatic_invoices": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "delay_minutes": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "when": {
                "type": "object",
                "properties": {
                  "payment_status": {
                    "type": "string"
                  },
                  "fulfillment_status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "shipment_status": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "trigger": {
                    "type": "string"
                  }
                }
              },
              "only_customer_tags": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "except_customer_tags": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "only_order_tags": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "except_order_tags": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "automatic_credit_notes": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "email_customer": {
                "type": "boolean"
              }
            }
          },
          "pay_now_button": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              }
            }
          },
          "payment_reminders": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "automatic": {
                "type": "boolean"
              },
              "due_after_days": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "every_days": {
                "type": "integer"
              },
              "send": {
                "type": "string"
              },
              "also_send_to": {
                "type": "string"
              },
              "only_to_these_addresses": {
                "type": "boolean"
              },
              "include_payment_link": {
                "type": "boolean"
              },
              "active": {
                "type": "boolean"
              },
              "also_send_to_addresses": {
                "type": "array",
                "items": {}
              }
            }
          },
          "paid_features_available": {
            "type": "boolean"
          }
        }
      },
      "Billing": {
        "type": "object",
        "properties": {
          "tier": {
            "type": "string"
          },
          "plan_name": {
            "type": "string"
          },
          "price_per_month": {
            "type": "string"
          },
          "paid": {
            "type": "boolean"
          },
          "is_partner": {
            "type": "boolean"
          },
          "usage": {
            "type": "object",
            "properties": {
              "orders_invoiced_this_cycle": {
                "type": "integer"
              },
              "monthly_limit": {
                "type": "integer"
              },
              "remaining": {
                "type": "integer"
              },
              "counted": {
                "type": "string"
              },
              "cycle_started_on": {
                "type": "string"
              },
              "cycle_resets_on": {
                "type": "string"
              }
            }
          }
        }
      },
      "Bulk": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "progress": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "completed": {
            "type": "array",
            "items": {}
          },
          "failed": {
            "type": "array",
            "items": {}
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "download_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivery_method": {
            "type": "string"
          },
          "processing_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "template_name": {
            "type": "string"
          },
          "from": {
            "type": [
              "object",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "BulkPrint": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "BulkRow": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "integer"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "progress": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "failure_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "download_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivery_method": {
            "type": "string"
          },
          "processing_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "template_name": {
            "type": "string"
          },
          "from": {
            "type": [
              "object",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "CreditNote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": [
              "object",
              "null"
            ]
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "shopify_customer_id": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {}
              }
            }
          },
          "financial_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "credited": {
            "type": "object",
            "properties": {
              "invoice_number": {
                "type": "string"
              },
              "invoice_id": {
                "type": "integer"
              },
              "shopify_order_id": {
                "type": "string"
              }
            }
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "order_placed_at": {
                "type": "string"
              },
              "issued_on": {
                "type": "string"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fulfilled_on": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "totals": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "taxes_included": {
                "type": "boolean"
              },
              "subtotal": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "duties": {
                "type": "string"
              },
              "total": {
                "type": "string"
              },
              "total_paid": {
                "type": "string"
              },
              "total_refunded": {
                "type": "string"
              },
              "total_due": {
                "type": "string"
              }
            }
          },
          "billing_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "variant_title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "product_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "discounted_unit_price": {
                  "type": "string"
                },
                "total_discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      }
                    }
                  }
                },
                "total": {
                  "type": "string"
                },
                "refunded_quantity": {
                  "type": "integer"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "properties": {
                  "type": "array",
                  "items": {}
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "shipping_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "rate": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                }
              }
            }
          },
          "discount_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note_attributes": {
                "type": "array",
                "items": {}
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {}
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "tracking": {
            "type": "object",
            "properties": {
              "companies": {
                "type": [
                  "array",
                  "null"
                ]
              },
              "numbers": {
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "e_invoice": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "requested": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string"
          },
          "refunds": {
            "type": "array",
            "items": {}
          },
          "already_existed": {
            "type": "boolean"
          }
        }
      },
      "CreditNoteDelete": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "CreditNotePrint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreditNoteRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": [
              "object",
              "null"
            ]
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "shopify_customer_id": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {}
              }
            }
          },
          "financial_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "credited": {
            "type": "object",
            "properties": {
              "invoice_number": {
                "type": "string"
              },
              "invoice_id": {
                "type": "integer"
              },
              "shopify_order_id": {
                "type": "string"
              }
            }
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "order_placed_at": {
                "type": "string"
              },
              "issued_on": {
                "type": "string"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fulfilled_on": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "totals": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "taxes_included": {
                "type": "boolean"
              },
              "subtotal": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "duties": {
                "type": "string"
              },
              "total": {
                "type": "string"
              },
              "total_paid": {
                "type": "string"
              },
              "total_refunded": {
                "type": "string"
              },
              "total_due": {
                "type": "string"
              }
            }
          },
          "billing_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "variant_title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "product_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "discounted_unit_price": {
                  "type": "string"
                },
                "total_discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      }
                    }
                  }
                },
                "total": {
                  "type": "string"
                },
                "refunded_quantity": {
                  "type": "integer"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "properties": {
                  "type": "array",
                  "items": {}
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "shipping_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "rate": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                }
              }
            }
          },
          "discount_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note_attributes": {
                "type": "array",
                "items": {}
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {}
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "tracking": {
            "type": "object",
            "properties": {
              "companies": {
                "type": [
                  "array",
                  "null"
                ]
              },
              "numbers": {
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "e_invoice": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "requested": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string"
          },
          "refunds": {
            "type": "array",
            "items": {}
          }
        }
      },
      "CreditNoteRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": [
              "object",
              "null"
            ]
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "financial_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "credited": {
            "type": "object",
            "properties": {
              "invoice_number": {
                "type": "string"
              },
              "invoice_id": {
                "type": "integer"
              },
              "shopify_order_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "shopify_customer_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": "string"
          },
          "eori_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "edited_in_app": {
            "type": "boolean"
          },
          "default_address": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "kind": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company": {
                "type": "string"
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "addresses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "first_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "company": {
                  "type": "string"
                },
                "address1": {
                  "type": "string"
                },
                "address2": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "city": {
                  "type": "string"
                },
                "province": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "zip": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                },
                "country_code": {
                  "type": "string"
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tax_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "eori_number": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "documents": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              },
              "recent": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "type": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    },
                    "shopify_order_id": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "sent_at": {
                      "type": "string"
                    },
                    "paid_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CustomerRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "shopify_customer_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "tax_number": {
            "type": "string"
          },
          "eori_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "edited_in_app": {
            "type": "boolean"
          },
          "default_address": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "kind": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "company": {
                "type": "string"
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "DesignRow": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          }
        }
      },
      "Document": {
        "type": "object",
        "properties": {
          "numbering": {
            "type": "object",
            "properties": {
              "invoice_prefix": {
                "type": "string"
              },
              "next_invoice_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "use_order_number": {
                "type": "boolean"
              },
              "credit_notes_use_invoice_number": {
                "type": "boolean"
              },
              "per_template_numbering_available": {
                "type": "boolean"
              }
            }
          },
          "dates": {
            "type": "object",
            "properties": {
              "use_order_created_date": {
                "type": "boolean"
              },
              "use_paid_date": {
                "type": "boolean"
              }
            }
          },
          "language": {
            "type": "object",
            "properties": {
              "document_locale": {
                "type": "string"
              },
              "auto_detect_customer_language": {
                "type": "boolean"
              },
              "translate_product_names": {
                "type": "boolean"
              },
              "available_locales": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "currency": {
            "type": "object",
            "properties": {
              "multicurrency": {
                "type": "boolean"
              },
              "show_currency_code": {
                "type": "boolean"
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "file_name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "business": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "address_line_1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address_line_2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city_line": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country_line": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "tax": {
            "type": "object",
            "properties": {
              "registration_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shown_as": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "compliance": {
            "type": "object",
            "properties": {
              "lock_invoices_after_issue": {
                "type": "boolean"
              }
            }
          },
          "eu_vat_footer_notes": {
            "type": "object",
            "properties": {
              "outside_eu": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "inside_eu": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "available": {
                "type": "boolean"
              }
            }
          },
          "branding": {
            "type": "object",
            "properties": {
              "show_invoice_falcon_brand": {
                "type": "boolean"
              },
              "removal_available": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "Draft": {
        "type": "object",
        "properties": {
          "shopify_draft_order_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "processed_at": {
            "type": "string"
          },
          "financial_status": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "shopify_customer_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_address": {
                "type": [
                  "object",
                  "null"
                ]
              }
            }
          },
          "invoice": {
            "type": [
              "object",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": "string"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "totals": {
            "type": "object",
            "properties": {
              "subtotal": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "total": {
                "type": "string"
              }
            }
          },
          "shipping_method": {
            "type": "string"
          },
          "billing_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "province_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "type": [
              "object",
              "null"
            ]
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "variant_title": {
                  "type": "string"
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "string"
                },
                "total": {
                  "type": "string"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "selling_plan": {
                  "type": "null"
                },
                "product_id": {
                  "type": "string"
                },
                "variant_id": {
                  "type": "string"
                }
              }
            }
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "rate": {
                  "type": "number"
                },
                "amount": {
                  "type": "string"
                }
              }
            }
          },
          "documents": {
            "type": "array",
            "items": {}
          }
        }
      },
      "DraftRow": {
        "type": "object",
        "properties": {
          "shopify_draft_order_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "processed_at": {
            "type": "string"
          },
          "financial_status": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "invoice": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "sent_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "printed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "downloaded_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reminder_sent_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "cursor": {
            "type": "string"
          }
        }
      },
      "EInvoicing": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "generation": {
            "type": "string"
          },
          "seller": {
            "type": "object",
            "properties": {
              "legal_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "vat_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "small_business": {
                "type": "boolean"
              },
              "country_code": {
                "type": "string"
              },
              "resolved": {
                "type": "object",
                "properties": {
                  "legal_name": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "zip": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "bank": {
            "type": "object",
            "properties": {
              "iban": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "available": {
            "type": "boolean"
          },
          "active": {
            "type": "boolean"
          },
          "manual_mode": {
            "type": "boolean"
          },
          "ready": {
            "type": "boolean"
          },
          "configured": {
            "type": "boolean"
          }
        }
      },
      "Email": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "custom_text": {
            "type": "boolean"
          },
          "templates": {
            "type": "object",
            "properties": {
              "invoice": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              },
              "quote": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              },
              "credit_note": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              },
              "payment_reminder": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      },
      "EmailUpdateTemplate": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "custom_text": {
            "type": "boolean"
          },
          "templates": {
            "type": "object",
            "properties": {
              "invoice": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              },
              "quote": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              },
              "credit_note": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              },
              "payment_reminder": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "customized": {
                    "type": "boolean"
                  },
                  "in_use": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "notice": {
            "type": "string"
          }
        }
      },
      "Integration": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "object",
            "properties": {
              "configured": {
                "type": "boolean"
              },
              "key": {
                "type": "string"
              }
            }
          },
          "payment_processor": {
            "type": "object",
            "properties": {
              "connected": {
                "type": "boolean"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stripe_checkout_v2": {
                "type": "boolean"
              }
            }
          },
          "customer_accounts": {
            "type": "object",
            "properties": {
              "translations": {
                "type": "array",
                "items": {}
              }
            }
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": "integer"
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "shopify_customer_id": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {}
              }
            }
          },
          "financial_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "order_placed_at": {
                "type": "string"
              },
              "issued_on": {
                "type": "string"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fulfilled_on": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "totals": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "taxes_included": {
                "type": "boolean"
              },
              "subtotal": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "duties": {
                "type": "string"
              },
              "total": {
                "type": "string"
              },
              "total_paid": {
                "type": "string"
              },
              "total_refunded": {
                "type": "string"
              },
              "total_due": {
                "type": "string"
              }
            }
          },
          "billing_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "variant_title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "product_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "discounted_unit_price": {
                  "type": "string"
                },
                "total_discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      }
                    }
                  }
                },
                "total": {
                  "type": "string"
                },
                "refunded_quantity": {
                  "type": "integer"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "properties": {
                  "type": "array",
                  "items": {}
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "shipping_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "rate": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                }
              }
            }
          },
          "discount_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note_attributes": {
                "type": "array",
                "items": {}
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {}
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "tracking": {
            "type": "object",
            "properties": {
              "companies": {
                "type": [
                  "array",
                  "null"
                ]
              },
              "numbers": {
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "e_invoice": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "requested": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string"
          },
          "already_existed": {
            "type": "boolean"
          }
        }
      },
      "InvoiceDelete": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "trashed": {
            "type": "boolean"
          }
        }
      },
      "InvoiceDestroy": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "number": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          },
          "next_invoice_number": {
            "type": "string"
          }
        }
      },
      "InvoiceHistory": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "integer"
          },
          "invoice_number": {
            "type": "string"
          },
          "customer_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "event": {
                  "type": "string"
                },
                "at": {
                  "type": "string"
                },
                "automatic": {
                  "type": "boolean"
                },
                "bulk": {
                  "type": "boolean"
                },
                "template": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                }
              }
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "to": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "sent_at": {
                  "type": "string"
                },
                "delivered_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "opened_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "clicked_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bounced_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "bounce_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "rejected_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "complained_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "InvoicePrint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "InvoiceRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": "integer"
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "shopify_customer_id": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {}
              }
            }
          },
          "financial_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "order_placed_at": {
                "type": "string"
              },
              "issued_on": {
                "type": "string"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fulfilled_on": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "totals": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "taxes_included": {
                "type": "boolean"
              },
              "subtotal": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "duties": {
                "type": "string"
              },
              "total": {
                "type": "string"
              },
              "total_paid": {
                "type": "string"
              },
              "total_refunded": {
                "type": "string"
              },
              "total_due": {
                "type": "string"
              }
            }
          },
          "billing_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "zip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "variant_title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "product_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "discounted_unit_price": {
                  "type": "string"
                },
                "total_discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      }
                    }
                  }
                },
                "total": {
                  "type": "string"
                },
                "refunded_quantity": {
                  "type": "integer"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "properties": {
                  "type": "array",
                  "items": {}
                },
                "note": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "shipping_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "discount": {
                  "type": "string"
                },
                "tax": {
                  "type": "string"
                },
                "tax_lines": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "rate": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "rate": {
                  "type": "string"
                },
                "amount": {
                  "type": "string"
                }
              }
            }
          },
          "discount_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note_attributes": {
                "type": "array",
                "items": {}
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {}
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "tracking": {
            "type": "object",
            "properties": {
              "companies": {
                "type": [
                  "array",
                  "null"
                ]
              },
              "numbers": {
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "e_invoice": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "requested": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "InvoiceRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": "integer"
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "financial_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "Order": {
        "type": "object",
        "properties": {
          "shopify_order_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "processed_at": {
            "type": "string"
          },
          "financial_status": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "shopify_customer_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_address": {
                "type": [
                  "object",
                  "null"
                ]
              }
            }
          },
          "invoice": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "sent_at": {
                "type": "string"
              },
              "printed_at": {
                "type": "string"
              },
              "downloaded_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reminder_sent_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "e_invoice": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "error": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "requested": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": "string"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "totals": {
            "type": "object",
            "properties": {
              "subtotal": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "total": {
                "type": "string"
              }
            }
          },
          "shipping_method": {
            "type": "string"
          },
          "billing_address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "first_name": {
                "type": "string"
              },
              "last_name": {
                "type": "string"
              },
              "address1": {
                "type": "string"
              },
              "address2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "province": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "province_code": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "zip": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "shipping_address": {
            "type": [
              "object",
              "null"
            ]
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "variant_title": {
                  "type": "string"
                },
                "sku": {
                  "type": "string"
                },
                "barcode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "quantity": {
                  "type": "integer"
                },
                "unit_price": {
                  "type": "string"
                },
                "total": {
                  "type": "string"
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "selling_plan": {
                  "type": "null"
                },
                "product_id": {
                  "type": "string"
                },
                "variant_id": {
                  "type": "string"
                }
              }
            }
          },
          "tax_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "rate": {
                  "type": "number"
                },
                "amount": {
                  "type": "string"
                }
              }
            }
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "type": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                },
                "sent_at": {
                  "type": "string"
                },
                "printed_at": {
                  "type": "string"
                },
                "downloaded_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reminder_sent_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "paid_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pdf_ready": {
                  "type": "boolean"
                },
                "e_invoice": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requested": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "OrderRow": {
        "type": "object",
        "properties": {
          "shopify_order_id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "processed_at": {
            "type": "string"
          },
          "financial_status": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "customer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "invoice": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "sent_at": {
                "type": "string"
              },
              "printed_at": {
                "type": "string"
              },
              "downloaded_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reminder_sent_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "e_invoice": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "error": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "requested": {
                    "type": "boolean"
                  }
                }
              }
            }
          },
          "cursor": {
            "type": "string"
          }
        }
      },
      "OrderTroubleshoot": {
        "type": "object",
        "properties": {
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "order_number": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "financial_status": {
                "type": "string"
              },
              "fulfillment_status": {
                "type": "string"
              },
              "cancelled_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": "string"
              }
            }
          },
          "document": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "type": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "sent_at": {
                "type": "string"
              }
            }
          },
          "diagnosis": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "severity": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "fix": {
                  "type": "string"
                }
              }
            }
          },
          "verdict": {
            "type": "string"
          }
        }
      },
      "PackingSlip": {
        "type": "object",
        "properties": {
          "invoice_id": {
            "type": "integer"
          },
          "invoice_number": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "Quote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": "string"
              },
              "shopify_customer_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {}
              }
            }
          },
          "financial_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "shopify_draft_order_id": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "order_placed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "issued_on": {
                "type": "string"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fulfilled_on": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "totals": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "taxes_included": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "subtotal": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "duties": {
                "type": "string"
              },
              "total": {
                "type": "string"
              },
              "total_paid": {
                "type": "string"
              },
              "total_refunded": {
                "type": "string"
              },
              "total_due": {
                "type": "string"
              }
            }
          },
          "billing_address": {
            "type": [
              "object",
              "null"
            ]
          },
          "shipping_address": {
            "type": [
              "object",
              "null"
            ]
          },
          "line_items": {
            "type": "array",
            "items": {}
          },
          "shipping_lines": {
            "type": "array",
            "items": {}
          },
          "tax_lines": {
            "type": "array",
            "items": {}
          },
          "discount_codes": {
            "type": "array",
            "items": {}
          },
          "notes": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note_attributes": {
                "type": "array",
                "items": {}
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {}
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "tracking": {
            "type": "object",
            "properties": {
              "companies": {
                "type": [
                  "array",
                  "null"
                ]
              },
              "numbers": {
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "e_invoice": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "requested": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string"
          },
          "payment_url": {
            "type": "string"
          },
          "already_existed": {
            "type": "boolean"
          }
        }
      },
      "QuotePrint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "QuoteRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": "string"
              },
              "shopify_customer_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eori_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tags": {
                "type": "array",
                "items": {}
              }
            }
          },
          "financial_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "shopify_draft_order_id": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "dates": {
            "type": "object",
            "properties": {
              "order_placed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "issued_on": {
                "type": "string"
              },
              "due_on": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "tax_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fulfilled_on": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "po_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_terms": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_gateway": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "type": [
              "string",
              "null"
            ]
          },
          "totals": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string"
              },
              "taxes_included": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "subtotal": {
                "type": "string"
              },
              "discounts": {
                "type": "string"
              },
              "shipping": {
                "type": "string"
              },
              "tax": {
                "type": "string"
              },
              "duties": {
                "type": "string"
              },
              "total": {
                "type": "string"
              },
              "total_paid": {
                "type": "string"
              },
              "total_refunded": {
                "type": "string"
              },
              "total_due": {
                "type": "string"
              }
            }
          },
          "billing_address": {
            "type": [
              "object",
              "null"
            ]
          },
          "shipping_address": {
            "type": [
              "object",
              "null"
            ]
          },
          "line_items": {
            "type": "array",
            "items": {}
          },
          "shipping_lines": {
            "type": "array",
            "items": {}
          },
          "tax_lines": {
            "type": "array",
            "items": {}
          },
          "discount_codes": {
            "type": "array",
            "items": {}
          },
          "notes": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_note": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "note_attributes": {
                "type": "array",
                "items": {}
              }
            }
          },
          "custom_fields": {
            "type": "array",
            "items": {}
          },
          "tags": {
            "type": "array",
            "items": {}
          },
          "tracking": {
            "type": "object",
            "properties": {
              "companies": {
                "type": [
                  "array",
                  "null"
                ]
              },
              "numbers": {
                "type": [
                  "array",
                  "null"
                ]
              }
            }
          },
          "pdf": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "filename": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "generated_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "e_invoice": {
            "type": "object",
            "properties": {
              "status": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "requested": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "updated_at": {
            "type": "string"
          },
          "payment_url": {
            "type": "string"
          }
        }
      },
      "QuoteRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "document_type": {
            "type": "string"
          },
          "invoice_number": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "order": {
            "type": "object",
            "properties": {
              "shopify_order_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "number": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": "string"
              }
            }
          },
          "financial_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "total": {
            "type": "string"
          },
          "issued_on": {
            "type": "string"
          },
          "due_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "printed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "reminder_sent_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "paid": {
            "type": "boolean"
          },
          "edited": {
            "type": "boolean"
          },
          "trashed": {
            "type": "boolean"
          },
          "e_invoice_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "shopify_draft_order_id": {
            "type": "string"
          }
        }
      },
      "Sending": {
        "type": "object",
        "properties": {
          "from": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string"
              },
              "verified": {
                "type": "boolean"
              },
              "in_use": {
                "type": "boolean"
              }
            }
          },
          "copies": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "to": {
                "type": "string"
              },
              "customer_metafield": {
                "type": "string"
              },
              "to_addresses": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "status": {
            "type": "object",
            "properties": {
              "sending_allowed": {
                "type": "boolean"
              },
              "unlimited_sending": {
                "type": "string"
              }
            }
          }
        }
      },
      "Setup": {
        "type": "object",
        "properties": {
          "store": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "country_code": {
                "type": "string"
              },
              "currency": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              }
            }
          },
          "plan_name": {
            "type": "string"
          },
          "installed_at": {
            "type": "string"
          },
          "onboarded": {
            "type": "boolean"
          },
          "onboarded_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "interface": {
            "type": "string"
          },
          "migrated_from": {
            "type": [
              "string",
              "null"
            ]
          },
          "checklist": {
            "type": "object",
            "properties": {
              "dismissed": {
                "type": "boolean"
              },
              "steps": {
                "type": "object",
                "properties": {
                  "template_design": {
                    "type": "boolean"
                  },
                  "visual_editor": {
                    "type": "boolean"
                  },
                  "first_document": {
                    "type": "boolean"
                  },
                  "automatic_invoicing": {
                    "type": "boolean"
                  }
                }
              },
              "completed_count": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              },
              "visual_editor_template_id": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          }
        }
      },
      "Template": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "design": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "default_for": {
            "type": "object",
            "properties": {
              "orders": {
                "type": "boolean"
              },
              "draft_orders": {
                "type": "boolean"
              },
              "pos_orders": {
                "type": "boolean"
              },
              "credit_notes": {
                "type": "boolean"
              }
            }
          },
          "logo": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "width": {
                "type": "integer"
              },
              "lock_aspect_ratio": {
                "type": "boolean"
              }
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "style": {
            "type": "object",
            "properties": {
              "accent_color": {
                "type": "string"
              },
              "font_family": {
                "type": "string"
              },
              "font_size": {
                "type": "integer"
              },
              "date_format": {
                "type": "string"
              }
            }
          },
          "numbering": {
            "type": "object",
            "properties": {
              "prefix": {
                "type": "string"
              },
              "next_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "use_order_number": {
                "type": "boolean"
              },
              "credit_notes_use_order_number": {
                "type": "boolean"
              },
              "sequential_numbering_available": {
                "type": "boolean"
              }
            }
          },
          "sections": {
            "type": "object",
            "properties": {
              "order_information": {
                "type": "object",
                "properties": {
                  "show_invoice_number": {
                    "type": "boolean"
                  },
                  "show_custom_invoice_number": {
                    "type": "boolean"
                  },
                  "show_order_number": {
                    "type": "boolean"
                  },
                  "show_po_number": {
                    "type": "boolean"
                  },
                  "show_delivery_note_number": {
                    "type": "boolean"
                  },
                  "show_order_date": {
                    "type": "boolean"
                  },
                  "show_issue_date": {
                    "type": "boolean"
                  },
                  "show_due_date": {
                    "type": "boolean"
                  },
                  "show_fulfillment_date": {
                    "type": "boolean"
                  },
                  "show_payment_terms": {
                    "type": "boolean"
                  },
                  "show_order_amount": {
                    "type": "boolean"
                  },
                  "show_order_tags": {
                    "type": "boolean"
                  },
                  "show_barcode": {
                    "type": "boolean"
                  },
                  "show_order_barcode": {
                    "type": "boolean"
                  }
                }
              },
              "payment_information": {
                "type": "object",
                "properties": {
                  "show_payment_address": {
                    "type": "boolean"
                  },
                  "show_payment_method": {
                    "type": "boolean"
                  },
                  "show_payment_breakdown": {
                    "type": "boolean"
                  },
                  "show_credit_card": {
                    "type": "boolean"
                  },
                  "show_financial_status": {
                    "type": "boolean"
                  },
                  "show_discount_code": {
                    "type": "boolean"
                  },
                  "show_tax_date": {
                    "type": "boolean"
                  },
                  "show_tracking_company": {
                    "type": "boolean"
                  },
                  "show_tracking_numbers": {
                    "type": "boolean"
                  },
                  "show_paid_by_customer": {
                    "type": "boolean"
                  }
                }
              },
              "shipping_information": {
                "type": "object",
                "properties": {
                  "show_shipping_address": {
                    "type": "boolean"
                  }
                }
              },
              "customer_information": {
                "type": "object",
                "properties": {
                  "show_customer_email": {
                    "type": "boolean"
                  },
                  "show_customer_phone": {
                    "type": "boolean"
                  },
                  "show_customer_note": {
                    "type": "boolean"
                  },
                  "show_localized_tax_id": {
                    "type": "boolean"
                  },
                  "localized_tax_id_string": {
                    "type": "string"
                  }
                }
              },
              "items": {
                "type": "object",
                "properties": {
                  "show_product_images": {
                    "type": "boolean"
                  },
                  "show_sku": {
                    "type": "boolean"
                  },
                  "show_hs_code": {
                    "type": "boolean"
                  },
                  "show_product_weight": {
                    "type": "boolean"
                  },
                  "show_total_product_weight": {
                    "type": "boolean"
                  },
                  "show_country_of_origin": {
                    "type": "boolean"
                  },
                  "show_product_type": {
                    "type": "boolean"
                  },
                  "show_product_description": {
                    "type": "boolean"
                  },
                  "show_note_attributes": {
                    "type": "boolean"
                  },
                  "show_variants": {
                    "type": "boolean"
                  },
                  "show_selling_plan": {
                    "type": "boolean"
                  },
                  "show_item_discount": {
                    "type": "boolean"
                  },
                  "show_discount_reason": {
                    "type": "boolean"
                  },
                  "show_compare_at_price": {
                    "type": "boolean"
                  },
                  "show_original_price": {
                    "type": "boolean"
                  },
                  "show_properties": {
                    "type": "boolean"
                  },
                  "show_item_barcode": {
                    "type": "boolean"
                  },
                  "show_total_qty": {
                    "type": "boolean"
                  },
                  "show_item_tax": {
                    "type": "boolean"
                  },
                  "show_item_tax_amount": {
                    "type": "boolean"
                  },
                  "group_amount_digits": {
                    "type": "boolean"
                  }
                }
              },
              "order_total": {
                "type": "object",
                "properties": {
                  "show_subtotal": {
                    "type": "boolean"
                  },
                  "show_order_discount": {
                    "type": "boolean"
                  },
                  "show_order_discount_reason": {
                    "type": "boolean"
                  },
                  "show_discount_breakdown": {
                    "type": "boolean"
                  },
                  "show_tax": {
                    "type": "boolean"
                  },
                  "show_tax_inclusion_label": {
                    "type": "boolean"
                  },
                  "show_tax_breakdown": {
                    "type": "boolean"
                  },
                  "show_shipping": {
                    "type": "boolean"
                  },
                  "show_discounts": {
                    "type": "boolean"
                  },
                  "show_shipping_rate_name": {
                    "type": "boolean"
                  },
                  "show_amount_in_words": {
                    "type": "boolean"
                  },
                  "show_total_weight": {
                    "type": "boolean"
                  },
                  "show_refund_amount": {
                    "type": "boolean"
                  },
                  "show_refund_reason": {
                    "type": "boolean"
                  },
                  "show_payment_link": {
                    "type": "boolean"
                  },
                  "show_balance": {
                    "type": "boolean"
                  }
                }
              },
              "extra": {
                "type": "object",
                "properties": {
                  "show_order_notes": {
                    "type": "boolean"
                  },
                  "show_footer_notes": {
                    "type": "boolean"
                  },
                  "footer_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "show_store_domain": {
                    "type": "boolean"
                  },
                  "store_domain_text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "show_paid_unpaid_watermark": {
                    "type": "boolean"
                  }
                }
              },
              "social": {
                "type": "object",
                "properties": {
                  "show_social_page": {
                    "type": "boolean"
                  },
                  "facebook_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "instagram_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "twitter_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          },
          "label_overrides": {
            "type": "object",
            "properties": {}
          },
          "content_translations": {
            "type": "object",
            "properties": {}
          },
          "liquid_code": {
            "type": "string"
          }
        }
      },
      "TemplateDelete": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "TemplateRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "design": {
            "type": [
              "object",
              "null"
            ]
          },
          "default_for": {
            "type": "object",
            "properties": {
              "orders": {
                "type": "boolean"
              },
              "draft_orders": {
                "type": "boolean"
              },
              "pos_orders": {
                "type": "boolean"
              },
              "credit_notes": {
                "type": "boolean"
              }
            }
          },
          "logo": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "width": {
                "type": "integer"
              },
              "lock_aspect_ratio": {
                "type": "boolean"
              }
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        }
      },
      "Version": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "event": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "changed_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "changes": {
            "type": "object",
            "properties": {
              "accent_color": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string"
                  },
                  "to": {
                    "type": "string"
                  }
                }
              },
              "show_sku": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "boolean"
                  },
                  "to": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      },
      "VersionRestore": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "document_type": {
            "type": "string"
          },
          "design": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "default_for": {
            "type": "object",
            "properties": {
              "orders": {
                "type": "boolean"
              },
              "draft_orders": {
                "type": "boolean"
              },
              "pos_orders": {
                "type": "boolean"
              },
              "credit_notes": {
                "type": "boolean"
              }
            }
          },
          "logo": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "width": {
                "type": "integer"
              },
              "lock_aspect_ratio": {
                "type": "boolean"
              }
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "style": {
            "type": "object",
            "properties": {
              "accent_color": {
                "type": "string"
              },
              "font_family": {
                "type": "string"
              },
              "font_size": {
                "type": "integer"
              },
              "date_format": {
                "type": "string"
              }
            }
          },
          "numbering": {
            "type": "object",
            "properties": {
              "prefix": {
                "type": "string"
              },
              "next_number": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "use_order_number": {
                "type": "boolean"
              },
              "credit_notes_use_order_number": {
                "type": "boolean"
              },
              "sequential_numbering_available": {
                "type": "boolean"
              }
            }
          },
          "sections": {
            "type": "object",
            "properties": {
              "order_information": {
                "type": "object",
                "properties": {
                  "show_invoice_number": {
                    "type": "boolean"
                  },
                  "show_custom_invoice_number": {
                    "type": "boolean"
                  },
                  "show_order_number": {
                    "type": "boolean"
                  },
                  "show_po_number": {
                    "type": "boolean"
                  },
                  "show_delivery_note_number": {
                    "type": "boolean"
                  },
                  "show_order_date": {
                    "type": "boolean"
                  },
                  "show_issue_date": {
                    "type": "boolean"
                  },
                  "show_due_date": {
                    "type": "boolean"
                  },
                  "show_fulfillment_date": {
                    "type": "boolean"
                  },
                  "show_payment_terms": {
                    "type": "boolean"
                  },
                  "show_order_amount": {
                    "type": "boolean"
                  },
                  "show_order_tags": {
                    "type": "boolean"
                  },
                  "show_barcode": {
                    "type": "boolean"
                  },
                  "show_order_barcode": {
                    "type": "boolean"
                  }
                }
              },
              "payment_information": {
                "type": "object",
                "properties": {
                  "show_payment_address": {
                    "type": "boolean"
                  },
                  "show_payment_method": {
                    "type": "boolean"
                  },
                  "show_payment_breakdown": {
                    "type": "boolean"
                  },
                  "show_credit_card": {
                    "type": "boolean"
                  },
                  "show_financial_status": {
                    "type": "boolean"
                  },
                  "show_discount_code": {
                    "type": "boolean"
                  },
                  "show_tax_date": {
                    "type": "boolean"
                  },
                  "show_tracking_company": {
                    "type": "boolean"
                  },
                  "show_tracking_numbers": {
                    "type": "boolean"
                  },
                  "show_paid_by_customer": {
                    "type": "boolean"
                  }
                }
              },
              "shipping_information": {
                "type": "object",
                "properties": {
                  "show_shipping_address": {
                    "type": "boolean"
                  }
                }
              },
              "customer_information": {
                "type": "object",
                "properties": {
                  "show_customer_email": {
                    "type": "boolean"
                  },
                  "show_customer_phone": {
                    "type": "boolean"
                  },
                  "show_customer_note": {
                    "type": "boolean"
                  },
                  "show_localized_tax_id": {
                    "type": "boolean"
                  },
                  "localized_tax_id_string": {
                    "type": "string"
                  }
                }
              },
              "items": {
                "type": "object",
                "properties": {
                  "show_product_images": {
                    "type": "boolean"
                  },
                  "show_sku": {
                    "type": "boolean"
                  },
                  "show_hs_code": {
                    "type": "boolean"
                  },
                  "show_product_weight": {
                    "type": "boolean"
                  },
                  "show_total_product_weight": {
                    "type": "boolean"
                  },
                  "show_country_of_origin": {
                    "type": "boolean"
                  },
                  "show_product_type": {
                    "type": "boolean"
                  },
                  "show_product_description": {
                    "type": "boolean"
                  },
                  "show_note_attributes": {
                    "type": "boolean"
                  },
                  "show_variants": {
                    "type": "boolean"
                  },
                  "show_selling_plan": {
                    "type": "boolean"
                  },
                  "show_item_discount": {
                    "type": "boolean"
                  },
                  "show_discount_reason": {
                    "type": "boolean"
                  },
                  "show_compare_at_price": {
                    "type": "boolean"
                  },
                  "show_original_price": {
                    "type": "boolean"
                  },
                  "show_properties": {
                    "type": "boolean"
                  },
                  "show_item_barcode": {
                    "type": "boolean"
                  },
                  "show_total_qty": {
                    "type": "boolean"
                  },
                  "show_item_tax": {
                    "type": "boolean"
                  },
                  "show_item_tax_amount": {
                    "type": "boolean"
                  },
                  "group_amount_digits": {
                    "type": "boolean"
                  }
                }
              },
              "order_total": {
                "type": "object",
                "properties": {
                  "show_subtotal": {
                    "type": "boolean"
                  },
                  "show_order_discount": {
                    "type": "boolean"
                  },
                  "show_order_discount_reason": {
                    "type": "boolean"
                  },
                  "show_discount_breakdown": {
                    "type": "boolean"
                  },
                  "show_tax": {
                    "type": "boolean"
                  },
                  "show_tax_inclusion_label": {
                    "type": "boolean"
                  },
                  "show_tax_breakdown": {
                    "type": "boolean"
                  },
                  "show_shipping": {
                    "type": "boolean"
                  },
                  "show_discounts": {
                    "type": "boolean"
                  },
                  "show_shipping_rate_name": {
                    "type": "boolean"
                  },
                  "show_amount_in_words": {
                    "type": "boolean"
                  },
                  "show_total_weight": {
                    "type": "boolean"
                  },
                  "show_refund_amount": {
                    "type": "boolean"
                  },
                  "show_refund_reason": {
                    "type": "boolean"
                  },
                  "show_payment_link": {
                    "type": "boolean"
                  },
                  "show_balance": {
                    "type": "boolean"
                  }
                }
              },
              "extra": {
                "type": "object",
                "properties": {
                  "show_order_notes": {
                    "type": "boolean"
                  },
                  "show_footer_notes": {
                    "type": "boolean"
                  },
                  "footer_message": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "show_store_domain": {
                    "type": "boolean"
                  },
                  "store_domain_text": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "show_paid_unpaid_watermark": {
                    "type": "boolean"
                  }
                }
              },
              "social": {
                "type": "object",
                "properties": {
                  "show_social_page": {
                    "type": "boolean"
                  },
                  "facebook_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "instagram_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "twitter_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            }
          },
          "label_overrides": {
            "type": "object",
            "properties": {}
          },
          "content_translations": {
            "type": "object",
            "properties": {}
          },
          "liquid_code": {
            "type": "string"
          }
        }
      },
      "VersionRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "event": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "changed_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "The envelope every failed request returns.",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "code": {
            "type": "string",
            "description": "Machine-readable reason, when there is one: `unauthorized`, `v3_required`, `paid_plan_required`, `not_found`, `unmapped_settings`, `rate_limited`."
          },
          "retry_after": {
            "type": "integer",
            "description": "Seconds to wait, on 429."
          }
        },
        "example": {
          "errors": [
            "Invoice not found"
          ],
          "code": "not_found"
        }
      },
      "Page": {
        "type": "object",
        "description": "Offset paging of a list (`page`, `per_page` query params).",
        "required": [
          "number",
          "size",
          "total",
          "total_pages"
        ],
        "properties": {
          "number": {
            "type": "integer",
            "description": "1-based page number."
          },
          "size": {
            "type": "integer",
            "description": "Rows per page, max 100."
          },
          "total": {
            "type": "integer",
            "description": "Rows across all pages."
          },
          "total_pages": {
            "type": "integer"
          }
        }
      },
      "CursorPage": {
        "type": "object",
        "description": "Cursor paging of a Shopify-backed list: pass `end_cursor` as `after` for the next page.",
        "required": [
          "size",
          "has_next_page",
          "has_previous_page"
        ],
        "properties": {
          "size": {
            "type": "integer"
          },
          "has_next_page": {
            "type": "boolean"
          },
          "has_previous_page": {
            "type": "boolean"
          },
          "start_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or unknown `X-Auth-Token`, or the shop uninstalled the app.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "Invalid API key"
              ],
              "code": "unauthorized"
            }
          }
        }
      },
      "Forbidden": {
        "description": "`v3_required`: the shop still runs the previous dashboard. `paid_plan_required`: API access needs a paid plan.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "API access requires a paid plan"
              ],
              "code": "paid_plan_required"
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource does not exist for this shop, or no action is registered at this path.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "Resource not found"
              ],
              "code": "not_found"
            }
          }
        }
      },
      "Conflict": {
        "description": "The request conflicts with the current state (an issued invoice is locked, the next invoice number moved, a template is still in use, a job already finished). Nothing was changed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "This shop keeps issued invoices unchanged, so this invoice cannot be edited."
              ],
              "code": "invoice_locked"
            }
          }
        }
      },
      "ValidationError": {
        "description": "The request failed validation. Nothing was saved.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "id is missing"
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limited: cost-weighted per key (reads cost less than writes). Wait `Retry-After` seconds; see `X-RateLimit-*` headers.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "Rate limit exceeded"
              ],
              "code": "rate_limited"
            }
          }
        }
      },
      "BadGateway": {
        "description": "Shopify did not answer or returned an error (`shopify_error`). Retry later.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "errors": [
                "Shopify did not return the orders: no response"
              ],
              "code": "shopify_error"
            }
          }
        }
      }
    }
  }
}
