# /cancelCompleteReservation

[block:api-header]
{
  "title": "Description:"
}
[/block]

With this function you can cancel a complete reservation. This is only possible with a valid reservationId and if the user allows to cancel a complete reservation.

**HMAC calculation**
Baseball 64 encode - SHA256 (apiKey + environment + reservationId + userId)

* Sort the sign data alphabetical ascending, you can also find the sequence on the concerned API specification page.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Global Reseller",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://globalreseller.nl/webservices/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/cancelCompleteReservation": {
      "post": {
        "summary": "/cancelCompleteReservation",
        "description": "",
        "operationId": "cancelcompletereservation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey",
                  "environment",
                  "userId",
                  "reservationId",
                  "HMACKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "description": "Your public apiKey needs to be included in every request."
                  },
                  "environment": {
                    "type": "string",
                    "description": "\"test\" or \"production\"",
                    "enum": [
                      "production",
                      "test"
                    ]
                  },
                  "userId": {
                    "type": "integer",
                    "description": "The userId is a reference to the user (museum / attraction). The userId can be requested via getAvailableUsers and can be cached in your application.",
                    "format": "int32"
                  },
                  "reservationId": {
                    "type": "integer",
                    "description": "Include the reservationId from the /completeReservation request.",
                    "format": "int32"
                  },
                  "HMACKey": {
                    "type": "string",
                    "description": "The HMACKey is calculated based on the input fields."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"success\":true,\n\t\"message\":\"contactInfo add was successfully.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "message": {
                      "type": "string",
                      "example": "contactInfo add was successfully."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"success\":false,\n\t\"message\":\"contactInfo add failed.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "message": {
                      "type": "string",
                      "example": "contactInfo add failed."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Cache-Control",
        "value": "no-cache"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62b068c7795387013326be5c:62b1c94560ea1d0097e70856"
}
```