# /getTicketTypes

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

With this functionality you can retrieve the availability of a specified article (ticket type).

**note**

* This function only shows tickettypes that have been made available for sale through API.
* PosId (PLU-code) is a unique identifier that can be set within the ticketing system to match products to external systems.

**HMAC calculation:**
Base64 encode - SHA256(apiKey)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Scan API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://globalticket.com/webservices/scanapi"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/getTicketTypes": {
      "post": {
        "summary": "/getTicketTypes",
        "description": "",
        "operationId": "gettickettypes-2",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "apiKey",
                  "HMACKey"
                ],
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "description": "Your public apiKey needs to be included in every request"
                  },
                  "HMACKey": {
                    "type": "string",
                    "description": "The HMACKey is calculated based on the input fields"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"success\": true,\n  \"ticketTypes\":[\n    {\n      \"ticketTypeId\": 1,\n      \"title\": \"Volwassene\",\n      \"price\": 1,\n      \"posId\": 1234\n    }]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "ticketTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ticketTypeId": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "title": {
                            "type": "string",
                            "example": "Volwassene"
                          },
                          "price": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "posId": {
                            "type": "integer",
                            "example": 1234,
                            "default": 0
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "4XX",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"success\":true,\n  \"errorCode\":1,\n\t\"errorMessage\":\"contactInfo add was successfully.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "errorCode": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "errorMessage": {
                      "type": "string",
                      "example": "contactInfo add was successfully."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62b1d31f161f1601e7ec3d31:62b2dcfd84363101ef6096b5"
}
```