---
agentTools:
  projectIndex: https://docs.zenoti.com/llms.txt
---

# Mark an appointment as confirm or undo confirm

This API confirms a visit or is used to undo a confirmed visit.

## Request Model

### ChangeAppointmentStatusRequest

| Json Property   | Data Type | Description                                                              |
| --------------- | --------- | ------------------------------------------------------------------------ |
| updated\_by\_id | Guid      | Identifier of the user performing the confirm or undo-confirm operation. |

## Response Model

If the call is successful, the error object in your response will be null.

### ConfirmAppointmentResponse

| Json Property | Data Type       | Description                                                   |
| ------------- | --------------- | ------------------------------------------------------------- |
| error         | APIV2ErrorModel | Error details. Returns null when the operation is successful. |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Zenoti API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.zenoti.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-default": "apikey <your api key>"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/invoices/{invoice_id}/confirm": {
      "put": {
        "summary": "Mark an appointment as confirm or undo confirm",
        "description": "This API confirms a visit or is used to undo a confirmed visit.",
        "operationId": "mark-an-appointment-as-confirm-or-undo-confirm",
        "parameters": [
          {
            "name": "undo_confirm",
            "in": "query",
            "description": "Set to true to undo a confirmed appointment. Omit or set to false to confirm the appointment.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "invoice_id",
            "in": "path",
            "description": "Unique identifier of the invoice associated with the appointment.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "RAW_BODY": {
                    "type": "string"
                  }
                }
              },
              "examples": {
                "Scenario 1: Undo Confirm a New Appointment; Wrong User ID - It considers User ID from Bearer token": {
                  "value": {
                    "updated_by_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de"
                  }
                },
                "Scenario 2: Provide Wrong Invoice ID": {
                  "value": {
                    "updated_by_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de"
                  }
                },
                "Scenario 3: Confirm a New Appt;": {
                  "value": {
                    "updated_by_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de"
                  }
                },
                "Scenario 4: Undo-Confirm an appointment": {
                  "value": {
                    "updated_by_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de"
                  }
                },
                "Scenario 5: Confirm a confirmed Appointment": {
                  "value": {
                    "updated_by_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de"
                  }
                },
                "Scenario 6: Wrong Invoice ID using API KEY": {
                  "value": {
                    "updated_by_id": "b793463d-2f03-43e5-ae47-a5a1c1be0de6"
                  }
                },
                "Scenario 7: Do not pass updated_by_id via API KEY": {
                  "value": {}
                },
                "Scenario 8: Enter Guest API Key, and pass a different guest ID from the booked appointment guest": {
                  "value": {
                    "updated_by_id": "F9F55E6D-134A-4902-8B88-440D61E02FCD"
                  }
                },
                "Scenario 9: Confirm an Appt using API Key": {
                  "value": {
                    "updated_by_id": "5D2CDE8C-08C6-4975-AB7D-0771E700EF3D"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Scenario 3: Confirm a New Appt;": {
                    "value": "{\n    \"error\": null\n}"
                  },
                  "Scenario 4: Undo-Confirm an appointment": {
                    "value": "{\n    \"error\": null\n}"
                  },
                  "Scenario 9: Confirm an Appt using API Key": {
                    "value": "Response:\n{\n    \"error\": null\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Scenario 3: Confirm a New Appt;",
                      "type": "object",
                      "properties": {
                        "error": {}
                      }
                    },
                    {
                      "title": "Scenario 4: Undo-Confirm an appointment",
                      "type": "object",
                      "properties": {
                        "error": {}
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Scenario 1: Undo Confirm a New Appointment; Wrong User ID - It considers User ID from Bearer token": {
                    "value": "{\n    \"error\": {\n        \"code\": \"GE000\",\n        \"message\": \"Status change not allowed\"\n    }\n}"
                  },
                  "Scenario 2: Provide Wrong Invoice ID": {
                    "value": "{\n    \"error\": {\n        \"code\": \"IA204\",\n        \"message\": \"Could not find Invoice with passed Invoice ID\"\n    }\n}"
                  },
                  "Scenario 5: Confirm a confirmed Appointment": {
                    "value": "{\n    \"error\": {\n        \"code\": \"GE000\",\n        \"message\": \"Status change not allowed\"\n    }\n}"
                  },
                  "Scenario 6: Wrong Invoice ID using API KEY": {
                    "value": "{\n    \"error\": {\n        \"code\": \"IA204\",\n        \"message\": \"Could not find Invoice with passed Invoice ID\"\n    }\n}"
                  },
                  "Scenario 7: Do not pass updated_by_id via API KEY": {
                    "value": "{\n    \"error\": {\n        \"code\": \"AA173\",\n        \"message\": \"Updated by ID is missing. Please pass Employee ID\"\n    }\n}"
                  },
                  "Scenario 8: Enter Guest API Key, and pass a different guest ID from the booked appointment guest": {
                    "value": "{\n    \"error\": {\n        \"code\": \"IA202\",\n        \"message\": \"Guest can confirm his/her own appointments\"\n    }\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Scenario 1: Undo Confirm a New Appointment; Wrong User ID - It considers User ID from Bearer token",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "GE000"
                            },
                            "message": {
                              "type": "string",
                              "example": "Status change not allowed"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Scenario 2: Provide Wrong Invoice ID",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "IA204"
                            },
                            "message": {
                              "type": "string",
                              "example": "Could not find Invoice with passed Invoice ID"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Scenario 5: Confirm a confirmed Appointment",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "GE000"
                            },
                            "message": {
                              "type": "string",
                              "example": "Status change not allowed"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Scenario 6: Wrong Invoice ID using API KEY",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "IA204"
                            },
                            "message": {
                              "type": "string",
                              "example": "Could not find Invoice with passed Invoice ID"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Scenario 7: Do not pass updated_by_id via API KEY",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "AA173"
                            },
                            "message": {
                              "type": "string",
                              "example": "Updated by ID is missing. Please pass Employee ID"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Scenario 8: Enter Guest API Key, and pass a different guest ID from the booked appointment guest",
                      "type": "object",
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "IA202"
                            },
                            "message": {
                              "type": "string",
                              "example": "Guest can confirm his/her own appointments"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62a1f7e28e84bc001add6642:67af1c8a204e930025ef0978"
}
```