{
  "openapi": "3.1.0",
  "info": {
    "title": "Take App Merchant API V2",
    "version": "2.0.0",
    "description": "Authenticated Merchant API for stores. All money values are integers in the smallest currency unit (e.g. cents)."
  },
  "servers": [
    {
      "url": "https://take.app"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Merchant API V2 token. Pass as `Authorization: Bearer <token>`."
      }
    },
    "schemas": {
      "Address": {
        "type": "object",
        "properties": {
          "address1": {
            "type": [
              "string",
              "null"
            ]
          },
          "address2": {
            "type": [
              "string",
              "null"
            ]
          },
          "district": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "zip": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "address1",
          "address2",
          "district",
          "city",
          "state",
          "zip",
          "country",
          "latitude",
          "longitude"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "invalid_request_error",
                  "authentication_error",
                  "permission_error",
                  "not_found_error",
                  "rate_limit_error",
                  "api_error"
                ]
              },
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "code",
              "message",
              "request_id"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Store": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "store"
            ]
          },
          "name": {
            "type": "string"
          },
          "alias": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "description": "International phone number, digits only, no leading \"+\"."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "country": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "tax": {
            "type": "object",
            "properties": {
              "inclusive": {
                "type": "boolean"
              },
              "percent": {
                "type": "number"
              }
            },
            "required": [
              "inclusive",
              "percent"
            ]
          },
          "service_charge": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "rate": {
                "type": "integer"
              },
              "amount": {
                "type": "integer",
                "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
              }
            },
            "required": [
              "name",
              "rate",
              "amount"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "name",
          "alias",
          "phone",
          "email",
          "country",
          "currency",
          "timezone",
          "address",
          "tax",
          "service_charge"
        ]
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "customer"
            ]
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "phone": {
            "type": "string",
            "description": "International phone number, digits only, no leading \"+\"."
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "object",
          "name",
          "email",
          "phone",
          "address",
          "created_at",
          "updated_at"
        ]
      },
      "CustomerCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "phone": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "name",
          "phone"
        ]
      },
      "CustomerUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "phone": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          }
        }
      },
      "CustomerList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Customer"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "InventoryItem": {
        "type": "object",
        "properties": {
          "item_id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "inventory_item"
            ]
          },
          "item_type": {
            "type": "string",
            "enum": [
              "product",
              "variant"
            ]
          },
          "item_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_id": {
            "type": "string"
          },
          "variant_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "integer"
          },
          "price": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "cost": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "cost_enabled": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "item_id",
          "object",
          "item_type",
          "item_name",
          "product_id",
          "variant_id",
          "sku",
          "quantity",
          "price",
          "original_price",
          "cost",
          "cost_enabled",
          "updated_at"
        ]
      },
      "InventoryItemUpdate": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "quantity": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "quantity"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "delta_quantity": {
                "type": "integer"
              }
            },
            "required": [
              "delta_quantity"
            ],
            "additionalProperties": false
          }
        ]
      },
      "InventoryBatchUpdate": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "quantity": {
                  "type": "integer",
                  "minimum": 0
                },
                "item_id": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "quantity",
                "item_id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "delta_quantity": {
                  "type": "integer"
                },
                "item_id": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "delta_quantity",
                "item_id"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "ProductOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "product_option"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "OPTION_TEXT",
              "OPTION_NUMBER",
              "OPTION_DATE",
              "OPTION_CHECKBOX",
              "OPTION_SELECTION",
              "OPTION_MEDIA"
            ]
          },
          "text": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "settings": {}
        },
        "required": [
          "id",
          "object",
          "type",
          "text",
          "required"
        ]
      },
      "Variant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "variant"
            ]
          },
          "product_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "original_price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "cost": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "weight": {
            "type": "integer"
          },
          "inventory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InventoryItem"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "product_id",
          "name",
          "sku",
          "description",
          "price",
          "original_price",
          "cost",
          "weight",
          "inventory"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "product"
            ]
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "VISIBLE",
              "HIDDEN"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "PHYSICAL",
              "DIGITAL",
              "SUBSCRIPTION",
              "BOOKING",
              "OTHERS"
            ]
          },
          "price": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "original_price": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "cost_enabled": {
            "type": "boolean"
          },
          "cost": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "unit_enabled": {
            "type": "boolean"
          },
          "unit": {
            "type": "string",
            "enum": [
              "QTY",
              "KG",
              "G",
              "ML",
              "L",
              "PCS",
              "PAX",
              "PACK",
              "PERSON",
              "ROOM",
              "LBS",
              "HOUR",
              "BOX"
            ]
          },
          "unit_value": {
            "type": "number"
          },
          "weight": {
            "type": "integer"
          },
          "tax_override": {
            "type": "boolean"
          },
          "tax_rate": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "daily_limit": {
            "type": "integer"
          },
          "cart_limit": {
            "type": "integer"
          },
          "cart_minimum": {
            "type": "integer"
          },
          "inventory_enabled": {
            "type": "boolean"
          },
          "soldout": {
            "type": "boolean"
          },
          "inventory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/InventoryItem"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Variant"
            }
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductOption"
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "object",
          "reference_id",
          "name",
          "description",
          "sku",
          "status",
          "type",
          "price",
          "original_price",
          "cost_enabled",
          "cost",
          "unit_enabled",
          "unit",
          "unit_value",
          "weight",
          "tax_override",
          "tax_rate",
          "tags",
          "links",
          "daily_limit",
          "cart_limit",
          "cart_minimum",
          "inventory_enabled",
          "soldout",
          "inventory",
          "variants",
          "options",
          "images",
          "created_at",
          "updated_at"
        ]
      },
      "ProductCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "reference_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "VISIBLE",
              "HIDDEN"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "PHYSICAL",
              "DIGITAL",
              "SUBSCRIPTION",
              "BOOKING",
              "OTHERS"
            ]
          },
          "price": {
            "type": "integer",
            "minimum": 0
          },
          "original_price": {
            "type": "integer",
            "minimum": 0
          },
          "cost_enabled": {
            "type": "boolean"
          },
          "cost": {
            "type": "integer",
            "minimum": 0
          },
          "unit_enabled": {
            "type": "boolean"
          },
          "unit": {
            "type": "string",
            "enum": [
              "QTY",
              "KG",
              "G",
              "ML",
              "L",
              "PCS",
              "PAX",
              "PACK",
              "PERSON",
              "ROOM",
              "LBS",
              "HOUR",
              "BOX"
            ]
          },
          "unit_value": {
            "type": "number"
          },
          "weight": {
            "type": "integer"
          },
          "tax_override": {
            "type": "boolean"
          },
          "tax_rate": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^https?:\\/\\//i"
            }
          },
          "daily_limit": {
            "type": "integer"
          },
          "cart_limit": {
            "type": "integer"
          },
          "cart_minimum": {
            "type": "integer"
          },
          "inventory_enabled": {
            "type": "boolean"
          },
          "inventory_quantity": {
            "type": "integer",
            "minimum": 0
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "sku": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "price": {
                  "type": "integer",
                  "minimum": 0
                },
                "original_price": {
                  "type": "integer",
                  "minimum": 0
                },
                "cost": {
                  "type": "integer",
                  "minimum": 0
                },
                "weight": {
                  "type": "integer"
                },
                "inventory_quantity": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "name",
                "price"
              ]
            }
          },
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "OPTION_TEXT",
                    "OPTION_NUMBER",
                    "OPTION_DATE",
                    "OPTION_CHECKBOX",
                    "OPTION_SELECTION",
                    "OPTION_MEDIA"
                  ]
                },
                "text": {
                  "type": "string",
                  "minLength": 1
                },
                "required": {
                  "type": "boolean"
                },
                "settings": {}
              },
              "required": [
                "type",
                "text"
              ]
            }
          }
        },
        "required": [
          "name",
          "price"
        ]
      },
      "ProductUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          },
          "reference_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "VISIBLE",
              "HIDDEN"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "PHYSICAL",
              "DIGITAL",
              "SUBSCRIPTION",
              "BOOKING",
              "OTHERS"
            ]
          },
          "price": {
            "type": "integer",
            "minimum": 0
          },
          "original_price": {
            "type": "integer",
            "minimum": 0
          },
          "cost_enabled": {
            "type": "boolean"
          },
          "cost": {
            "type": "integer",
            "minimum": 0
          },
          "unit_enabled": {
            "type": "boolean"
          },
          "unit": {
            "type": "string",
            "enum": [
              "QTY",
              "KG",
              "G",
              "ML",
              "L",
              "PCS",
              "PAX",
              "PACK",
              "PERSON",
              "ROOM",
              "LBS",
              "HOUR",
              "BOX"
            ]
          },
          "unit_value": {
            "type": "number"
          },
          "weight": {
            "type": "integer"
          },
          "tax_override": {
            "type": "boolean"
          },
          "tax_rate": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^https?:\\/\\//i"
            }
          },
          "daily_limit": {
            "type": "integer"
          },
          "cart_limit": {
            "type": "integer"
          },
          "cart_minimum": {
            "type": "integer"
          },
          "inventory_enabled": {
            "type": "boolean"
          },
          "inventory_quantity": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "ProductList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "OrderLineItemOption": {
        "type": "object",
        "properties": {
          "question_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "question_text": {
            "type": "string"
          },
          "question_type": {
            "type": "string"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prices": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
            }
          },
          "quantities": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Quantity chosen for each answer, in the same order as `answers`. 1 when the option has no quantity selector."
          },
          "option_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "image_urls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "question_id",
          "question_text",
          "question_type",
          "answers",
          "prices",
          "quantities",
          "option_ids",
          "text",
          "image_urls"
        ]
      },
      "OrderLineItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "order_line_item"
            ]
          },
          "product_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "variant_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "integer"
          },
          "quantity_float": {
            "type": "number"
          },
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit_value": {
            "type": [
              "number",
              "null"
            ]
          },
          "price": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "total_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineItemOption"
            }
          },
          "image_urls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "object",
          "product_id",
          "variant_id",
          "name",
          "sku",
          "quantity",
          "quantity_float",
          "unit",
          "unit_value",
          "price",
          "total_amount",
          "options",
          "image_urls"
        ]
      },
      "OrderAnswer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "order_answer"
            ]
          },
          "question_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "question_text": {
            "type": "string"
          },
          "question_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "QUESTION_TEXT",
              "QUESTION_DATE",
              "QUESTION_TIME",
              "QUESTION_NOTE",
              "QUESTION_IMAGE",
              "QUESTION_UPLOAD",
              "QUESTION_LOCATION",
              "QUESTION_SELECTION",
              "QUESTION_CHECKBOX",
              "QUESTION_SERVICE",
              null
            ]
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prices": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
            }
          },
          "option_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "image_urls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "object",
          "question_id",
          "question_text",
          "question_type",
          "answers",
          "prices",
          "option_ids",
          "image_urls"
        ]
      },
      "OrderService": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "distance": {
            "type": [
              "number",
              "null"
            ]
          },
          "distance_unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          }
        },
        "required": [
          "title",
          "name",
          "price",
          "distance",
          "distance_unit",
          "location"
        ]
      },
      "OrderSchedule": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "time_end": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "date",
          "time",
          "time_end",
          "timezone"
        ]
      },
      "OrderDiscount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "amount",
          "type"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "order"
            ]
          },
          "number": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "store": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "alias": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "alias"
            ]
          },
          "order_status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "confirmed",
              "completed",
              "cancelled"
            ]
          },
          "payment_status": {
            "type": "string",
            "enum": [
              "pending",
              "confirming",
              "partial",
              "paid",
              "refunded",
              "voided"
            ]
          },
          "payment_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "fulfillment_status": {
            "type": "string",
            "enum": [
              "unfulfilled",
              "ready",
              "in_transit",
              "out_for_delivery",
              "fulfilled",
              "partially_fulfilled"
            ]
          },
          "remark": {
            "type": [
              "string",
              "null"
            ]
          },
          "internal_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLineItem"
            }
          },
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderAnswer"
            }
          },
          "discounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderDiscount"
            }
          },
          "service": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderService"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "schedule": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderSchedule"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "items_quantity": {
            "type": "integer"
          },
          "items_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "answers_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "discounts_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "service_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "service_charge_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "tip_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "adjustment_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "total_before_tax": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "tax_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "total_amount": {
            "type": "integer",
            "description": "Integer amount in the smallest unit of the store currency (e.g. cents)."
          },
          "currency": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "object",
          "number",
          "name",
          "store",
          "order_status",
          "payment_status",
          "payment_method",
          "fulfillment_status",
          "remark",
          "internal_note",
          "customer",
          "line_items",
          "answers",
          "discounts",
          "service",
          "schedule",
          "items_quantity",
          "items_amount",
          "answers_amount",
          "discounts_amount",
          "service_amount",
          "service_charge_amount",
          "tip_amount",
          "adjustment_amount",
          "total_before_tax",
          "tax_amount",
          "total_amount",
          "currency",
          "created_at",
          "updated_at"
        ]
      },
      "OrderCreate": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "phone": {
                "type": "string",
                "minLength": 1
              },
              "email": {
                "type": "string",
                "format": "email"
              }
            },
            "required": [
              "name",
              "phone"
            ]
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string"
                },
                "variant_id": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 1
                }
              },
              "required": [
                "product_id"
              ]
            },
            "default": []
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question_id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "answers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "option_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "prices": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "question_id"
              ]
            }
          },
          "remark": {
            "type": "string"
          },
          "schedule": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date-time"
              },
              "time": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "total_amount": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "customer",
          "total_amount"
        ]
      },
      "OrderUpdate": {
        "type": "object",
        "properties": {
          "order_status": {
            "type": "string",
            "enum": [
              "draft",
              "pending",
              "confirmed",
              "completed",
              "cancelled"
            ]
          },
          "payment_status": {
            "type": "string",
            "enum": [
              "pending",
              "confirming",
              "partial",
              "paid",
              "refunded",
              "voided"
            ]
          },
          "payment_method": {
            "type": "string"
          },
          "fulfillment_status": {
            "type": "string",
            "enum": [
              "unfulfilled",
              "ready",
              "in_transit",
              "out_for_delivery",
              "fulfilled",
              "partially_fulfilled"
            ]
          },
          "remark": {
            "type": [
              "string",
              "null"
            ]
          },
          "internal_note": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OrderList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "OrderSearchList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "InventoryItemList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryItem"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "MessageCreate": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1,
            "description": "Recipient phone number, digits only, no leading \"+\"."
          },
          "template": {
            "type": "string",
            "minLength": 1,
            "description": "Name of an approved broadcast template to send."
          },
          "language": {
            "type": "string",
            "description": "Template language code (e.g. \"en\"). Defaults to the template language."
          },
          "parameters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Named body variable values, e.g. { \"customer_name\": \"John\" }."
          }
        },
        "required": [
          "to",
          "template"
        ]
      },
      "Message": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "message"
            ]
          },
          "to": {
            "type": "string",
            "description": "International phone number, digits only, no leading \"+\"."
          },
          "template": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "sent"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "to",
          "template",
          "status"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/api/v2/me": {
      "get": {
        "operationId": "getMe",
        "summary": "Get the authenticated store",
        "tags": [
          "Me"
        ],
        "responses": {
          "200": {
            "description": "Store",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Store"
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/customers": {
      "get": {
        "operationId": "listCustomers",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updated_after",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of customers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createCustomer",
        "tags": [
          "Customers"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/customers/{customer_id}": {
      "get": {
        "operationId": "getCustomer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "customer_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateCustomer",
        "tags": [
          "Customers"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "customer_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/products": {
      "get": {
        "operationId": "listProducts",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updated_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "VISIBLE",
                "HIDDEN"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of products",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProduct",
        "tags": [
          "Products"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/products/{product_id}": {
      "get": {
        "operationId": "getProduct",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "product_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateProduct",
        "tags": [
          "Products"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "product_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders": {
      "get": {
        "operationId": "listOrders",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "created_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updated_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updated_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "pending",
                "confirmed",
                "completed",
                "cancelled"
              ]
            },
            "required": false,
            "name": "order_status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "confirming",
                "partial",
                "paid",
                "refunded",
                "voided"
              ]
            },
            "required": false,
            "name": "payment_status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "unfulfilled",
                "ready",
                "in_transit",
                "out_for_delivery",
                "fulfilled",
                "partially_fulfilled"
              ]
            },
            "required": false,
            "name": "fulfillment_status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of orders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createOrder",
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders/search": {
      "get": {
        "operationId": "searchOrders",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Merchant-facing order number. Prefixes and suffixes are ignored."
            },
            "required": true,
            "description": "Merchant-facing order number. Prefixes and suffixes are ignored.",
            "name": "order_number",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching orders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSearchList"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/orders/{order_id}": {
      "get": {
        "operationId": "getOrder",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "order_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateOrder",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "order_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/inventory_items": {
      "get": {
        "operationId": "listInventoryItems",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updated_after",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of inventory items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryItemList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/inventory_items/{item_id}": {
      "patch": {
        "operationId": "updateInventoryItem",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "item_id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryItemUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "InventoryItem",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryItem"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/inventory_items/batch_update": {
      "post": {
        "operationId": "batchUpdateInventory",
        "tags": [
          "Inventory"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryBatchUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated inventory items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryItem"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/messages": {
      "post": {
        "operationId": "sendMessage",
        "summary": "Send a message",
        "description": "Sends a single WhatsApp message using one of the store's approved broadcast templates. Map the template body variables via the named `parameters` object.",
        "tags": [
          "Messages"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MessageCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}