# Create Reservation

This endpoint can be used to create a reservation in your event. This will not directly complete the reservation into an complete order.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "General Admission Partner API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.ticketing.cm.com/partnerapi/v1.0"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/events/{event_uuid}/reservations/create": {
      "post": {
        "summary": "Create Reservation",
        "description": "This endpoint can be used to create a reservation in your event. This will not directly complete the reservation into an complete order.",
        "operationId": "create-reservation",
        "parameters": [
          {
            "name": "X-TF-PREFERREDLANGUAGEID",
            "in": "header",
            "description": "Preferred order language. Will be used to determine the language of the confirmation e-mail. Valid values are: EN/NL/DE/FR",
            "schema": {
              "type": "string",
              "default": "EN"
            }
          },
          {
            "name": "event_uuid",
            "in": "path",
            "description": "Uuid of your event. Example: 00000000-0000-0000-0000-000000000000",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-TF-DISTRIBUTION-METHOD",
            "in": "header",
            "description": "Distribution method, available values: EMAIL/NONE",
            "schema": {
              "type": "string",
              "default": "EMAIL"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "order_type": {
                    "type": "string",
                    "description": "Defined the type of the order",
                    "default": "ORDER",
                    "enum": [
                      "ORDER",
                      "GUEST_LIST"
                    ]
                  },
                  "external_batch_id": {
                    "type": "string",
                    "description": "Optional parameter which can be used to provide your own order reference. Max 40 characters. When filled in no confirmation e-mail will be sent out as CM assumes you already handled it in your own system."
                  },
                  "customer_data": {
                    "type": "object",
                    "description": "Contains the customer details of the ticket buyer",
                    "properties": {
                      "first_name": {
                        "type": "string",
                        "description": "Required. Max 128 characters."
                      },
                      "initials": {
                        "type": "string",
                        "description": "Optional. Max 20 characters."
                      },
                      "last_name": {
                        "type": "string",
                        "description": "Required. Max 128 characters."
                      },
                      "email": {
                        "type": "string",
                        "description": "Required. Max 255 characters."
                      },
                      "mobile": {
                        "type": "string",
                        "description": "Optional. Max 32 characters."
                      },
                      "gender": {
                        "type": "string",
                        "description": "Optional.",
                        "enum": [
                          "M",
                          "F",
                          null
                        ]
                      },
                      "address_line_1": {
                        "type": "string",
                        "description": "Optional. Max 255 characters"
                      },
                      "adress_line_1_building_number": {
                        "type": "string",
                        "description": "Optional. Max 20 characters."
                      },
                      "address_line_2": {
                        "type": "string",
                        "description": "Optional. Max 255 characters."
                      },
                      "address_line_2_building_number": {
                        "type": "string",
                        "description": "Optional. Max 20 characters."
                      },
                      "zipcode": {
                        "type": "string",
                        "description": "Optional. Max 20 characters."
                      },
                      "city": {
                        "type": "string",
                        "description": "Optional. Max 64 characters."
                      },
                      "state": {
                        "type": "string",
                        "description": "Optional. Max 64 characters."
                      },
                      "organization_name": {
                        "type": "string",
                        "description": "Optional. Max 128 characters."
                      },
                      "position_name": {
                        "type": "string",
                        "description": "Optional. Max 128 characters."
                      },
                      "date_of_birth": {
                        "type": "string",
                        "description": "Optional. Format yyyy-mm-dd.",
                        "format": "date"
                      },
                      "custom_field_1": {
                        "type": "string",
                        "description": "Optional. Max 255 characters. Can be used for additional details not covered in other fields."
                      },
                      "custom_field_2": {
                        "type": "string",
                        "description": "Optional. Max 255 characters. Can be used for additional details not covered in other fields."
                      },
                      "custom_field_3": {
                        "type": "string",
                        "description": "Optional. Max 255 characters. Can be used for additional details not covered in other fields."
                      }
                    }
                  },
                  "ticket_types": {
                    "type": "array",
                    "description": "Contains the tickets that will be added to the reservation",
                    "items": {
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "description": "The uuid of your ticket type"
                        },
                        "amount": {
                          "type": "integer",
                          "description": "The amount of tickets that will be added",
                          "format": "int32"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"order_id\": \"V179946815\",\n\t\"order_uuid\": \"00000000-0000-0000-0000-000000000000\",\n\t\"external_batch_id\": \"1b5d34ae08a0\",\n\t\"total_balance_incl_vat\": 0,\n\t\"currency_id\": \"EUR\",\n\t\"requested_language_id\": \"EN\",\n  \"download_url\": null,    \n\t\"customer_data\": {\n\t\t\"uuid\": \"00000000-0000-0000-0000-000000000000\",\n\t\t\"first_name\": \"John\",\n\t\t\"last_name\": \"Doe\",\n\t\t\"organisation\": \"CM.com\",\n\t\t\"email\": \"john.doe@example.com\",\n\t\t\"phone_number\": \"+31618895899\",\n\t\t\"custom_field_1\": \"Dietary preference: Vegetarian\",\n\t\t\"custom_field_2\": null,\n\t\t\"custom_field_3\": null\n\t},\n\t\"barcodes\": [\n\t\t{\n\t\t\t\"uuid\": \"00000000-0000-0000-0000-000000000000\",\n\t\t\t\"barcode_id\": \"IANEDVJORX\",\n\t\t\t\"barcode_type_id\": \"QRCODE\",\n      \"external_barcode_id\": null,\n\t\t\t\"price\": 0,\n\t\t\t\"currency_id\": \"EUR\",\n\t\t\t\"ticket_type\": {\n\t\t\t\t\"uuid\": \"00000000-0000-0000-0000-000000000000\",\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"nl\": \"Entree Ticket\",\n\t\t\t\t\t\"en\": \"Entrance Ticket\",\n\t\t\t\t\t\"fr\": \"\",\n\t\t\t\t\t\"de\": \"\"\n\t\t\t\t},\n\t\t\t\t\"subtitle\": {\n\t\t\t\t\t\"nl\": \"\",\n\t\t\t\t\t\"en\": \"\",\n\t\t\t\t\t\"fr\": \"\",\n\t\t\t\t\t\"de\": \"\"\n\t\t\t\t},\n\t\t\t\t\"ticket_product_sub_type_id\": \"ENTRANCE_TICKET\",\n\t\t\t\t\"external_reference_2\": null,\n\t\t\t\t\"external_reference_3\": null\n\t\t\t},\n\t\t\t\"customer_data\": {\n        \"uuid\": \"00000000-0000-0000-0000-000000000000\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"organisation\": \"CM.com\",\n        \"email\": \"john.doe@example.com\",\n        \"phone_number\": \"+31618895899\",\n        \"custom_field_1\": \"Dietary preference: Vegetarian\",\n        \"custom_field_2\": null,\n        \"custom_field_3\": null\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"uuid\": \"00000000-0000-0000-0000-000000000000\",\n\t\t\t\"barcode_id\": \"FBCYGOCDES\",\n\t\t\t\"barcode_type_id\": \"QRCODE\",\n      \"external_barcode_id\": null,\n\t\t\t\"price\": 0,\n\t\t\t\"currency_id\": \"EUR\",\n\t\t\t\"ticket_type\": {\n\t\t\t\t\"uuid\": \"00000000-0000-0000-0000-000000000000\",\n\t\t\t\t\"name\": {\n\t\t\t\t\t\"nl\": \"Entree Ticket\",\n\t\t\t\t\t\"en\": \"Entrance Ticket\",\n\t\t\t\t\t\"fr\": \"\",\n\t\t\t\t\t\"de\": \"\"\n\t\t\t\t},\n\t\t\t\t\"subtitle\": {\n\t\t\t\t\t\"nl\": \"\",\n\t\t\t\t\t\"en\": \"\",\n\t\t\t\t\t\"fr\": \"\",\n\t\t\t\t\t\"de\": \"\"\n\t\t\t\t},\n\t\t\t\t\"ticket_product_sub_type_id\": \"ENTRANCE_TICKET\",\n\t\t\t\t\"external_reference_2\": null,\n\t\t\t\t\"external_reference_3\": null\n\t\t\t},\n\t\t\t\"customer_data\": {\n        \"uuid\": \"00000000-0000-0000-0000-000000000000\",\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"organisation\": \"CM.com\",\n        \"email\": \"john.doe@example.com\",\n        \"phone_number\": \"+31618895899\",\n        \"custom_field_1\": \"Dietary preference: Vegetarian\",\n        \"custom_field_2\": null,\n        \"custom_field_3\": null\n\t\t\t}\n\t\t}\n\t]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "string",
                      "example": "V179946815"
                    },
                    "order_uuid": {
                      "type": "string",
                      "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "external_batch_id": {
                      "type": "string",
                      "example": "1b5d34ae08a0"
                    },
                    "total_balance_incl_vat": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "currency_id": {
                      "type": "string",
                      "example": "EUR"
                    },
                    "requested_language_id": {
                      "type": "string",
                      "example": "EN"
                    },
                    "download_url": {},
                    "customer_data": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string",
                          "example": "00000000-0000-0000-0000-000000000000"
                        },
                        "first_name": {
                          "type": "string",
                          "example": "John"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Doe"
                        },
                        "organisation": {
                          "type": "string",
                          "example": "CM.com"
                        },
                        "email": {
                          "type": "string",
                          "example": "john.doe@example.com"
                        },
                        "phone_number": {
                          "type": "string",
                          "example": "+31618895899"
                        },
                        "custom_field_1": {
                          "type": "string",
                          "example": "Dietary preference: Vegetarian"
                        },
                        "custom_field_2": {},
                        "custom_field_3": {}
                      }
                    },
                    "barcodes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "example": "00000000-0000-0000-0000-000000000000"
                          },
                          "barcode_id": {
                            "type": "string",
                            "example": "IANEDVJORX"
                          },
                          "barcode_type_id": {
                            "type": "string",
                            "example": "QRCODE"
                          },
                          "external_barcode_id": {},
                          "price": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "currency_id": {
                            "type": "string",
                            "example": "EUR"
                          },
                          "ticket_type": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "example": "00000000-0000-0000-0000-000000000000"
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "nl": {
                                    "type": "string",
                                    "example": "Entree Ticket"
                                  },
                                  "en": {
                                    "type": "string",
                                    "example": "Entrance Ticket"
                                  },
                                  "fr": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "de": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              },
                              "subtitle": {
                                "type": "object",
                                "properties": {
                                  "nl": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "en": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "fr": {
                                    "type": "string",
                                    "example": ""
                                  },
                                  "de": {
                                    "type": "string",
                                    "example": ""
                                  }
                                }
                              },
                              "ticket_product_sub_type_id": {
                                "type": "string",
                                "example": "ENTRANCE_TICKET"
                              },
                              "external_reference_2": {},
                              "external_reference_3": {}
                            }
                          },
                          "customer_data": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "example": "00000000-0000-0000-0000-000000000000"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "John"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Doe"
                              },
                              "organisation": {
                                "type": "string",
                                "example": "CM.com"
                              },
                              "email": {
                                "type": "string",
                                "example": "john.doe@example.com"
                              },
                              "phone_number": {
                                "type": "string",
                                "example": "+31618895899"
                              },
                              "custom_field_1": {
                                "type": "string",
                                "example": "Dietary preference: Vegetarian"
                              },
                              "custom_field_2": {},
                              "custom_field_3": {}
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error\": {\n        \"message\": \"There is not enough stock left.\",\n        \"error_code\": 400157,\n        \"error_details\": null\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "There is not enough stock left."
                        },
                        "error_code": {
                          "type": "integer",
                          "example": 400157,
                          "default": 0
                        },
                        "error_details": {}
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-TF-PREFERREDLANGUAGEID",
        "value": "Language ID"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "63aafdb047058c0010db405f:65f19b92188ade00750e4184"
}
```