{
  "openapi": "3.0.1",
  "info": {
    "title": "Voucherify API - Management",
    "version": "v2018-08-01",
    "description": "Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.",
    "contact": {
      "name": "Voucherify Team",
      "url": "https://www.voucherify.io/contact-support",
      "email": "support@voucherify.io"
    },
    "termsOfService": "https://www.voucherify.io/legal/subscription-agreement",
    "license": {
      "name": "MIT",
      "url": "https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE"
    }
  },
  "servers": [
    {
      "url": "https://{cluster}.voucherify.io",
      "description": "Base URL",
      "variables": {
        "cluster": {
          "default": "api",
          "enum": [
            "api",
            "us1.api",
            "as1.api",
            "download",
            "us1.download",
            "as1.download"
          ]
        }
      }
    }
  ],
  "paths": {
    "/management/v1/projects": {
      "post": {
        "operationId": "create-project",
        "tags": [
          "Management"
        ],
        "summary": "Create Project",
        "description": "Creates a new project. You can add users, specify the cluster, timezone, currency, and other details.\n\nAll owners are added to the project by default.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Define project details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details of a created project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "proj_V0uCh3RiFy",
                      "name": "Voucherify Team Project",
                      "currency": "EUR",
                      "timezone": "UTC",
                      "cluster_id": "eu1",
                      "api_version": "v2018-08-01",
                      "case_sensitive_codes": true,
                      "client_trusted_domains": [],
                      "client_redeem_enabled": false,
                      "client_publish_enabled": false,
                      "client_list_vouchers_enabled": false,
                      "client_create_customer_enabled": false,
                      "client_loyalty_events_enabled": false,
                      "client_set_voucher_expiration_date_enabled": false,
                      "api_usage_notifications": {
                        "messages": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "cycle_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "redemptions": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "webhook_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "bulk_api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        }
                      },
                      "webhooks_callout_notifications": {
                        "webhooks": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        },
                        "distributions": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        }
                      },
                      "is_sandbox": false,
                      "webhook_version": "v2024-01-01"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is missing required properties in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0e9389ccac8da56f55"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the project is to be created in a cluster that is unavailable to the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBoundError"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Forbidden",
                      "details": "Project is bound to different region",
                      "request_id": "v-0e938b8738000cc714"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-projects",
        "tags": [
          "Management"
        ],
        "summary": "List Projects",
        "description": "Lists all projects for the organization.\n\nThe endpoint does not require any query parameters.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of all projects with their details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "proj_TrlkLiH4",
                          "name": "Test-project-01",
                          "currency": "EUR",
                          "timezone": "UTC",
                          "cluster_id": "dev",
                          "api_version": "v2018-08-01",
                          "case_sensitive_codes": true,
                          "client_trusted_domains": [],
                          "client_redeem_enabled": false,
                          "client_publish_enabled": false,
                          "client_list_vouchers_enabled": false,
                          "client_create_customer_enabled": false,
                          "client_loyalty_events_enabled": false,
                          "client_set_voucher_expiration_date_enabled": false,
                          "api_usage_notifications": {
                            "messages": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "cycle_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "redemptions": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "webhook_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "bulk_api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            }
                          },
                          "webhooks_callout_notifications": {
                            "webhooks": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            },
                            "distributions": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            }
                          },
                          "is_sandbox": false,
                          "webhook_version": "v2024-01-01"
                        },
                        {
                          "id": "proj_yTNl0NT6",
                          "name": "Test-project-01",
                          "currency": "EUR",
                          "timezone": "UTC",
                          "cluster_id": "dev",
                          "api_version": "v2018-08-01",
                          "case_sensitive_codes": true,
                          "client_trusted_domains": [],
                          "client_redeem_enabled": false,
                          "client_publish_enabled": false,
                          "client_list_vouchers_enabled": false,
                          "client_create_customer_enabled": false,
                          "client_loyalty_events_enabled": false,
                          "client_set_voucher_expiration_date_enabled": false,
                          "api_usage_notifications": {
                            "messages": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "cycle_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "redemptions": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "webhook_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "bulk_api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            }
                          },
                          "webhooks_callout_notifications": {
                            "webhooks": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            },
                            "distributions": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            }
                          },
                          "is_sandbox": false,
                          "webhook_version": "v2024-01-01"
                        },
                        {
                          "id": "sand_CvFGa2LX",
                          "name": "Sandbox Project",
                          "currency": "EUR",
                          "timezone": "Europe/Vienna",
                          "cluster_id": "eu1",
                          "api_version": "v2018-08-01",
                          "description": "",
                          "case_sensitive_codes": true,
                          "client_trusted_domains": [],
                          "client_redeem_enabled": false,
                          "client_publish_enabled": false,
                          "client_list_vouchers_enabled": false,
                          "client_create_customer_enabled": false,
                          "client_loyalty_events_enabled": false,
                          "client_set_voucher_expiration_date_enabled": false,
                          "api_usage_notifications": {
                            "messages": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "cycle_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "redemptions": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "webhook_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "bulk_api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            }
                          },
                          "webhooks_callout_notifications": {
                            "webhooks": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            },
                            "distributions": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            }
                          },
                          "is_sandbox": true,
                          "limits": {
                            "api_calls": [
                              {
                                "value": 100,
                                "duration": "PT1H"
                              }
                            ],
                            "bulk_api_calls": [
                              {
                                "value": 1,
                                "duration": "PT1H"
                              }
                            ]
                          },
                          "default_code_config": {
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                          },
                          "webhook_version": "v2024-01-01"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-project",
        "tags": [
          "Management"
        ],
        "summary": "Get Project",
        "description": "Retrieves an existing project.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details of a project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "proj_V0uCh3RiFy",
                      "name": "Voucherify Team Project",
                      "currency": "EUR",
                      "timezone": "Etc/GMT+1",
                      "cluster_id": "eu1",
                      "api_version": "v2018-08-01",
                      "description": "Project for testing.",
                      "case_sensitive_codes": true,
                      "client_trusted_domains": [],
                      "client_redeem_enabled": false,
                      "client_publish_enabled": false,
                      "client_list_vouchers_enabled": false,
                      "client_create_customer_enabled": false,
                      "client_loyalty_events_enabled": false,
                      "client_set_voucher_expiration_date_enabled": false,
                      "api_usage_notifications": {
                        "messages": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "cycle_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "redemptions": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "webhook_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "bulk_api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        }
                      },
                      "webhooks_callout_notifications": {
                        "webhooks": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        },
                        "distributions": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        }
                      },
                      "is_sandbox": false,
                      "default_code_config": {
                        "charset": "0123456789"
                      },
                      "webhook_version": "v2024-01-01"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-project",
        "tags": [
          "Management"
        ],
        "summary": "Update Project",
        "description": "Updates an existing project.\n\nYou can add or modify settings for timezone, currency, notifications, and other details.\n\nOnly the fields sent in the request will be updated.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Define the project details to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUpdateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details of an updated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "proj_V0uCh3RiFy",
                      "name": "Voucherify Team Project",
                      "currency": "EUR",
                      "timezone": "Etc/GMT+1",
                      "cluster_id": "eu1",
                      "api_version": "v2018-08-01",
                      "description": "Project for testing.",
                      "case_sensitive_codes": true,
                      "client_trusted_domains": [],
                      "client_redeem_enabled": false,
                      "client_publish_enabled": false,
                      "client_list_vouchers_enabled": false,
                      "client_create_customer_enabled": false,
                      "client_loyalty_events_enabled": false,
                      "client_set_voucher_expiration_date_enabled": false,
                      "api_usage_notifications": {
                        "messages": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "cycle_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "redemptions": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "webhook_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "bulk_api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        }
                      },
                      "webhooks_callout_notifications": {
                        "webhooks": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        },
                        "distributions": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        }
                      },
                      "is_sandbox": false,
                      "default_code_config": {
                        "charset": "0123456789"
                      },
                      "webhook_version": "v2024-01-01"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is invalid in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-project",
        "tags": [
          "Management"
        ],
        "summary": "Delete Project",
        "description": "Deletes an existing project.\n\nThe users currently using the deleted project will be automatically logged out.\n\n> 🚧 Sandbox Project\n>\n>The sandbox project cannot be deleted.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/users": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "assign-user",
        "tags": [
          "Management"
        ],
        "summary": "Assign User",
        "description": "Assigns a user to a given project. The user must be an existing user in Voucherify.\n\n> 🚧 Correct Use of Data\n>\n>To avoid errors, use the `\"role\"` key with either `\"id\"` or `\"login\"` keys.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the user details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUsersAssignRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the user assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersAssignResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "login": "name@youremaildomain.com",
                      "email": "name@youremaildomain.com",
                      "first_name": "Sammy",
                      "last_name": "Jones",
                      "projects": {
                        "proj_9KeAhZB1": "USER",
                        "proj_npnFzPr9": "USER",
                        "proj_pEP3NO9s": "USER",
                        "proj_zsPdrUIw": "ADMIN"
                      },
                      "is_owner": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes all three keys or the required data is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0e9389ccac8da56f55"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-users",
        "tags": [
          "Management"
        ],
        "summary": "List Users",
        "description": "Lists all users assigned to the project.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of all the users assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "user_FgEAjOw6riObJdy81s2yZXdqZNiAV1pM",
                          "login": "name@youremaildomain.com",
                          "email": "name@youremaildomain.com",
                          "first_name": "Sammy",
                          "last_name": "Jones",
                          "projects": {
                            "proj_9KeAhZB1": "USER",
                            "proj_npnFzPr9": "USER",
                            "proj_pEP3NO9s": "USER",
                            "proj_zsPdrUIw": "ADMIN"
                          },
                          "is_owner": false
                        },
                        {
                          "id": "user_11sYvPrOj3XE573FO1cAzzk1p4k92wLL",
                          "login": "name@youremaildomain.com",
                          "email": "name@youremaildomain.com",
                          "first_name": "Alex",
                          "last_name": "Smith",
                          "projects": {
                            "proj_3CNHbOe0": "ADMIN"
                          },
                          "is_owner": true
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/users/{userId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterUserId"
          },
          "in": "path",
          "name": "userId",
          "description": "Provide the unique identifier of the user. Alternatively, provide the user's login.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-user",
        "tags": [
          "Management"
        ],
        "summary": "Get User",
        "description": "Retrieves the project user's details.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the project user's details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersGetUserResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "login": "name@youremaildomain.com",
                      "email": "name@youremaildomain.com",
                      "first_name": "Sammy",
                      "last_name": "Jones",
                      "projects": {
                        "proj_9KeAhZB1": "USER",
                        "proj_npnFzPr9": "USER",
                        "proj_pEP3NO9s": "USER",
                        "proj_zsPdrUIw": "ADMIN"
                      },
                      "is_owner": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find user 'user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM' assigned to the project 'proj_5iQ0m7zw'",
                      "request_id": "v-0e9a2019cf4fc6a3bd",
                      "resource_id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-user",
        "tags": [
          "Management"
        ],
        "summary": "Update User",
        "description": "Updates the user's role.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the user's new role.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUsersUpdateRoleRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the user assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersUpdateRoleResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "login": "name@youremaildomain.com",
                      "email": "name@youremaildomain.com",
                      "first_name": "Sammy",
                      "last_name": "Jones",
                      "projects": {
                        "proj_9KeAhZB1": "USER",
                        "proj_npnFzPr9": "USER",
                        "proj_pEP3NO9s": "USER",
                        "proj_zsPdrUIw": "ADMIN"
                      },
                      "is_owner": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect `\"role\"` details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0e9389ccac8da56f55"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find user with id user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "request_id": "v-0e9a191986c0a98d46",
                      "resource_id": "user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unassign-user",
        "tags": [
          "Management"
        ],
        "summary": "Unassign User",
        "description": "Unassigns the user from the project.\nIf the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the user has been successfully unnassigned."
          },
          "400": {
            "description": "Returns an error if the user is not assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "user_not_assigned",
                      "message": "User is not assigned",
                      "details": "User is not assigned to the project",
                      "request_id": "v-0e9a1b979a80a99053"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find user with id user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "request_id": "v-0e9a1b4b98c0a98ffc",
                      "resource_id": "user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/users/invite": {
      "post": {
        "operationId": "invite-user",
        "tags": [
          "Management"
        ],
        "summary": "Invite a New User",
        "description": "Sends an invitation to an email address that has not been used yet as a Voucherify user login.\n\nYou can specify the projects to which the invited user will be assigned and define their roles.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the details of the invitation, the project, and roles to which the user will be assigned.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUsersInviteCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Returns no content if the invitation has been sent successfully."
          },
          "400": {
            "description": "Returns an error if the payload includes an incorrect role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "used_incorrect_role",
                      "message": "Used incorrect role",
                      "details": "The role 'VICE_ADMIN' is incorrect",
                      "request_id": "v-0f0f63a9f00cdbd981"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the project does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_4r3Ul0St",
                      "request_id": "v-0f0f62fe19ccdbd8bc",
                      "resource_id": "proj_4r3Ul0St",
                      "resource_type": "project"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the email address belongs to a Voucherify user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Code": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated user exists with email your.email@domain.com",
                      "resource_id": "your.email@domain.com",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/templates/campaigns": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "get": {
        "operationId": "management-list-campaign-templates",
        "tags": [
          "Management"
        ],
        "summary": "List Campaign Templates",
        "description": "Lists all campaign templates available in the project.\n\n> 👍 List Campaign Templates\n>\n> This endpoint works in the same way as the [List Campaign Templates endpoint](/api-reference/templates/list-campaign-templates).\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the campaign templates created after a template with the given ID."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterTemplatesList"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "include_total",
            "description": "If set to `true`, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to `false` by default."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListTemplates"
            },
            "description": "Filters for listing templates.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of campaign template objects. The templates are returned by creation date by default. The most recent objects appear last unless specified otherwise with the `order` parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsTemplatesCampaignsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "campaign_templates",
                      "campaign_templates": [
                        {
                          "id": "camp_tpl_hFK6hpVc9WKsWaBv4mz7uZn8",
                          "name": "DISCOUNT-CAMPAIGN-TEMPLATE",
                          "description": "New discount for Q4",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "created_at": "2024-06-21T13:03:09.431Z",
                          "object": "campaign_template"
                        },
                        {
                          "id": "camp_tpl_cR8va5Ga2nAi4Nxoi1I1qR8S",
                          "name": "GIFT-CAMPAIGN-TEMPLATE",
                          "campaign_type": "GIFT_VOUCHERS",
                          "created_at": "2024-07-05T14:26:31.600Z",
                          "updated_at": "2024-07-05T14:27:02.905Z",
                          "object": "campaign_template"
                        }
                      ],
                      "total": 14,
                      "has_more": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignTemplateId"
          },
          "in": "path",
          "name": "campaignTemplateId",
          "description": "Provide the unique identifier of the campaign template.",
          "required": true
        }
      ],
      "post": {
        "operationId": "management-copy-campaign-template",
        "tags": [
          "Management"
        ],
        "summary": "Copy Campaign Template to a Project",
        "description": "Copies a campaign template to another project.\n\nThe resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](/build/campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Determines the details about the template in the destination project as well as the destination project itself.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the copied campaign template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_tpl_0f7e3ac98f04d00ab9",
                      "name": "Item_Discount_Campaign_Template",
                      "description": "To be reused in the future",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "created_at": "2024-10-09T15:52:45.414Z",
                      "object": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a campaign template with the same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate": {
                    "value": {
                      "code": 409,
                      "message": "Duplicated resource found",
                      "details": "Duplicated campaign_template exists with name Template copy"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/stacking-rules": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Create Stacking Rules",
        "description": "Overwrites the default stacking rules.\n\nIf new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use [Update stacking rules](/api-reference/management/update-stacking-rules) endpoint to change the rules.\n\n> 📘 Stacking rules documentation\n>\n> Read [the Stacking rules article]/orchestrate/stacking-rules to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the stacking rule parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsStackingRulesCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the stacking rules assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stk_0e9bdfd48108548fd3",
                      "exclusive_categories": [
                        "cat_0f2ba1284b565c235c",
                        "cat_0d75bdfe4c9030a732"
                      ],
                      "joint_categories": [
                        "cat_0d74559c3e9030da13",
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "redeemables_limit": 25,
                      "applicable_redeemables_limit": 10,
                      "applicable_redeemables_per_category_limit": 2,
                      "applicable_redeemables_category_limits": {
                        "cat_0d75bdfe4c9030a732": 1,
                        "cat_0d7c4d183011d043cc": 2
                      },
                      "applicable_exclusive_redeemables_limit": 2,
                      "applicable_exclusive_redeemables_per_category_limit": 2,
                      "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                      "initial_amount_mode_categories": [
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "discounted_amount_mode_categories": [
                        "cat_0d7455f93c1030da4a"
                      ],
                      "redeemables_application_mode": "PARTIAL",
                      "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                      "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                      "no_effect_skip_categories": [],
                      "no_effect_redeem_anyway_categories": [],
                      "redeemables_products_application_mode": "ONCE",
                      "redeemables_rollback_order_mode": "WITH_ORDER",
                      "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST",
                      "created_at": "2024-04-16T20:18:38.213Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values, e.g. integer limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .applicable_exclusive_redeemables_limit must be <= 30",
                      "request_id": "v-0e9b7334154228a45f"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_xqA7DGj5eYPHg6PHVKwYRWiA",
                      "request_id": "v-0c8b6b35294af6f192",
                      "resource_id": "cust_xqA7DGj5eYPHg6PHVKwYRWiA",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the stacking rules have been already created for the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "stacking_rules_exist",
                      "message": "Stacking rules exist",
                      "details": "Cannot exist more stacking rules for given project",
                      "request_id": "v-0e9b5f39f550e070c4"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "List Stacking Rules",
        "description": "Lists all stacking rules.\n\nReturns always a list with one item.\n\nThis endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the [Get Stacking Rules](/api-reference/management/get-stacking-rules) or [Update Stacking Rules](/api-reference/management/update-stacking-rules) endpoints.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article]/orchestrate/stacking-rules to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the stacking rules assigned to the project. These can be either the default stacking rules or the created ones.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "stk_0e9bdfd48108548fd3",
                          "exclusive_categories": [
                            "cat_0f2ba1284b565c235c",
                            "cat_0d75bdfe4c9030a732"
                          ],
                          "joint_categories": [
                            "cat_0d74559c3e9030da13",
                            "cat_0d507a4d6e8a1b7b97"
                          ],
                          "redeemables_limit": 25,
                          "applicable_redeemables_limit": 10,
                          "applicable_redeemables_per_category_limit": 2,
                          "applicable_redeemables_category_limits": {
                            "cat_0d75bdfe4c9030a732": 1,
                            "cat_0d7c4d183011d043cc": 2
                          },
                          "applicable_exclusive_redeemables_limit": 2,
                          "applicable_exclusive_redeemables_per_category_limit": 2,
                          "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                          "initial_amount_mode_categories": [
                            "cat_0d507a4d6e8a1b7b97"
                          ],
                          "discounted_amount_mode_categories": [
                            "cat_0d7455f93c1030da4a"
                          ],
                          "redeemables_application_mode": "PARTIAL",
                          "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                          "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                          "no_effect_skip_categories": [],
                          "no_effect_redeem_anyway_categories": [],
                          "redeemables_products_application_mode": "ONCE",
                          "redeemables_rollback_order_mode": "WITH_ORDER",
                          "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST",
                          "created_at": "2024-04-16T20:18:38.213Z",
                          "updated_at": "2025-08-28T08:28:53.038Z"
                        }
                      ],
                      "total": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterStackingRulesId"
          },
          "in": "path",
          "name": "stackingRulesId",
          "description": "Provide the unique identifier of the stacking rules.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Get Stacking Rules",
        "description": "Retrieves the stacking rules for the project.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article]/orchestrate/stacking-rules to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the stacking rules for the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stk_0e9bdfd48108548fd3",
                      "exclusive_categories": [
                        "cat_0f2ba1284b565c235c",
                        "cat_0d75bdfe4c9030a732"
                      ],
                      "joint_categories": [
                        "cat_0d74559c3e9030da13",
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "redeemables_limit": 25,
                      "applicable_redeemables_limit": 10,
                      "applicable_redeemables_per_category_limit": 2,
                      "applicable_redeemables_category_limits": {
                        "cat_0d75bdfe4c9030a732": 1,
                        "cat_0d7c4d183011d043cc": 2
                      },
                      "applicable_exclusive_redeemables_limit": 2,
                      "applicable_exclusive_redeemables_per_category_limit": 2,
                      "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                      "initial_amount_mode_categories": [
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "discounted_amount_mode_categories": [
                        "cat_0d7455f93c1030da4a"
                      ],
                      "redeemables_application_mode": "PARTIAL",
                      "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                      "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                      "no_effect_skip_categories": [],
                      "no_effect_redeem_anyway_categories": [],
                      "redeemables_products_application_mode": "ONCE",
                      "redeemables_rollback_order_mode": "WITH_ORDER",
                      "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST",
                      "created_at": "2024-04-16T20:18:38.213Z",
                      "updated_at": "2025-08-28T08:28:53.038Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find stacking_rules with id stk_0d626410861700614",
                      "request_id": "v-0e9bd7a49fd0e00ea3",
                      "resource_id": "stk_0d626410861700614",
                      "resource_type": "stacking_rules"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Update Stacking Rules",
        "description": "Updates the stacking rules.\n\nOnly the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article]/orchestrate/stacking-rules to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the stacking rules to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsStackingRulesUpdateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated stacking rules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stk_0e9bdfd48108548fd3",
                      "exclusive_categories": [
                        "cat_0f2ba1284b565c235c",
                        "cat_0d75bdfe4c9030a732"
                      ],
                      "joint_categories": [
                        "cat_0d74559c3e9030da13",
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "redeemables_limit": 25,
                      "applicable_redeemables_limit": 10,
                      "applicable_redeemables_per_category_limit": 2,
                      "applicable_redeemables_category_limits": {
                        "cat_0d75bdfe4c9030a732": 1,
                        "cat_0d7c4d183011d043cc": 2
                      },
                      "applicable_exclusive_redeemables_limit": 2,
                      "applicable_exclusive_redeemables_per_category_limit": 2,
                      "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                      "initial_amount_mode_categories": [
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "discounted_amount_mode_categories": [
                        "cat_0d7455f93c1030da4a"
                      ],
                      "redeemables_application_mode": "PARTIAL",
                      "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                      "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                      "no_effect_skip_categories": [],
                      "no_effect_redeem_anyway_categories": [],
                      "redeemables_products_application_mode": "ONCE",
                      "redeemables_rollback_order_mode": "WITH_ORDER",
                      "grouped_redeemables_sorting_rule": "JOINT_ALWAYS_LAST",
                      "created_at": "2024-04-16T20:18:38.213Z",
                      "updated_at": "2025-08-28T08:28:53.038Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .redeemables_limit must be <= 30",
                      "request_id": "v-0e9bd9f0628228aa93"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find stacking_rules with id stk_0d626410861700614",
                      "request_id": "v-0e9bd9b3cd4228aa3e",
                      "resource_id": "stk_0d626410861700614",
                      "resource_type": "stacking_rules"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Delete Stacking Rules",
        "description": "Deletes permanently the current settings for the stacking rules.\n\nThe stacking rules are restored to default values.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article]/orchestrate/stacking-rules to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the stacking rules have been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/metadata-schemas": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-metadata-schema",
        "tags": [
          "Management"
        ],
        "summary": "Create Metadata Schema",
        "description": "Creates a new metadata (custom attribute) schema for a given resource.\n\nThe schema consists of a set of key-value pairs to customize Voucherify resources. \n\nYou can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object can't include another nested object. The standard metadata schemas are:\n- Campaign\n- Voucher\n- Publication\n- Redemption\n- Product\n- Customer\n- Order\n- Order line item\n- Loyalty Tier\n- Promotion Tier\n- Earning rule\n- Reward\n\nUse this endpoint to define a metadata schema of a given resource for the first time. Once you configure a metadata schema for a given `related_object`, use the PUT [Update metadata schema](/api-reference/management/update-metadata-schema) endpoint to either update or add new metadata key-value pairs. For example, use this endpoint to define a metadata schema for `related_object: campaign` for the first time. If you want define a new metadata property for `campaign`, use the [PUT Update metadata schema](/api-reference/management/update-metadata-schema) endpoint.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the metadata schema.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the metadata schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
                      "related_object": "reward",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": true,
                          "optional": false,
                          "object_type": null,
                          "eq": [
                            "EMEA",
                            "APAC",
                            "LATAM",
                            "NA"
                          ]
                        }
                      },
                      "allow_defined_only": null,
                      "created_at": "2024-04-29T12:03:55.991Z",
                      "updated_at": null,
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the resource has a duplicate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated metadata schema exists with related_object customer",
                      "request_id": "v-0ea5a7618fc0293d81",
                      "resource_id": "customer",
                      "resource_type": "metadata schema"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-metadata-schemas-1",
        "tags": [
          "Management"
        ],
        "summary": "List Metadata Schemas",
        "description": "Lists all metadata schemas available in the project.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the metadata schemas created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ms_bwBVnq2YHcbsfCMfdqfCi4zl",
                          "related_object": "Test-MANAPI-custom-schema-01",
                          "properties": {
                            "Test-manAPI-01": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Test-01",
                                "Test-02",
                                "Test-03",
                                "Test-04"
                              ]
                            },
                            "Test-manAPI-02": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                1,
                                2,
                                3,
                                4
                              ]
                            },
                            "Test-manAPI-03": {
                              "type": "object",
                              "array": false,
                              "optional": true,
                              "object_type": "unknown"
                            },
                            "Test-manAPI-04": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Value-01",
                                "Value-02",
                                "Value-03"
                              ]
                            }
                          },
                          "allow_defined_only": true,
                          "created_at": "2024-04-18T17:24:46.980Z",
                          "updated_at": "2024-04-18T18:17:20.108Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_ctw7O05ZLsMb1zFCGMRQ8qnP",
                          "related_object": "campaign",
                          "properties": {
                            "Test-manAPI": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Test1",
                                "Test2",
                                "Test3"
                              ],
                              "max_length": 5,
                              "min_length": 2
                            },
                            "Test-manAPI-08": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                105.5
                              ],
                              "lt": 9.5,
                              "lte": 10.5
                            },
                            "Test-manAPI-09": {
                              "type": "object",
                              "array": true,
                              "optional": false,
                              "object_type": "Test-MANAPI-custom-schema-01",
                              "deleted": true
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2024-04-18T17:21:13.555Z",
                          "updated_at": "2024-04-19T06:43:09.218Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_f0r4hm3ta6a4a5ch3ma",
                          "related_object": "customer",
                          "properties": {
                            "age": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "Test-MANAPI-06": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Class-01,",
                                "Class-02",
                                "Class-03"
                              ]
                            },
                            "Test-manAPI-07": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Tick",
                                "Tack",
                                "Toe"
                              ]
                            },
                            "acquisition_channel": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Portal-01",
                                "Portal-02",
                                "Portal-03"
                              ]
                            },
                            "customer_life_time_value": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2023-08-03T10:37:48.696Z",
                          "updated_at": "2024-04-18T18:23:58.380Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                          "related_object": "order",
                          "properties": {
                            "region": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "EU",
                                "US",
                                "EMEA",
                                "APAC"
                              ]
                            },
                            "location_id": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "L1",
                                "L2",
                                "L3"
                              ]
                            },
                            "payment_mean": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "credit-card",
                                "wire-transfer",
                                "paypal"
                              ]
                            },
                            "booking_end_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "booking_start_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2023-08-03T10:37:48.662Z",
                          "updated_at": "2023-08-28T11:24:43.518Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_s3c0N6m3ta6a4a5ch3ma",
                          "related_object": "product",
                          "properties": {
                            "brand": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "vendor": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "category": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2023-08-03T10:37:48.670Z",
                          "updated_at": "2023-09-14T09:30:26.314Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_t4ir0Dm3ta6a4a5ch3ma",
                          "related_object": "redemption",
                          "properties": {
                            "location_id": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "L1",
                                "L2",
                                "L3"
                              ]
                            }
                          },
                          "allow_defined_only": null,
                          "created_at": "2023-08-03T10:37:48.692Z",
                          "updated_at": null,
                          "object": "metadata_schema"
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMetadataSchemaId"
          },
          "in": "path",
          "name": "metadataSchemaId",
          "description": "Provide the unique identifier of the metadata schema.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-metadata-schema-1",
        "tags": [
          "Management"
        ],
        "summary": "Get Metadata Schema",
        "description": "Retrieves a metadata schema.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the metadata schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                      "related_object": "order",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "object_type": null,
                          "eq": [
                            "EU",
                            "US",
                            "EMEA",
                            "APAC"
                          ]
                        },
                        "location_id": {
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "object_type": null,
                          "eq": [
                            "L1",
                            "L2",
                            "L3"
                          ]
                        },
                        "payment_mean": {
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "object_type": null,
                          "eq": [
                            "credit-card",
                            "wire-transfer",
                            "paypal"
                          ]
                        },
                        "booking_end_date": {
                          "type": "datetime",
                          "array": false,
                          "optional": true,
                          "object_type": null
                        },
                        "booking_start_date": {
                          "type": "datetime",
                          "array": false,
                          "optional": true,
                          "object_type": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2023-08-03T10:37:48.662Z",
                      "updated_at": "2023-08-28T11:24:43.518Z",
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-metadata-schema",
        "tags": [
          "Management"
        ],
        "summary": "Update Metadata Schema",
        "description": "Updates a metadata schema.\n\nWith this request, you can:\n- Add a nonexistent attribute definition to the metadata schema.\n- Update an existing attribute definition by overwriting its current values.\n\nIn the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged.\n\nHowever, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted.\n\n> 👍 Additional Notes\n>\n>- You cannot change the type of an existing schema, e.g. from `\"string\"` to `\"number\"`.\n>\n>- You can remove a definition with this endpoint by providing `\"deleted\": true` in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the metadata schema to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasUpdateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated metadata schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
                      "related_object": "reward",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": true,
                          "optional": false,
                          "object_type": null,
                          "eq": [
                            "EMEA",
                            "APAC",
                            "LATAM",
                            "NA"
                          ]
                        }
                      },
                      "allow_defined_only": null,
                      "created_at": "2024-04-29T12:03:55.991Z",
                      "updated_at": null,
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-metadata-schema",
        "tags": [
          "Management"
        ],
        "summary": "Delete Metadata Schema",
        "description": "Deletes permanently the metadata schema.\n\nIn standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are:\n- Campaign\n- Voucher\n- Publication\n- Redemption\n- Product\n- Customer\n- Order\n- Order line item\n- Loyalty Tier\n- Promotion Tier\n- Earning rule\n- Reward\n\nIf you want to delete only one definition, use the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint. In the request, provide the `\"deleted\": true` pair in the definition object. This definition will be moved to Removed definitions.\n\nIf you want to create a new standard metadata schema, use the [Create Metadata Schema](/api-reference/management/create-metadata-schema) endpoint.\n\n> 🚧 Metadata Purging\n>\n>This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain.\n>\n>If you want to purge metadata from the entities:\n>1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the [Update Metadata Schema](/api-reference/management/update-metadata-schema) endpoint.\n>2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema.\n>3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities.\n>Note:\n>- This is an asynchronous action. You will be notified when it has been completed.\n>- You cannot purge metadata for the Redemption and Publication schemas.\n>4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](/prepare/metadata) and [Metadata Mapping](/guides/metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the metadata schema has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/custom-event-schemas": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Create Custom Event Schema",
        "description": "Creates a custom event schema.\n\nThe `\"properties\"` object is required, but it can be empty, however. This object is for optional custom properties (metadata).\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the custom event schema.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the custom event schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_GgjUlnCmbNV5z1pajU11NtnT",
                      "name": "review",
                      "schema": {
                        "properties": {
                          "published": {
                            "type": "boolean",
                            "optional": true
                          }
                        }
                      },
                      "created_at": "2024-04-29T11:25:44.458Z",
                      "object": "custom-event-schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the resource has a duplicate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated custom_event_schema exists with name sign-up",
                      "request_id": "v-0ead453c10ec031067",
                      "resource_id": "sign-up",
                      "resource_type": "custom_event_schema"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-custom-event-schemas",
        "tags": [
          "Management"
        ],
        "summary": "List Custom Event Schemas",
        "description": "Lists all custom event schemas available in the project.\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the custom event schemas created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ms_t4ir0Dcu5T0m3v3nT5ch3ma",
                          "name": "newsletter_subscribed",
                          "schema": {
                            "properties": {}
                          },
                          "created_at": "2023-08-03T10:37:48.716Z",
                          "object": "custom-event-schema"
                        },
                        {
                          "id": "ms_s3c0N6cu5T0m3v3nT5ch3ma",
                          "name": "review_left",
                          "schema": {
                            "properties": {}
                          },
                          "created_at": "2023-08-03T10:37:48.710Z",
                          "updated_at": "2024-04-26T14:35:03.463Z",
                          "object": "custom-event-schema"
                        },
                        {
                          "id": "ms_f1r5Tcu5T0m3v3nT5ch3ma",
                          "name": "sign_up",
                          "schema": {
                            "properties": {}
                          },
                          "created_at": "2023-08-03T10:37:48.705Z",
                          "object": "custom-event-schema"
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomEventSchemaId"
          },
          "in": "path",
          "name": "customEventSchemaId",
          "description": "Provide the unique identifier of the custom event schema.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Get Custom Event Schema",
        "description": "Retrieves a custom event schema.\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the custom event schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                      "related_object": "order",
                      "properties": {
                        "published": {
                          "type": "boolean",
                          "optional": true
                        }
                      },
                      "created_at": "2024-04-29T11:25:44.458Z",
                      "object": "custom-event-schema"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Update Custom Event Schema",
        "description": "Updates a custom event schema.\n\nWith this request, you can:\n- Add a nonexistent property to a custom event schema.\n- Update an existing property.\n\nIn the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged.\n\n> 👍 Additional Notes\n>\n>- You can change the type of an existing property, e.g. from `\"string\"` to `\"number\"`.\n>\n>- You can remove a custom property with this endpoint by providing `\"deleted\": true` in the request. However, you cannot permanently remove an event definition or its property with this endpoint.\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the custom event schema to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasUpdateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated custom event schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
                      "related_object": "reward",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": true,
                          "optional": false,
                          "object_type": null,
                          "eq": [
                            "EMEA",
                            "APAC",
                            "LATAM",
                            "NA",
                            "EU"
                          ]
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2024-04-29T12:03:55.991Z",
                      "updated_at": "2024-04-29T12:06:20.866Z",
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Delete Custom Event Schema",
        "description": "Deletes permanently the custom event schema with its custom properties (metadata).\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the custom event schema has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/webhooks": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Create Webhook",
        "description": "Creates a new webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Webhooks v2024-01-01](/api-reference/introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines a webhook configuration.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsWebhooksCreateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the webhook configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "webhook",
                      "created_at": "2024-04-30T08:13:55.789Z",
                      "id": "wh_ekFHVL6lqC4lDuIFxpETSGa3",
                      "events": [
                        "redemption.succeeded"
                      ],
                      "target_url": "your_url",
                      "active": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-webhooks",
        "tags": [
          "Management"
        ],
        "summary": "List Webhooks",
        "description": "Lists all webhook configurations for the project.\n\n> 📘 Webhook Documentation\n>\n> Read [Introduction to webhooks](/api-reference/introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about webhook configurations created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "object": "webhook",
                          "created_at": "2024-01-02T08:31:46.562Z",
                          "id": "wh_i45Uez369zzXgh6PXC0eyGmb",
                          "events": [
                            "redemption.succeeded",
                            "redemption.failed",
                            "redemption.rollback.succeeded",
                            "redemption.rollback.failed",
                            "publication.succeeded",
                            "voucher.published",
                            "voucher.updated",
                            "voucher.deleted",
                            "voucher.created",
                            "voucher.enabled",
                            "voucher.disabled",
                            "voucher.loyalty_card.points_added",
                            "voucher.gift.balance_added",
                            "campaign.enabled",
                            "campaign.deleted",
                            "campaign.created",
                            "campaign.updated",
                            "campaign.disabled",
                            "campaign.vouchers.generation.completed",
                            "business_validation_rule.assignment.created",
                            "business_validation_rule.assignment.deleted",
                            "business_validation_rule.created",
                            "business_validation_rule.deleted",
                            "business_validation_rule.updated",
                            "customer.created",
                            "customer.deleted",
                            "customer.rewarded",
                            "customer.rewarded.loyalty_points"
                          ],
                          "target_url": "your_url",
                          "active": true
                        },
                        {
                          "object": "webhook",
                          "created_at": "2024-04-29T14:13:27.764Z",
                          "id": "wh_x2YxoHtQdBlP7zfk5KZ8m5WX",
                          "events": [
                            "redemption.succeeded",
                            "redemption.failed",
                            "redemption.rollback.succeeded",
                            "redemption.rollback.failed",
                            "publication.succeeded",
                            "voucher.published",
                            "voucher.updated",
                            "voucher.deleted",
                            "voucher.created",
                            "voucher.enabled"
                          ],
                          "target_url": "your_url",
                          "active": false
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/webhooks/{webhookId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterWebhookId"
          },
          "in": "path",
          "name": "webhookId",
          "description": "Provide the unique identifier of the webhook configuration.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Get Webhook",
        "description": "Retrieves a webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Introduction to webhooks](/api-reference/introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the webhook configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "webhook",
                      "created_at": "2024-04-30T08:13:55.789Z",
                      "id": "wh_Fk1HzL9lqC1lpuIFxp3TShB4",
                      "events": [
                        "redemption.succeeded"
                      ],
                      "target_url": "your_url",
                      "active": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find webhook with id wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "request_id": "v-0ead4423d55b6996f2",
                      "resource_id": "wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "resource_type": "webhook"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Update Webhook",
        "description": "Updates a webhook configuration.\n\nThe `\"events\"` listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Introduction to webhooks](/api-reference/introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the webhook configuration to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsWebhooksUpdateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated webhook configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "webhook",
                      "created_at": "2024-04-30T08:13:55.789Z",
                      "id": "wh_Fk1HzL9lqC1lpuIFxp3TShB4",
                      "events": [
                        "redemption.failed"
                      ],
                      "target_url": "your_url",
                      "active": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find webhook with id wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "request_id": "v-0ead4423d55b6996f2",
                      "resource_id": "wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "resource_type": "webhook"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Delete Webhook",
        "description": "Deletes a webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Introduction to webhooks](/api-reference/introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the webhook configuration has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find webhook with id wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "request_id": "v-0ead4423d55b6996f2",
                      "resource_id": "wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "resource_type": "webhook"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/branding": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-brand",
        "tags": [
          "Management"
        ],
        "summary": "Create Brand",
        "description": "Creates a new brand configuration.\n\nYou can have only one brand configured for a project.\n\n> 📘 White Labelling\n>\n> The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines a brand configuration.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsBrandingCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "brand": {
                      "name": "Voucherify PSA",
                      "privacy_policy_url": null,
                      "terms_of_use_url": null,
                      "permission_reminder": "You are receiving this email because you opted in at our website.",
                      "website_url": "voucherify.io"
                    },
                    "address": {
                      "street": "Porcelanowa 23",
                      "city": "Katowice",
                      "postal": "43-246",
                      "state": null,
                      "country": "Poland"
                    },
                    "contact": {
                      "email": "support@voucherify.io",
                      "phone": null
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the brand configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "brd_0eb55234024e226d9d",
                      "brand": {
                        "name": "Voucherify PSA",
                        "privacy_policy_url": null,
                        "terms_of_use_url": null,
                        "permission_reminder": "You are receiving this email because you opted in at our website.",
                        "website_url": "voucherify.io"
                      },
                      "address": {
                        "street": "Porcelanowa 23",
                        "city": "Katowice",
                        "postal": "43-246",
                        "state": null,
                        "country": "Poland"
                      },
                      "contact": {
                        "email": "support@voucherify.io",
                        "phone": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the brand has been already configured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 409,
                      "key": "branding_exist",
                      "message": "Branding exist",
                      "details": "Cannot exist more than one branding for given project",
                      "request_id": "v-0ead51b4ff49d9319d"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-brands",
        "tags": [
          "Management"
        ],
        "summary": "List Brands",
        "description": "Lists all brand configurations.\n\nBecause a project can have only one brand, it always returns a list with one item.\n\nThis endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the brand created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "brd_0E603421F0a2fL1814",
                          "brand": {
                            "name": "Voucherify PSA",
                            "privacy_policy_url": null,
                            "terms_of_use_url": null,
                            "permission_reminder": "You are receiving this email because you opted in at our website.",
                            "website_url": "voucherify.io"
                          },
                          "address": {
                            "street": "Porcelanowa 23",
                            "city": "Katowice",
                            "postal": "40-246",
                            "state": null,
                            "country": "Poland"
                          },
                          "contact": {
                            "email": "support@voucherify.io",
                            "phone": null
                          }
                        }
                      ],
                      "total": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/branding/{brandingId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterBrandingId"
          },
          "in": "path",
          "name": "brandingId",
          "description": "Provide the unique identifier of the brand configuration.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-brand",
        "tags": [
          "Management"
        ],
        "summary": "Get Brand",
        "description": "Retrieves a brand configuration.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the brand configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "brd_0E603421F0a2fL1814",
                      "brand": {
                        "name": "Voucherify PSA",
                        "privacy_policy_url": null,
                        "terms_of_use_url": null,
                        "permission_reminder": "You are receiving this email because you opted in at our website.",
                        "website_url": null
                      },
                      "address": {
                        "street": "Porcelanowa 23",
                        "city": "Katowice",
                        "postal": "40-246",
                        "state": null,
                        "country": "Poland"
                      },
                      "contact": {
                        "email": "support@voucherify.io",
                        "phone": null
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find branding_details with id brd_0e603885e0c5fc180",
                      "request_id": "v-0ead68aa7c56588378",
                      "resource_id": "brd_0e603885e0c5fc180",
                      "resource_type": "branding_details"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-brand",
        "tags": [
          "Management"
        ],
        "summary": "Update Brand",
        "description": "Updates a brand configuration.\n\nOnly the fields sent in the request will be updated. The fields omitted in the request will remain unchanged.\n\n> 📘 White Labelling\n>\n> The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the brand configuration to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsBrandingUpdateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated brand configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "brd_0ead90c940a9deef09",
                      "brand": {
                        "name": "Voucherify PSA",
                        "privacy_policy_url": null,
                        "terms_of_use_url": null,
                        "permission_reminder": "You are receiving this email because you opted in at our website.",
                        "website_url": null
                      },
                      "address": {
                        "street": "Porcelanowa 23",
                        "city": "Katowice",
                        "postal": "43-246",
                        "state": null,
                        "country": "Poland"
                      },
                      "contact": {
                        "email": "your_email@your-domain.com",
                        "phone": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find branding_details with id brd_0e603885e0c5fc180",
                      "request_id": "v-0ead68aa7c56588378",
                      "resource_id": "brd_0e603885e0c5fc180",
                      "resource_type": "branding_details"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-brand",
        "tags": [
          "Management"
        ],
        "summary": "Delete Brand",
        "description": "Deletes permanently a brand configuration.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the brand configuration has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find branding_details with id brd_0e603885e0c5fc180",
                      "request_id": "v-0ead68aa7c56588378",
                      "resource_id": "brd_0e603885e0c5fc180",
                      "resource_type": "branding_details"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ManagementProjectsCreateRequestBody": {
        "type": "object",
        "title": "Management Project Create Request Body",
        "description": "Request body schema for **POST** `/management/v1/projects`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "case_sensitive_codes": {
                "type": "boolean",
                "description": "Determines if the vouchers in the project will be case sensitive (if `true`, `C0dE-cfV` is not equal to `c0de-cfv`) or case insensitive (if false, `C0dE-cfV` is equal to `c0de-cfv`)."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectBase"
          },
          {
            "type": "object",
            "properties": {
              "api_usage_notifications": {
                "type": "object",
                "title": "API Usage Notifications",
                "description": "Determines the notification settings.",
                "properties": {
                  "messages": {
                    "type": "object",
                    "description": "Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "bulk_api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "webhook_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "cycle_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  }
                },
                "required": [
                  "redemptions",
                  "messages",
                  "api_calls",
                  "bulk_api_calls",
                  "webhook_calls",
                  "cycle_calls"
                ]
              },
              "cluster_id": {
                "type": "string",
                "description": "The identifier of the cluster where the project will be created. The default cluster is `eu1` unless otherwise configured."
              },
              "api_version": {
                "type": "string",
                "description": "The API version used in the project. Currently, the default and only value is `v2018-08-01`.",
                "default": "v2018-08-01",
                "enum": [
                  "v2018-08-01"
                ]
              },
              "users": {
                "type": "array",
                "description": "The users (their identifiers, logins, and roles) who will be assigned to the project. You can assign only existing Voucherify users.\n\nIt must be used either in the following combinations:\n- `id` and `role`, or\n- `login` and `role`.",
                "items": {
                  "title": "Create Project Users",
                  "type": "object",
                  "description": "Contains details about the users who will be assigned to the project.\nOnly the `id` and `role` or `login` and `role` should be provided in the request.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string.\n\nDo **not** use with the `login` string."
                    },
                    "login": {
                      "type": "string",
                      "description": "The login data of the user who will be assigned to the project. **Required** with the `role` string.\n\nDo **not** use with the `id` string."
                    },
                    "role": {
                      "type": "string",
                      "description": "The role of the user to be added. It can be one of the following predefined roles:\n`ADMIN`, `USER`, `VIEWER`, `MERCHANT`\nor an ID of a custom role."
                    }
                  },
                  "required": [
                    "role"
                  ]
                }
              }
            }
          }
        ],
        "required": [
          "name",
          "case_sensitive_codes",
          "timezone",
          "currency"
        ]
      },
      "ManagementProjectsCreateResponseBody": {
        "type": "object",
        "title": "Management Project Create Response Body",
        "description": "Response body schema for **POST** `management/v1/projects`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectBaseWithConfig"
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsAPIKeys"
          }
        ]
      },
      "e_400_invalid_payload": {
        "title": "Invalid Payload",
        "type": "object",
        "description": "Error: Bad Request &rarr; Invalid Payload",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "invalid_payload",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Invalid payload",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a884c6be8c3756f42",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "Error": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a885062c80375740f",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          },
          "resource_id": {
            "type": "string",
            "description": "Unique resource ID that can be used in another endpoint to get more details.",
            "example": "rf_0c5d710a87c8a31f86"
          },
          "resource_type": {
            "type": "string",
            "description": "The resource type.",
            "example": "voucher"
          },
          "error": {
            "type": "object",
            "description": "Includes additional information about the error.",
            "properties": {
              "message": {
                "type": "string",
                "description": "The message configured by the user in a validation rule."
              }
            }
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "ErrorPaymentRequired": {
        "title": "Payment Required Error",
        "type": "object",
        "description": "Error: Payment required - the current plan does not include the feature.",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          }
        },
        "required": [
          "code",
          "message",
          "details",
          "key"
        ]
      },
      "ProjectBoundError": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a96c19b1a41c03999",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by Voucherify support team."
          }
        }
      },
      "ManagementProjectsListResponseBody": {
        "type": "object",
        "title": "Management Projects List Response Body",
        "description": "Schema model for **GET** `managment/v1/projects`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the projects in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of project objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of project objects.",
            "items": {
              "$ref": "#/components/schemas/ManagementProject"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of projects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsGetResponseBody": {
        "type": "object",
        "title": "Management Project Get Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProject"
          }
        ]
      },
      "ParameterProjectId": {
        "type": "string",
        "example": "proj_TrlkLiH4"
      },
      "ManagementProjectsUpdateRequestBody": {
        "type": "object",
        "title": "Management Project Update Request Body",
        "description": "Request body schema for **PUT** `/management/v1/projects/{projectId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectBase"
          },
          {
            "type": "object",
            "properties": {
              "api_usage_notifications": {
                "type": "object",
                "title": "API Usage Notifications",
                "description": "Determines the notification settings.",
                "properties": {
                  "messages": {
                    "type": "object",
                    "description": "Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "bulk_api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "webhook_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "cycle_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  }
                },
                "required": [
                  "redemptions",
                  "messages",
                  "api_calls",
                  "bulk_api_calls",
                  "webhook_calls",
                  "cycle_calls"
                ]
              },
              "default_code_config": {
                "type": "object",
                "title": "Default Code Configuration",
                "description": "Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.",
                "properties": {
                  "charset": {
                    "type": "string",
                    "nullable": true,
                    "description": "Lists all characters that are used as default for vouchers"
                  }
                }
              }
            }
          }
        ]
      },
      "ManagementProjectsUpdateResponseBody": {
        "type": "object",
        "title": "Management Project Update Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProject"
          }
        ]
      },
      "BadRequest": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "error": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          }
        }
      },
      "ManagementProjectsUsersAssignRequestBody": {
        "type": "object",
        "title": "Management Projects User Assign Request Body",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string.\n\nDo **not** use with the `login` string."
          },
          "login": {
            "type": "string",
            "description": "The login data of the user who will be assigned to the project. **Required** with the `role` string.\n\nDo **not** use with the `id` string."
          },
          "role": {
            "type": "string",
            "description": "The role of the user to be added. It can be one of the following predefined roles:\n`ADMIN`, `USER`, `VIEWER`, `MERCHANT`,\nor an ID of a custom role."
          }
        },
        "required": [
          "role"
        ]
      },
      "ManagementProjectsUsersAssignResponseBody": {
        "type": "object",
        "title": "Management Projects Users Create Response Body",
        "description": "Details about the user assigned to the project.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          }
        ]
      },
      "ManagementProjectsUsersListResponseBody": {
        "type": "object",
        "title": "Management Projects User List Response Body",
        "description": "Object containing a list of users assigned to the project.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the users in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of user objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of user objects.",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of users."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsUsersGetUserResponseBody": {
        "type": "object",
        "title": "Management Projects Users Get User Response Body",
        "description": "Details about the user assigned to the project.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          }
        ]
      },
      "ParameterUserId": {
        "type": "string",
        "example": "user_v18mvPOjOXE5733eO4cAz8k1pn492wKK"
      },
      "ManagementProjectsUsersUpdateRoleRequestBody": {
        "type": "object",
        "title": "Management Projects User Update Role Request Body",
        "properties": {
          "role": {
            "type": "string",
            "description": "The role of the user to be added. It can be a custom role or one of following predefined roles:\n- `ADMIN`, `USER`, `VIEWER`, `MERCHANT`\n- or an ID of a custom role."
          }
        },
        "required": [
          "role"
        ]
      },
      "ManagementProjectsUsersUpdateRoleResponseBody": {
        "type": "object",
        "title": "Management Projects Users Create Response Body",
        "description": "Details about the user assigned to the project.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          }
        ]
      },
      "ManagementProjectsUsersInviteCreateRequestBody": {
        "type": "object",
        "description": "Request body schema for **POST** `/management/v1/projects/users/invite`.",
        "properties": {
          "email": {
            "type": "string",
            "description": "Email address to which the invitation will be sent. Must be a valid email address.",
            "example": "alex.doe@your-domain-name.com"
          },
          "first_name": {
            "type": "string",
            "description": "First name of the person who will receive the invitation. The name will be used in the user profile.",
            "example": "Alex"
          },
          "last_name": {
            "type": "string",
            "description": "Last name of the person who will receive the invitation. The name will be used in the user profile.",
            "example": "Doe"
          },
          "projects": {
            "type": "object",
            "title": "Project and Role",
            "description": "In the key, provide the project ID to which the new user will be assigned. In the value, provide the role which the user will have in the project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). Send a custom role ID (Enterprise feature) to assign a custom role. To find the custom role ID: If you are an admin, go to Voucherify Dashboard, Team settings, and Roles tab. Click on a custom role. The custom role ID is in the URL in the format `role_XyZ7aB9cD2eF4gH1iJ0kL5mN6oP8qR3s`.",
            "additionalProperties": {
              "type": "string",
              "title": "project_id",
              "description": "Defines the project to which the user will be assigned and the role in the project."
            },
            "example": {
              "proj_ExPr0jID": "USER",
              "proj_ExPr0jId": "role_XyZ7aB9cD2eF4gH1iJ0kL5mN6oP8qR3s"
            }
          }
        },
        "required": [
          "email",
          "first_name",
          "last_name",
          "projects"
        ]
      },
      "ParameterString": {
        "type": "string"
      },
      "ParameterTemplatesList": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterBoolean": {
        "type": "boolean"
      },
      "ParameterFiltersListTemplates": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "id": {
            "type": "object",
            "description": "Unique template ID.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "name": {
            "type": "object",
            "description": "Unique user-defined template name.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_type": {
            "type": "object",
            "description": "Campaign template campaign type.",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "DISCOUNT_COUPONS",
                        "GIFT_VOUCHERS"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "DISCOUNT_COUPONS",
                        "GIFT_VOUCHERS"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "DISCOUNT_COUPONS",
                      "GIFT_VOUCHERS"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "DISCOUNT_COUPONS",
                      "GIFT_VOUCHERS"
                    ]
                  },
                  "$has_value": {
                    "type": "string",
                    "description": "Value is NOT null. The value for this parameter is an empty string."
                  },
                  "$is_unknown": {
                    "type": "string",
                    "description": "Value is null. The value for this parameter is an empty string."
                  },
                  "$starts_with": {
                    "type": "string",
                    "description": "Value starts with the specified string."
                  },
                  "$ends_with": {
                    "type": "string",
                    "description": "Value ends with the specified string."
                  }
                }
              }
            }
          }
        }
      },
      "ManagementProjectsTemplatesCampaignsListResponseBody": {
        "type": "object",
        "title": "Management Templates Campaign Template List Response Body",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/templates/campaigns`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about campaign templates.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of campaign templates.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Dictionary that contains an array of campaign templates.",
            "items": {
              "$ref": "#/components/schemas/CampaignTemplate"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`."
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Returns an ID that can be used to return another page of results. Use the template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "campaign_template",
          "has_more"
        ]
      },
      "ManagementProjectsTemplatesCampaignsCopyCreateRequestBody": {
        "type": "object",
        "title": "Management Templates Campaign Copy Template Request Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplatesCampaignsNameDescription"
          },
          {
            "type": "object",
            "properties": {
              "destination_project_id": {
                "type": "string",
                "description": "Unique identifier of the project to which the campaign template will be copied."
              }
            }
          }
        ],
        "required": [
          "name",
          "destination_project_id"
        ]
      },
      "ManagementProjectsTemplatesCampaignsCopyCreateResponseBody": {
        "type": "object",
        "title": "Management Templates Campaign Template Copy Response Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplateBase"
          }
        ]
      },
      "ParameterCampaignTemplateId": {
        "type": "string",
        "example": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq"
      },
      "ManagementProjectsStackingRulesCreateRequestBody": {
        "type": "object",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRulesBase"
          }
        ]
      },
      "ManagementProjectsStackingRulesCreateResponseBody": {
        "type": "object",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRules"
          }
        ],
        "required": [
          "id",
          "created_at"
        ]
      },
      "ManagementProjectsStackingRulesListResponseBody": {
        "type": "object",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the stacking rules in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of stacking rule objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of only one stacking rule object.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsStackingRules"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of stacking rule objects. It is always 1."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsStackingRulesGetResponseBody": {
        "type": "object",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRules"
          }
        ],
        "required": [
          "id",
          "created_at"
        ]
      },
      "ParameterStackingRulesId": {
        "type": "string",
        "example": "stk_0d6264108617006147"
      },
      "ManagementProjectsStackingRulesUpdateRequestBody": {
        "type": "object",
        "description": "Request body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRulesBase"
          }
        ]
      },
      "ManagementProjectsStackingRulesUpdateResponseBody": {
        "type": "object",
        "description": "Response body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRules"
          }
        ],
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "ManagementProjectsMetadataSchemasCreateRequestBody": {
        "type": "object",
        "description": "",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "related_object": {
                "type": "string",
                "description": "The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type, or you can use standard resource types: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`."
              },
              "allow_defined_only": {
                "type": "boolean",
                "default": false,
                "description": "Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.\t"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Contains metadata definitions. There can be many properties within this object.\n\nOnly the properties sent in the request will be created.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemaDefinition"
                }
              }
            },
            "required": [
              "properties"
            ]
          }
        ],
        "required": [
          "related_object",
          "properties"
        ]
      },
      "ManagementProjectsMetadataSchemasCreateResponseBody": {
        "type": "object",
        "title": "Management Projects Metadata Schemas Update Response Body",
        "description": "Response body schema for **POST** `management/v1/projects/{projectId}/metadata-schemas`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
          }
        ]
      },
      "ManagementProjectsMetadataSchemasListResponseBody": {
        "type": "object",
        "description": "Object containing a list of metadata schemas.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of metadata schema objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of metadata schema objects. The metadata schemas are listed by related object properties.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of metadata schema objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsMetadataSchemasGetResponseBody": {
        "type": "object",
        "title": "Management Projects Metadata Schemas Get Response Body",
        "description": "Response body schema for **GET** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
          }
        ]
      },
      "ParameterMetadataSchemaId": {
        "type": "string",
        "example": "ms_f0r4hm3ta6a4a5ch3ma"
      },
      "ManagementProjectsMetadataSchemasUpdateRequestBody": {
        "type": "object",
        "description": "",
        "properties": {
          "allow_defined_only": {
            "type": "boolean",
            "description": "Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.\t"
          },
          "properties": {
            "type": "object",
            "description": "Contains metadata definitions. There can be many properties within this object.\n\nOnly the properties sent in the request will be updated. However, if you send a property, all its key-value pairs must be provided - otherwise, they will be overwritten to new values.\n\nYou cannot change the `\"type\"` property. However, it is required, so you need to add it to the request.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ManagementProjectsMetadataSchemaDefinition"
            }
          }
        },
        "required": [
          "properties"
        ]
      },
      "ManagementProjectsMetadataSchemasUpdateResponseBody": {
        "type": "object",
        "title": "Management Projects Metadata Schemas Update Response Body",
        "description": "Response body schema for **PUT** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
          }
        ]
      },
      "ManagementProjectsCustomEventSchemasCreateRequestBody": {
        "type": "object",
        "title": "Create Custom Event Schema Request",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "title": "Custom Event Name",
                "description": "User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemaBase"
          }
        ],
        "required": [
          "name",
          "schema"
        ]
      },
      "ManagementProjectsCustomEventSchemasCreateResponseBody": {
        "type": "object",
        "title": "Create Custom Event Schema Response",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
          }
        ]
      },
      "ManagementProjectsCustomEventSchemasListResponseBody": {
        "type": "object",
        "description": "Object containing a list of custom event schemas.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the custom event schemas in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of custom event schema objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of custom event schema objects.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of custom event schema objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsCustomEventSchemasGetResponseBody": {
        "type": "object",
        "title": "Get Custom Event Schema Response",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
          }
        ]
      },
      "ParameterCustomEventSchemaId": {
        "type": "string",
        "example": "ms_f1r5Tcu5T0m3v3nT5ch3ma"
      },
      "ManagementProjectsCustomEventSchemasUpdateRequestBody": {
        "type": "object",
        "title": "Update Custom Event Schema Request Body",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemaBase"
          }
        ]
      },
      "ManagementProjectsCustomEventSchemasUpdateResponseBody": {
        "type": "object",
        "title": "Update Custom Event Schema Response Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
          }
        ]
      },
      "ManagementProjectsWebhooksCreateRequestBody": {
        "type": "object",
        "title": "Management Webhook Create Request Body",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhookBase"
          }
        ],
        "required": [
          "target_url",
          "events"
        ]
      },
      "ManagementProjectsWebhooksCreateResponseBody": {
        "type": "object",
        "title": "Management Webhook Create Request Response",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/webhooks`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhook"
          }
        ]
      },
      "ManagementProjectsWebhooksListResponseBody": {
        "type": "object",
        "description": "Object containing a list of webhook configurations.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the webhook configurations in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of webhook objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of webhook objects.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsWebhook"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of webhook objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsWebhooksGetResponseBody": {
        "type": "object",
        "title": "Management Webhook Get Response Response",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhook"
          }
        ]
      },
      "ParameterWebhookId": {
        "type": "string",
        "example": "wh_Fk1HzL9lqC1lpuIFxp3TShB4"
      },
      "ManagementProjectsWebhooksUpdateRequestBody": {
        "type": "object",
        "title": "Management Webhook Update Request Body",
        "description": "Request body schema for **PUT** `/management/v1/projects/{projectId}/webhooks`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhookBase"
          }
        ],
        "required": [
          "target_url",
          "events"
        ]
      },
      "ManagementProjectsWebhooksUpdateResponseBody": {
        "type": "object",
        "title": "Management Webhook Update Response Response",
        "description": "Response body schema for **PUT** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhook"
          }
        ]
      },
      "ManagementProjectsBrandingCreateRequestBody": {
        "type": "object",
        "title": "Create Brand Request",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/branding`.",
        "properties": {
          "brand": {
            "type": "object",
            "title": "Brand",
            "description": "Defines basic brand details.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Defines brand name."
              },
              "privacy_policy_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's privacy policy. It must be a valid URL format."
              },
              "terms_of_use_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's terms of use.  It must be a valid URL format."
              },
              "permission_reminder": {
                "type": "string",
                "nullable": true,
                "default": "You are receiving this email because you opted in at our website.",
                "description": "Defines the message that is displayed to customers who opted in an email newsletter."
              },
              "website_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's website. It must be a valid URL format."
              }
            },
            "required": [
              "name"
            ]
          },
          "address": {
            "type": "object",
            "title": "Address",
            "description": "Defines the address details.",
            "properties": {
              "street": {
                "type": "string",
                "description": "Defines the brand's street."
              },
              "city": {
                "type": "string",
                "description": "Defines the brand's city."
              },
              "postal": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's postal code."
              },
              "state": {
                "type": "string",
                "description": "Defines the brand's state or similar administrative area."
              },
              "country": {
                "type": "string",
                "description": "Defines the brand's country."
              }
            },
            "required": [
              "street",
              "city",
              "postal",
              "country"
            ]
          },
          "contact": {
            "type": "object",
            "title": "Contact",
            "description": "Defines contact details.",
            "properties": {
              "email": {
                "type": "string",
                "description": "Defines the brand's email address. It must be a valid email format."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's phone number."
              }
            },
            "required": [
              "email"
            ]
          }
        },
        "required": [
          "brand",
          "address",
          "contact"
        ]
      },
      "ManagementProjectsBrandingCreateResponseBody": {
        "type": "object",
        "title": "Management Projects Branding Create Response Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/branding`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsBranding"
          }
        ]
      },
      "ManagementProjectsBrandingListResponseBody": {
        "type": "object",
        "description": "Object containing a list of brand configurations. It always contains one item.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the brand in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of brand objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of brand objects. It contains only one object.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsBranding"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of brand objects. It is always `1`."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsBrandingGetResponseBody": {
        "type": "object",
        "title": "Management Projects Branding Get Response Body",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/branding/{brandingId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsBranding"
          }
        ]
      },
      "ParameterBrandingId": {
        "type": "string",
        "example": "brd_06d06m1944y0630hD4y"
      },
      "ManagementProjectsBrandingUpdateRequestBody": {
        "type": "object",
        "title": "Brand",
        "properties": {
          "brand": {
            "type": "object",
            "title": "Brand",
            "description": "Defines basic brand details.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Defines brand name."
              },
              "privacy_policy_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's privacy policy."
              },
              "terms_of_use_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's terms of use."
              },
              "permission_reminder": {
                "type": "string",
                "description": "Defines the message that is displayed to customers who opted in an email newsletter."
              },
              "website_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's website."
              }
            }
          },
          "address": {
            "type": "object",
            "title": "Address",
            "description": "Defines the address details.",
            "properties": {
              "street": {
                "type": "string",
                "description": "Defines the brand's street."
              },
              "city": {
                "type": "string",
                "description": "Defines the brand's city."
              },
              "postal": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's postal code"
              },
              "state": {
                "type": "string",
                "description": "Defines the brand's state or similar administrative area."
              },
              "country": {
                "type": "string",
                "description": "Defines the brand's country."
              }
            }
          },
          "contact": {
            "type": "object",
            "title": "Contact",
            "description": "Defines contact details.",
            "properties": {
              "email": {
                "type": "string",
                "description": "Defines the brand's email address. It must be a valid email format."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's phone number."
              }
            }
          }
        }
      },
      "ManagementProjectsBrandingUpdateResponseBody": {
        "type": "object",
        "title": "Management Projects Branding Update Response Body",
        "description": "Response body schema for **PUT** `/management/v1/projects/{projectId}/branding/{brandingId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsBranding"
          }
        ]
      },
      "ManagementProjectBase": {
        "type": "object",
        "title": "Management Project Base",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the project."
          },
          "description": {
            "type": "string",
            "description": "A user-defined description of the project, e.g. its purpose, scope, region."
          },
          "timezone": {
            "type": "string",
            "description": "The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database."
          },
          "currency": {
            "type": "string",
            "description": "The currency used in the project. It is equal to a 3-letter ISO 4217 code."
          },
          "dial_code": {
            "type": "string",
            "nullable": true,
            "description": "The country dial code for the project. It is equal to an ITU country code."
          },
          "webhook_version": {
            "type": "string",
            "description": "The webhook version used in the project.",
            "default": "v2024-01-01",
            "enum": [
              "v2024-01-01"
            ]
          },
          "client_trusted_domains": {
            "type": "array",
            "description": "An array of URL addresses that allow client requests.",
            "items": {
              "type": "string"
            }
          },
          "client_redeem_enabled": {
            "type": "boolean",
            "description": "Enables client-side redemption."
          },
          "client_publish_enabled": {
            "type": "boolean",
            "description": "Enables client-side publication."
          },
          "client_list_vouchers_enabled": {
            "type": "boolean",
            "description": "Enables client-side listing of vouchers."
          },
          "client_create_customer_enabled": {
            "type": "boolean",
            "description": "Enables client-side creation of customers."
          },
          "client_loyalty_events_enabled": {
            "type": "boolean",
            "description": "Enables client-side events for loyalty and referral programs."
          },
          "client_set_voucher_expiration_date_enabled": {
            "type": "boolean",
            "description": "Enables client-side setting of voucher expiration date."
          },
          "webhooks_callout_notifications": {
            "type": "object",
            "title": "Webhook callout notification details",
            "description": "Determines the notification settings for webhook callouts configured in Distributions and Project settings.",
            "properties": {
              "distributions": {
                "type": "object",
                "description": "Determines the notification settings for webhooks sent through Distributions.",
                "properties": {
                  "email": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "in_app": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "emails": {
                    "type": "array",
                    "description": "An array of email addresses which will receive the notification.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "email",
                  "in_app",
                  "emails"
                ]
              },
              "webhooks": {
                "type": "object",
                "description": "Determines the notification settings for webhooks sent as set out in the Project settings.",
                "properties": {
                  "email": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "in_app": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "emails": {
                    "type": "array",
                    "description": "An array of email addresses which will receive the notification.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "email",
                  "in_app",
                  "emails"
                ]
              }
            },
            "required": [
              "distributions",
              "webhooks"
            ]
          }
        }
      },
      "UsageNotifications": {
        "type": "object",
        "title": "Usage notification details",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enables the notification."
          },
          "value": {
            "type": "integer",
            "minimum": 10,
            "maximum": 90,
            "description": "The percent value of the limit which, when reached, triggers the notification."
          },
          "in_app": {
            "type": "boolean",
            "description": "Enables the notification in the application."
          },
          "emails": {
            "type": "array",
            "title": "Email address",
            "description": "An array of email addresses which will receive the notification.",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "value",
          "emails",
          "in_app"
        ]
      },
      "ManagementProjectBaseWithConfig": {
        "type": "object",
        "description": "Object representing a project.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the project."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectBase"
          },
          {
            "type": "object",
            "properties": {
              "api_usage_notifications": {
                "type": "object",
                "title": "API Usage Notifications",
                "description": "Determines the notification settings.",
                "properties": {
                  "redemptions": {
                    "type": "object",
                    "description": "Determines the notification settings for redemptions. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "messages": {
                    "type": "object",
                    "description": "Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "bulk_api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "webhook_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "cycle_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  }
                },
                "required": [
                  "redemptions",
                  "messages",
                  "api_calls",
                  "bulk_api_calls",
                  "webhook_calls",
                  "cycle_calls"
                ]
              },
              "cluster_id": {
                "type": "string",
                "description": "The identifier of the cluster where the project will be created."
              },
              "case_sensitive_codes": {
                "type": "boolean",
                "description": "Determines if the vouchers in the project will be:\n- case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`),\n- case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`."
              },
              "api_version": {
                "type": "string",
                "description": "The API version used in the project. Currently, the default and only value is `v2018-08-01`.",
                "default": "v2018-08-01",
                "enum": [
                  "v2018-08-01"
                ]
              },
              "is_sandbox": {
                "type": "boolean",
                "description": "Determines if the project is a sandbox project."
              },
              "webhook_token": {
                "type": "string",
                "description": "Webhook token used for authentication."
              }
            }
          }
        ],
        "required": [
          "id",
          "name",
          "description",
          "currency",
          "timezone",
          "cluster_id",
          "api_version",
          "case_sensitive_codes",
          "client_trusted_domains",
          "client_redeem_enabled",
          "client_publish_enabled",
          "client_list_vouchers_enabled",
          "client_create_customer_enabled",
          "client_loyalty_events_enabled",
          "client_set_voucher_expiration_date_enabled",
          "api_usage_notifications",
          "webhooks_callout_notifications",
          "is_sandbox",
          "webhook_version",
          "webhook_token"
        ]
      },
      "ManagementProjectsAPIKeys": {
        "type": "object",
        "title": "Project and Side Keys",
        "description": "Returns `app_id` and `app_token` for the server-side and client-side authentication.",
        "properties": {
          "server_side_key": {
            "type": "object",
            "title": "Server-side key",
            "description": "Contains the `app_id` and `app_token` to authenticate server-side requests.",
            "properties": {
              "app_id": {
                "type": "string",
                "title": "Application ID",
                "description": "Application ID to be used as `X-App-Id` header in every HTTP request."
              },
              "app_token": {
                "type": "string",
                "title": "Application token",
                "description": "Application token to be used as `X-App-Token` header in every HTTP request.\n\nThe application token (secret key) for the server-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place."
              }
            }
          },
          "client_side_key": {
            "type": "object",
            "title": "Client-side key",
            "description": "Contains the `app_id` and `app_token` to authenticate client-side requests.",
            "properties": {
              "app_id": {
                "type": "string",
                "title": "Application ID",
                "description": "Application ID to be used as `X-App-Id` header in every HTTP request."
              },
              "app_token": {
                "type": "string",
                "title": "Application token",
                "description": "Application token to be used as `X-App-Token` header in every HTTP request.\n\nThe application token (secret key) for the client-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place."
              }
            }
          }
        }
      },
      "ManagementProject": {
        "title": "Management Project",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectBaseWithConfig"
          },
          {
            "type": "object",
            "properties": {
              "default_code_config": {
                "type": "object",
                "description": "Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.",
                "properties": {
                  "charset": {
                    "type": "string",
                    "description": "Lists all characters that are used as default for vouchers"
                  }
                },
                "required": [
                  "charset"
                ]
              },
              "limits": {
                "type": "object",
                "description": "Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.",
                "properties": {
                  "api_calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "Determines the limit of API calls per given unit time.",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "Determines the maximum number of API calls per time set in `\"duration\"`."
                        },
                        "duration": {
                          "type": "string",
                          "description": "Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour."
                        }
                      }
                    }
                  },
                  "bulk_api_calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "Determines the maximum number of API calls per time set in `\"duration\"`."
                        },
                        "duration": {
                          "type": "string",
                          "description": "Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "User": {
        "type": "object",
        "title": "User",
        "description": "Details about the user.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the user who has been assigned to the project."
          },
          "login": {
            "type": "string",
            "description": "The login data of the user who has been assigned to the project."
          },
          "email": {
            "type": "string",
            "description": "The email address of the user who has been assigned to the project."
          },
          "first_name": {
            "type": "string",
            "description": "The first name of the user who has been assigned to the project."
          },
          "last_name": {
            "type": "string",
            "description": "The last name of the user who has been assigned to the project."
          },
          "projects": {
            "type": "object",
            "description": "Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature).",
            "additionalProperties": {
              "type": "string",
              "description": "Returns the role the user has in the project."
            }
          },
          "is_owner": {
            "type": "boolean",
            "description": "Determines if the user is the owner for the organization in Voucherify."
          }
        },
        "required": [
          "id",
          "login",
          "email",
          "first_name",
          "last_name",
          "projects",
          "role",
          "is_owner"
        ]
      },
      "ParameterLimit": {
        "type": "integer",
        "maximum": 100,
        "minimum": 1
      },
      "Junction": {
        "title": "Junction",
        "description": "Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while  an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.",
        "enum": [
          "and",
          "or"
        ],
        "type": "string"
      },
      "FilterConditionsString": {
        "title": "Filter by conditions",
        "type": "object",
        "description": "Data filters used to narrow down the data records to be returned in the result.",
        "properties": {
          "$in": {
            "type": "array",
            "description": "Array of resource values that should be included in the results (multiple values).",
            "items": {
              "type": "string"
            }
          },
          "$not_in": {
            "type": "array",
            "description": "Array of resource values that should be included in the results (multiple values).",
            "items": {
              "type": "string"
            }
          },
          "$is": {
            "type": "string",
            "description": "Value is exactly this value (single value)."
          },
          "$is_not": {
            "type": "string",
            "description": "Results omit this value (single value)."
          },
          "$has_value": {
            "type": "string",
            "description": "Value is NOT null. The value for this parameter is an empty string."
          },
          "$is_unknown": {
            "type": "string",
            "description": "Value is null. The value for this parameter is an empty string."
          },
          "$starts_with": {
            "type": "string",
            "description": "Value starts with the specified string."
          },
          "$ends_with": {
            "type": "string",
            "description": "Value ends with the specified string."
          },
          "$contains": {
            "type": "string",
            "description": "Value includes the specified string."
          },
          "$not_contain": {
            "type": "string",
            "description": "Value does NOT include the specified string."
          }
        }
      },
      "CampaignTemplate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplateBase"
          },
          {
            "type": "object",
            "properties": {
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format.",
                "example": "2024-07-17T06:25:21.500Z"
              }
            }
          }
        ]
      },
      "TemplatesCampaignsNameDescription": {
        "type": "object",
        "title": "Update Campaign Template Request",
        "description": "Request body for updating a campaign template.",
        "properties": {
          "name": {
            "type": "string",
            "description": "User-defined name of the campaign template. It must be unique."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "User-defined description of the campaign template."
          }
        }
      },
      "CampaignTemplateBase": {
        "type": "object",
        "title": "Campaign Template Base",
        "description": "Stores details about a campaign template.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign template. It is assigned by Voucherify.",
            "example": "camp_tpl_eR9NsNJ5gqJRN2TG3fqCvbVl"
          },
          "name": {
            "type": "string",
            "description": "User-defined name of the campaign template."
          },
          "description": {
            "type": "string",
            "description": "User-defined description of the campaign template."
          },
          "campaign_type": {
            "type": "string",
            "description": "Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.",
            "enum": [
              "DISCOUNT_COUPONS",
              "GIFT_VOUCHERS"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.",
            "example": "2024-07-16T09:05:53.175Z"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "campaign_template"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "campaign_type",
          "created_at",
          "object"
        ]
      },
      "ManagementProjectsStackingRulesBase": {
        "type": "object",
        "description": "Object representing basic stacking rule parameters.",
        "properties": {
          "exclusive_categories": {
            "type": "array",
            "description": "Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.",
            "items": {
              "type": "string"
            }
          },
          "joint_categories": {
            "type": "array",
            "description": "Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.",
            "minimum": 1,
            "maximum": 30
          },
          "applicable_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be applied in one request. The number must be less than or equal to `redeemables_limit`. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "minimum": 1,
            "maximum": 30
          },
          "applicable_redeemables_per_category_limit": {
            "type": "integer",
            "nullable": true,
            "description": "Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to `applicable_redeemables_limit`. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "minimum": 1,
            "maximum": 30
          },
          "applicable_redeemables_category_limits": {
            "type": "object",
            "description": "Lists categories by category IDs (keys) and defines their limits (values) of applicable redeemables that belong to campaigns with that category.",
            "additionalProperties": {
              "type": "integer",
              "description": "Limit of applicable redeemables per category.",
              "minimum": 1,
              "maximum": 10
            }
          },
          "applicable_exclusive_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "minimum": 1,
            "maximum": 5
          },
          "applicable_exclusive_redeemables_per_category_limit": {
            "type": "integer",
            "nullable": true,
            "description": "Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`. The number must be less than or equal to `applicable_exclusive_redeemables_limit`.",
            "minimum": 1,
            "maximum": 30
          },
          "discount_calculation_mode": {
            "type": "string",
            "description": "Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.",
            "enum": [
              "INITIAL_AMOUNT",
              "DISCOUNTED_AMOUNT"
            ]
          },
          "initial_amount_mode_categories": {
            "type": "array",
            "description": "Lists the IDs of the categories that apply a discount based on the initial amount.",
            "items": {
              "type": "string"
            }
          },
          "discounted_amount_mode_categories": {
            "type": "array",
            "description": "Lists the IDs of the categories that apply a discount based on the discounted amount.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_application_mode": {
            "type": "string",
            "description": "Defines the application mode for redeemables.\n`\"ALL\"` means that all redeemables must be validated for the redemption to be successful.\n`\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.",
            "enum": [
              "ALL",
              "PARTIAL"
            ]
          },
          "redeemables_sorting_rule": {
            "type": "string",
            "description": "Defines redeemables sorting rule. `CATEGORY_HIERARCHY` means that redeemables are applied oaccording to the category priority. `REQUESTED_ORDER` means that redeemables are applied in the sequence provided in the request.",
            "enum": [
              "CATEGORY_HIERARCHY",
              "REQUESTED_ORDER"
            ]
          },
          "redeemables_products_application_mode": {
            "type": "string",
            "description": "Defines redeemables products application mode. `STACK` means that multiple discounts can be applied to a product. `ONCE` means that only one discount can be applied to the same product.",
            "enum": [
              "STACK",
              "ONCE"
            ]
          },
          "redeemables_no_effect_rule": {
            "type": "string",
            "description": "Defines redeemables no effect rule. `REDEEM_ANYWAY` means that the redeemable will be redeemed regardless of any restrictions or conditions in place. `SKIP` means that the redeemable will be processed only when an applicable effect is calculated.",
            "enum": [
              "REDEEM_ANYWAY",
              "SKIP"
            ]
          },
          "no_effect_skip_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are skipped even if the `redeemables_no_effect_rule` is set to `REDEEM_ANYWAY`. Category IDs can't overlap with the IDs in `no_effect_redeem_anyway_categories`.",
            "items": {
              "type": "string"
            }
          },
          "no_effect_redeem_anyway_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are redeemed anyway even if the `redeemables_no_effect_rule` is set to `SKIP`. Category IDs can't overlap with the IDs in `no_effect_skip_categories`.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_rollback_order_mode": {
            "type": "string",
            "description": "Defines the rollback mode for the order. `WITH_ORDER` is a default setting. The redemption is rolled back together with the data about the order, including related discount values. `WITHOUT_ORDER` allows rolling the redemption back without affecting order data, including the applied discount values.",
            "enum": [
              "WITH_ORDER",
              "WITHOUT_ORDER"
            ]
          }
        }
      },
      "ManagementProjectsStackingRules": {
        "type": "object",
        "description": "Object representing the details of the stacking rules.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier of the stacking rules."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRulesBase"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-01-02T08:31:46.562Z"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              }
            }
          }
        ],
        "required": [
          "exclusive_categories",
          "joint_categories",
          "redeemables_limit",
          "applicable_redeemables_limit",
          "applicable_redeemables_per_category_limit",
          "applicable_redeemables_category_limits",
          "applicable_exclusive_redeemables_limit",
          "applicable_exclusive_redeemables_per_category_limit",
          "discount_calculation_mode",
          "initial_amount_mode_categories",
          "discounted_amount_mode_categories",
          "redeemables_application_mode",
          "redeemables_sorting_rule",
          "redeemables_products_application_mode",
          "redeemables_no_effect_rule",
          "no_effect_skip_categories",
          "no_effect_redeem_anyway_categories",
          "redeemables_rollback_order_mode"
        ]
      },
      "ManagementProjectsMetadataSchemaDefinition": {
        "type": "object",
        "title": "Metadata Definitions",
        "description": "Custom definition name. This is also shown in **Project Settings** > **Metadata Schema** in the Voucherify Dashboard.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Indicates the type of metadata. Note that `\"geopoint\"` type is a paid feature.",
            "enum": [
              "string",
              "number",
              "object",
              "date",
              "datetime",
              "geopoint",
              "boolean",
              "image_url"
            ]
          },
          "optional": {
            "type": "boolean",
            "description": "Indicates if this definition is optional or not for the resource."
          },
          "array": {
            "type": "boolean",
            "description": "Indicates if the definition is an array."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates if the definition has been deleted from the schema."
          },
          "object_type": {
            "type": "string",
            "nullable": true,
            "description": "The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is `null` for other types."
          },
          "min_length": {
            "type": "integer",
            "description": "Value indicating the minimum length. Available only for the `string` type."
          },
          "max_length": {
            "type": "integer",
            "description": "Value indicating the maximum length. Available only for the `string` type."
          },
          "exact_length": {
            "type": "integer",
            "description": "Value indicating the exact length. Available only for the `string` type."
          },
          "eq": {
            "type": "array",
            "description": "Array of values that are allowed. Available only for the `string` and `number` types.",
            "items": {
              "oneOf": [
                {
                  "title": "Add number",
                  "description": "Adds numbers to the array. The value should be up to two decimal places.",
                  "type": "number"
                },
                {
                  "title": "Add string",
                  "description": "Adds strings to the array.",
                  "type": "string"
                }
              ]
            }
          },
          "ne": {
            "type": "array",
            "description": "Array of values that are not allowed. Available only for the `number` type.",
            "items": {
              "description": "Adds number to the array. The value should be up to two decimal places.",
              "type": "number"
            }
          },
          "lt": {
            "type": "number",
            "description": "A property of the `number` type must have `less than` this value. The value should be up to two decimal places."
          },
          "lte": {
            "type": "number",
            "description": "A property of the `number` type must be `less than or equal` to this value. The value should be up to two decimal places."
          },
          "gt": {
            "type": "number",
            "description": "A property of `number` type must be `greater than` this value. The value should be up to two decimal places."
          },
          "gte": {
            "type": "number",
            "description": "A property of `number` type must be `greater than or equal` to this value. The value should be up to two decimal places."
          }
        },
        "required": [
          "type",
          "optional",
          "array"
        ]
      },
      "ManagementProjectsMetadataSchema": {
        "type": "object",
        "description": "Object representing a metadata schema.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the metadata schema."
              },
              "related_object": {
                "type": "string",
                "description": "The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Contains metadata definitions.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemaDefinition"
                }
              }
            },
            "required": [
              "properties"
            ]
          },
          {
            "type": "object",
            "properties": {
              "allow_defined_only": {
                "type": "boolean",
                "nullable": true,
                "description": "Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values."
              },
              "created_at": {
                "type": "string",
                "example": "2021-12-03T13:33:44.556Z",
                "description": "Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "example": "2022-08-11T08:05:30.695Z",
                "description": "Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "object": {
                "type": "string",
                "default": "metadata_schema",
                "description": "The type of the object represented by the JSON. This object stores information about the metadata schema."
              }
            }
          }
        ],
        "required": [
          "id",
          "related_object",
          "properties",
          "allow_defined_only",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "ManagementProjectsCustomEventSchemaBase": {
        "type": "object",
        "title": "Custom Event Schema",
        "description": "Object representing a custom event schema.",
        "properties": {
          "schema": {
            "type": "object",
            "description": "Object containing custom event schema and its custom attributes (metadata).",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Defines custom event custom attributes (metadata).",
                "additionalProperties": {
                  "type": "object",
                  "title": "Custom Event Properties",
                  "description": "Custom event metadata name.",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Indicates the type of the custom event.",
                      "enum": [
                        "string",
                        "number",
                        "date",
                        "datetime",
                        "boolean"
                      ]
                    },
                    "optional": {
                      "type": "boolean",
                      "description": "Indicates if this property is optional or not for the resource."
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Indicates if the property has been deleted from the schema. A deleted schema is inactive, but it can be restored."
                    }
                  },
                  "required": [
                    "type",
                    "optional"
                  ]
                }
              }
            },
            "required": [
              "properties"
            ]
          }
        }
      },
      "ManagementProjectsCustomEventSchema": {
        "type": "object",
        "title": "Management Projects Custom Event Schema",
        "description": "Object containing the response to creating a custom event schema.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the custom event schema.",
                "example": "ms_oA8CawM07Q8i05Cx62U6euTK"
              },
              "name": {
                "type": "string",
                "title": "Custom Event Name",
                "description": "User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemaBase"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-03-27T08:00:09.472Z"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-03-27T08:00:09.472Z"
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "example": "custom-event-schema",
                "default": "custom-event-schema",
                "enum": [
                  "custom-event-schema"
                ]
              }
            }
          }
        ],
        "required": [
          "id",
          "name",
          "schema",
          "created_at",
          "object"
        ]
      },
      "ManagementProjectsWebhookBase": {
        "type": "object",
        "description": "",
        "properties": {
          "target_url": {
            "type": "string",
            "description": "URL address that receives webhooks."
          },
          "events": {
            "type": "array",
            "description": "Lists the events that trigger webhook sendout.",
            "items": {
              "type": "string",
              "enum": [
                "business_validation_rule.assignment.created",
                "business_validation_rule.assignment.deleted",
                "business_validation_rule.created",
                "business_validation_rule.deleted",
                "business_validation_rule.updated",
                "campaign.created",
                "campaign.deleted",
                "campaign.disabled",
                "campaign.enabled",
                "campaign.earning_rule.assigned",
                "campaign.earning_rule.deleted",
                "campaign.earning_rule.disabled",
                "campaign.earning_rule.enabled",
                "campaign.earning_rule.updated",
                "campaign.loyalty_tier.created",
                "campaign.loyalty_tier.deleted",
                "campaign.loyalty_tier.updated",
                "campaign.promotion_stack.created",
                "campaign.promotion_stack.updated",
                "campaign.promotion_tier.created",
                "campaign.promotion_tier.deleted",
                "campaign.promotion_tier.disabled",
                "campaign.promotion_tier.enabled",
                "campaign.promotion_tier.updated",
                "campaign.referral_tier.created",
                "campaign.referral_tier.deleted",
                "campaign.referral_tier.updated",
                "campaign.reward.assignment.created",
                "campaign.reward.assignment.deleted",
                "campaign.reward.assignment.updated",
                "campaign.updated",
                "campaign.vouchers.aded",
                "campaign.vouchers.generation.completed",
                "campaign.vouchers.generation.failed",
                "campaign.vouchers.generation.started",
                "customer.confirmed",
                "customer.created",
                "customer.deleted",
                "customer.rewarded",
                "customer.rewarded.loyalty_points",
                "publication.succeeded",
                "redemption.failed",
                "redemption.rollback.failed",
                "redemption.rollback.succeeded",
                "redemption.succeeded",
                "voucher.created",
                "voucher.deleted",
                "voucher.disabled",
                "voucher.enabled",
                "voucher.gift.balance_aded",
                "voucher.gift.transaction.created",
                "voucher.loyalty_card.pending_points.activated",
                "voucher.loyalty_card.pending_points.aded",
                "voucher.loyalty_card.pending_points.canceled",
                "voucher.loyalty_card.pending_points.updated",
                "voucher.loyalty_card.points_aded",
                "voucher.loyalty_card.points_expired",
                "voucher.loyalty_card.transaction.created",
                "voucher.published",
                "voucher.updated"
              ]
            }
          },
          "active": {
            "type": "boolean",
            "description": "Determines if the webhook configuration is active.",
            "default": true
          }
        }
      },
      "ManagementProjectsWebhook": {
        "type": "object",
        "title": "Management Projects Webhook",
        "description": "Response body schema for webhook endpoints.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the webhook.",
                "example": "wh_i45Uez36Uz8XNW6PXC0eyGmb"
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "default": "webhook",
                "enum": [
                  "webhook"
                ]
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-01-02T08:31:46.562Z"
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhookBase"
          }
        ],
        "required": [
          "id",
          "object",
          "created_at",
          "target_url",
          "events",
          "active"
        ]
      },
      "ManagementProjectsBranding": {
        "type": "object",
        "title": "Brand Response",
        "description": "Response brand schema.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the brand configuration."
          },
          "brand": {
            "type": "object",
            "title": "Brand",
            "description": "Defines basic brand details.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Defines brand name."
              },
              "privacy_policy_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's privacy policy. It must be a valid URL format."
              },
              "terms_of_use_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's terms of use.  It must be a valid URL format."
              },
              "permission_reminder": {
                "type": "string",
                "description": "Defines the message that is displayed to customers who opted in an email newsletter."
              },
              "website_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's website. It must be a valid URL format."
              }
            },
            "required": [
              "name",
              "privacy_policy_url",
              "terms_of_use_url",
              "permission_reminder",
              "website_url"
            ]
          },
          "address": {
            "type": "object",
            "title": "Address",
            "description": "Defines the address details.",
            "properties": {
              "street": {
                "type": "string",
                "description": "Defines the brand's street."
              },
              "city": {
                "type": "string",
                "description": "Defines the brand's city."
              },
              "postal": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's postal code."
              },
              "state": {
                "type": "string",
                "description": "Defines the brand's state or similar administrative area."
              },
              "country": {
                "type": "string",
                "description": "Defines the brand's country."
              }
            },
            "required": [
              "street",
              "city",
              "postal",
              "state",
              "country"
            ]
          },
          "contact": {
            "type": "object",
            "title": "Contact",
            "description": "Defines contact details.",
            "properties": {
              "email": {
                "type": "string",
                "description": "Defines the brand's email address. It must be a valid email format."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's phone number."
              }
            },
            "required": [
              "email",
              "phone"
            ]
          }
        },
        "required": [
          "id",
          "brand",
          "address",
          "contact"
        ]
      }
    },
    "parameters": {
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterLimit"
        },
        "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."
      }
    },
    "securitySchemes": {
      "X-Management-Id": {
        "type": "apiKey",
        "name": "X-Management-Id",
        "in": "header"
      },
      "X-Management-Token": {
        "type": "apiKey",
        "name": "X-Management-Token",
        "in": "header"
      }
    }
  }
}