swagger: "2.0"
schemes:
  - https
host: demo.pims.io
basePath: /api/v1
info:
  contact:
    email: support@pims.io
  description: |-
    
    Hereafter is the documentation of the private API of [Pims: Pointages Intelligents pour le Monde du Spectacle](https://pims.io). This API is designed for 3rd-party softwares, editors and partners. Its main purpose is to give access the core data of a Pims customer (i.e. events, ticket counts and promotions).

    ## Authentication
    The API uses [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication), meaning you will need a username and password to get authorized.

    As each customer in Pims has its own domain (e.g. caramba.pims.io, gdp.pims.io...), each credentials will be valid for one domain/customer only. If you need dedicated credentials for one domain, please contact us. (In any case, we will need an explicit agreement from the customer before we create these credentials.)

    <div class="info">
    To make your life easy, you can try all endpoints with the public credentials below, pointing to our [demo domain](https://demo.pims.io):
      <ul>
        <li>Base path: `https://demo.pims.io/api`</li>
        <li>Username: `demo`</li>
        <li>Password: `q83792db2GCvgYVdKpU3yG3R`</li>
      </ul>
    </div>

    ## Response format
    The API returns JSON and matches the [HAL specification](http://stateless.co/hal_specification.html). The `Content-Type` of each response will be `application/hal+json`, unless an error occurs.

    Please note that this documentation describes all responses “as if” they were plain JSON. The specificities of HAL are ignored on purpose, in order to remain compact and avoid repetition.
    <div style="-webkit-column-count: 2; -moz-column-count: 2; column-count: 2; -webkit-column-rule: 1px dotted #e0e0e0; -moz-column-rule: 1px dotted #e0e0e0; column-rule: 1px dotted #e0e0e0;">
    	<div style="display: inline-block; width:100%;">
    		<strong>So when you read in the doc:</strong>
    <pre><code class="lang-json">{
    	<span class="token string">"id"</span>: <span class="token number">123</span>,
    	<span class="token string">"property1"</span>: <span class="token string">"Lorem ipsum"</span>,
    	<span class="token string">"object"</span>: {
    		<span class="token string">"id"</span>: <span class="token number">456</span>,
    		<span class="token string">"property2"</span>: <span class="token number">7.89</span>
    	}
    }</code></pre>
    	</div>
    	<div style="display: inline-block; width:100%;">
    		<strong>... you'll get in the Real World®:</strong>
    <pre><code class="lang-json">{
    	<span class="token string">"id"</span>: <span class="token number">123</span>,
    	<span class="token string">"property2"</span>: <span class="token string">"Lorem ipsum"</span>,
    	<span class="token string">"_embedded"</span>: {
    		<span class="token string">"object"</span>: {
    			<span class="token string">"id"</span>: <span class="token number">456</span>,
    			<span class="token string">"property2"</span>: <span class="token number">7.89</span>,
    			<span class="token string">"_links"</span>: {
    				<span class="token string">"self"</span>: {
    					<span class="token string">"href"</span>: <span class="token string">"https://api.mydomain.com/other-item/456"</span>
    				}
    			}
    		}
    	}
    	<span class="token string">"_links"</span>: {
    		<span class="token string">"self"</span>: {
    			<span class="token string">"href"</span>: <span class="token string">"https://api.mydomain.com/item/123"</span>
    		}
    	}
    }</code></pre>
    	</div>
    </div>

    ### Errors
    Errors return JSON too and tries to match the [Problem Details for HTTP APIs specification](https://tools.ietf.org/html/rfc7807). If it does not match this spec, that's either a bug or a compatibility issue. Please contact us to solve the problem.

    The `Content-Type` of errors will be `application/problem+json`. The content will match the following JSON:
    ```json
    {
    	"type": "https://tools.ietf.org/html/rfc2616#section-10",
        "title": "Not Found",
    	"status": 404,
        "detail": "Entity not found"
    }
    ```

    ## Versioning
    The API is fully versionned, using an URL-versioning scheme: `https://demo.pims.io/api/v1/events`, `https://demo.pims.io/api/v2/events`,...

    The version part of the URL is optional, and will be completed with the last stable version if omitted.

    ## Pagination
    All responses corresponding to a collection of resources (e.g. `/venues` or `/series/:id/events`) are paginated. When so, you will only get the first 25 resources you asked for.

    If you need to get more resources in one call, you can use the `page_size` query parameter. E.g. `/venues?page_size=50` to get the 50 first venues.

    Also note that with HAL, the navigation in paginated responses is a piece of cake, as you can see below:
    ```json
    {
    	"_links": {
    		"self": {
    			"href": "https://demo.pims.io/api/v1/events?page=1"
    		},
    		"first": {
    			"href": "https://demo.pims.io/api/v1/events"
    		},
    		"last": {
    			"href": "https://demo.pims.io/api/v1/events?page=14"
    		},
    		"next": {
    			"href": "https://demo.pims.io/api/v1/events?page=2"
    		}
    	},
    	"_embedded": {
     		... // data content goes here
    	},
    	"page_count": 14,
    	"page_size": 25,
    	"total_items": 331,
    	"page": 1
    }
    ```

    ## Filtering and sorting
    Every textual filter (e.g. `/events?label=U2`) and/or sort (e.g. `/events?sort=label`) performed with the API uses UTF8_UNICODE_CI collation, meaning it is:
    - Case insensitive: “Chloé” will be considered the same as “CHLOÉ”;
    - Diacritic insensitive: “Chloé” will be considered the same as “Chloe”.

    When performing a sort, it will always be *ascending* by default. To make it *descending*, just use a minus sign (`-`) in front of the parameter value (e.g. `/events?sort=-label`).

    ## I18n
    In responses, some labels can be translated (e.g. promotion types, event input types, etc.). These translatable labels are clearly indicated in the documentation below.

    By default, they will be displayed in English, but you can change this behaviour via the `Accept-Language` header. E.g., use `fr` as a value for French.

    ## PHP SDK
    We provide a simple yet convenient SDK for the PHP language, see [the Github page of the project](https://github.com/pimssas/pims-api-client-php).

    ## And now?
    Generaly, you will start by [fetching one or more events](#tag/Events). An <span class="definition">event</span> can be anything that occurs in one venue at one given date and time: a concert, a play, a match, a conference, etc. Additionnally, you can explore the [series](#tag/Series): a <span class="definition">series</span> is just a group of events (e.g. a tour or a festival).

    Once you retrieved the events you were interested in, you can look for the sales (<span class="definition">ticket counts</span>):
    - Get a quick overview with [`/events/:id/ticket-counts`](#operation/fetchAllTicketCounts)
    - Or get a full insight by calling these endpoints:
        1. [`/events/:id/categories`](#operation/fetchAllEventsCategories)
        2. [`/events/:id/channels`](#operation/fetchAllEventsChannels)
        3. [`/events/:id/ticket-counts/detailed`](#operation/fetchAllDetailedTicketCounts)

    Eventually, you may also want to fetch the [promotions](#tag/Promotions). A <span class="definition">promotion</span> can be anything meant to leverage the sales: ads, marketing campaigns, buzz or news around the event, etc. A promotion can be linked to any combination of events and/or series.
  license:
    name: Creative Commons CC BY-NC-ND 2.0
    url: https://creativecommons.org/licenses/by-nc-nd/2.0/
  title: Pims
  version: "1.0"
  x-apisguru-categories:
    - ecommerce
  x-logo:
    backgroundColor: "#FF9800"
    url: https://cdn.pims.io/api/logo_white.svg
  x-origin:
    - format: swagger
      url: https://cdn.pims.io/api/swagger.json
      version: "2.0"
  x-providerName: pims.io
consumes:
  - application/json
produces:
  - application/hal+json
securityDefinitions:
  Basic Auth:
    type: basic
security:
  - Basic Auth: []
parameters:
  header_Accept-Language:
    default: en
    description: Language used for the translatable labels.
    enum:
      - de
      - en
      - fr
    in: header
    name: Accept-Language
    type: string
  path_event-id:
    description: ID of the targeted event.
    format: int32
    in: path
    name: event_id
    required: true
    type: integer
  query_capacities_show-ignored:
    default: false
    description: If set to `false`, show only the [event-]categories which are not ignored. If set to `true`, show everything.
    in: query
    name: show_ignored
    type: boolean
  query_events_city:
    description: Find only the events whose venue city (or metropolitan area) contains this value.
    in: query
    name: city
    type: string
  query_events_from-datetime:
    description: Find only the events starting after this date.
    format: date
    in: query
    name: from_datetime
    type: string
  query_events_label:
    description: Find only the events whose label contains this value.
    in: query
    name: label
    type: string
  query_events_sort:
    default: label
    description: Sort the events in the corresponding order.
    enum:
      - label
      - -label
      - datetime
      - -datetime
      - venue_label
      - -venue_label
      - city
      - -city
    in: query
    name: sort
    type: string
  query_events_to-datetime:
    description: Find only the events starting before this date.
    format: date
    in: query
    name: to_datetime
    type: string
  query_page-size:
    default: 25
    description: Pagination size, i.e. maximum number of items to be displayed in the response.
    format: int32
    in: query
    name: page_size
    type: integer
  query_promotions_family:
    description: Find only the promotions whose family is equal to this value.
    in: query
    name: family
    type: string
  query_promotions_from-date:
    description: Find only the promotions starting after this date.
    format: date
    in: query
    name: from_date
    type: string
  query_promotions_label:
    description: Find only the promotions whose label contains this value.
    in: query
    name: label
    type: string
  query_promotions_sort:
    default: date
    description: Sort the promotions in the corresponding order.
    enum:
      - date
      - -date
      - total_cost
      - -total_cost
    in: query
    name: sort
    type: string
  query_promotions_to-date:
    description: Find only the promotions ending before this date.
    format: date
    in: query
    name: to_date
    type: string
  query_promotions_type:
    description: Find only the promotions whose type is equal to this value.
    in: query
    name: type
    type: string
  query_ticket-counts_from-date:
    description: Find only the ticket counts after this date.
    format: date
    in: query
    name: from_date
    type: string
  query_ticket-counts_show-ignored:
    default: false
    description: If set to `false`, show only the [event-]categories/[event-]price ranges/[event]channels which are not ignored. If set to `true`, show everything.
    in: query
    name: show_ignored
    type: boolean
  query_ticket-counts_show-not-approved:
    default: false
    description: If set to `false`, show only the approved ticket counts. If set to `true`, show all the ticket counts.
    in: query
    name: show_not_approved
    type: boolean
  query_ticket-counts_sort:
    default: date
    description: Sort the ticket counts in the corresponding order.
    enum:
      - date
      - -date
    in: query
    name: sort
    type: string
  query_ticket-counts_to-date:
    description: Find only the ticket counts before this date.
    format: date
    in: query
    name: to_date
    type: string
responses:
  "401":
    description: Unauthorized, no authentication was made
    schema:
      $ref: "#/definitions/Error401"
  "403":
    description: Forbidden, the authentication is wrong
    schema:
      $ref: "#/definitions/Error403"
  "404":
    description: Not Found
    schema:
      $ref: "#/definitions/Error404"
  "422":
    description: Unprocessable Entity
    schema:
      $ref: "#/definitions/Error422"
  "500":
    description: Unexpected error
    schema:
      $ref: "#/definitions/Error500"
  200-events:
    description: Successful operation, gives an array of events
    schema:
      items:
        $ref: "#/definitions/EventsEntity"
      type: array
  200-promotions:
    description: Successful operation, gives an array of promotions
    schema:
      items:
        $ref: "#/definitions/PromotionsEntity"
      type: array
paths:
  /categories:
    get:
      operationId: fetchAllCategories
      parameters:
        - description: Find only the categories whose label/short label contains this value.
          in: query
          name: label
          type: string
        - default: false
          description: If set to `false`, show only the categories which are not ignored. If set to `true`, show all categories.
          in: query
          name: show_ignored
          type: boolean
        - default: order
          description: Sort the categories in the corresponding order.
          enum:
            - label
            - -label
            - order
            - -order
          in: query
          name: sort
          type: string
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives an array of categories
          schema:
            items:
              $ref: "#/definitions/CategoriesEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all categories
      tags:
        - Categories
  "/categories/{category_id}":
    get:
      operationId: fetchOneCategory
      parameters:
        - description: ID of the targeted category.
          format: int32
          in: path
          name: category_id
          required: true
          type: integer
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one category
          schema:
            $ref: "#/definitions/CategoriesEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one category by ID
      tags:
        - Categories
  /channels:
    get:
      operationId: fetchAllChannels
      parameters:
        - description: Find only the channels whose label contains this value.
          in: query
          name: label
          type: string
        - default: false
          description: If set to `false`, show only the channels which are not ignored. If set to `true`, show all channels.
          in: query
          name: show_ignored
          type: boolean
        - default: label
          description: Sort the channels in the corresponding order.
          enum:
            - label
            - -label
            - order
            - -order
          in: query
          name: sort
          type: string
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives an array of channels
          schema:
            items:
              $ref: "#/definitions/ChannelsEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all channels
      tags:
        - Channels
  "/channels/{channel_id}":
    get:
      operationId: fetchOneChannel
      parameters:
        - description: ID of the targeted channel.
          format: int32
          in: path
          name: channel_id
          required: true
          type: integer
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one channel
          schema:
            $ref: "#/definitions/ChannelsEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one channel by ID
      tags:
        - Channels
  /events:
    get:
      operationId: fetchAllEvents
      parameters:
        - $ref: "#/parameters/query_events_label"
        - $ref: "#/parameters/query_events_from-datetime"
        - $ref: "#/parameters/query_events_to-datetime"
        - $ref: "#/parameters/query_events_city"
        - $ref: "#/parameters/query_events_sort"
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          $ref: "#/responses/200-events"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all events
      tags:
        - Events
  "/events/{event_id}":
    get:
      operationId: fetchOneEvent
      parameters:
        - $ref: "#/parameters/path_event-id"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one event
          schema:
            $ref: "#/definitions/EventsEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one event by ID
      tags:
        - Events
  "/events/{event_id}/capacities":
    get:
      operationId: fetchAllEventsCapacities
      parameters:
        - $ref: "#/parameters/path_event-id"
        - $ref: "#/parameters/query_capacities_show-ignored"
        - default: date
          description: Sort the capacities in the corresponding order.
          enum:
            - date
            - -date
          in: query
          name: sort
          type: string
        - $ref: "#/parameters/query_page-size"
      responses:
        "200":
          description: Successful operation, gives an array of events capacities
          schema:
            items:
              $ref: "#/definitions/EventsCapacitiesEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all capacities for one event
      tags:
        - Capacities
  "/events/{event_id}/capacities/{capacity_id}":
    get:
      operationId: fetchOneEventCapacity
      parameters:
        - $ref: "#/parameters/path_event-id"
        - description: ID of the targeted capacity.
          format: int32
          in: path
          name: capacity_id
          required: true
          type: integer
        - $ref: "#/parameters/query_capacities_show-ignored"
      responses:
        "200":
          description: Successful operation, gives one event capacity
          schema:
            $ref: "#/definitions/EventsCapacitiesEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one capacity by ID
      tags:
        - Capacities
  "/events/{event_id}/categories":
    get:
      operationId: fetchAllEventsCategories
      parameters:
        - $ref: "#/parameters/path_event-id"
        - default: false
          description: If set to `false`, show only the [event-]categories/[event-]price ranges which are not ignored. If set to `true`, show everything.
          in: query
          name: show_ignored
          type: boolean
        - $ref: "#/parameters/query_page-size"
      responses:
        "200":
          description: Successful operation, gives an array of events categories
          schema:
            items:
              $ref: "#/definitions/EventsCategoriesEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all categories for one event
      tags:
        - Categories
  "/events/{event_id}/categories/{category_id}":
    get:
      operationId: fetchOneEventCategory
      parameters:
        - $ref: "#/parameters/path_event-id"
        - description: ID of the targeted event category.
          format: int32
          in: path
          name: category_id
          required: true
          type: number
        - default: false
          description: If set to `false`, show only the embedded [event-]price ranges which are not ignored. If set to `true`, show everything.
          in: query
          name: show_ignored
          type: boolean
      responses:
        "200":
          description: Successful operation, gives one event category
          schema:
            $ref: "#/definitions/EventsCategoriesEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one event category by ID
      tags:
        - Categories
  "/events/{event_id}/channels":
    get:
      operationId: fetchAllEventsChannels
      parameters:
        - $ref: "#/parameters/path_event-id"
        - default: false
          description: If set to `false`, show only the [event-]channels which are not ignored. If set to `true`, show everything.
          in: query
          name: show_ignored
          type: boolean
        - $ref: "#/parameters/query_page-size"
      responses:
        "200":
          description: Successful operation, gives an array of events channels
          schema:
            items:
              $ref: "#/definitions/EventsChannelsEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all channels for one event
      tags:
        - Channels
  "/events/{event_id}/channels/{channel_id}":
    get:
      operationId: fetchOneEventChannel
      parameters:
        - $ref: "#/parameters/path_event-id"
        - description: ID of the targeted event channel.
          format: int32
          in: path
          name: channel_id
          required: true
          type: integer
      responses:
        "200":
          description: Successful operation, gives one event channel
          schema:
            $ref: "#/definitions/EventsChannelsEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one event channel by ID
      tags:
        - Channels
  "/events/{event_id}/promotions":
    get:
      operationId: fetchAllEventsPromotions
      parameters:
        - $ref: "#/parameters/path_event-id"
        - $ref: "#/parameters/query_promotions_label"
        - $ref: "#/parameters/query_promotions_from-date"
        - $ref: "#/parameters/query_promotions_to-date"
        - $ref: "#/parameters/query_promotions_type"
        - $ref: "#/parameters/query_promotions_family"
        - $ref: "#/parameters/query_promotions_sort"
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          $ref: "#/responses/200-promotions"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all promotions for one event
      tags:
        - Promotions
  "/events/{event_id}/ticket-counts":
    get:
      operationId: fetchAllTicketCounts
      parameters:
        - $ref: "#/parameters/path_event-id"
        - $ref: "#/parameters/query_ticket-counts_from-date"
        - $ref: "#/parameters/query_ticket-counts_to-date"
        - $ref: "#/parameters/query_ticket-counts_show-ignored"
        - $ref: "#/parameters/query_ticket-counts_show-not-approved"
        - $ref: "#/parameters/query_ticket-counts_sort"
        - $ref: "#/parameters/query_page-size"
      responses:
        "200":
          description: Successful operation, gives an array of ticket counts
          schema:
            items:
              $ref: "#/definitions/TicketCountsEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all ticket counts for one event
      tags:
        - Counts
  "/events/{event_id}/ticket-counts/detailed":
    get:
      operationId: fetchAllDetailedTicketCounts
      parameters:
        - $ref: "#/parameters/path_event-id"
        - $ref: "#/parameters/query_ticket-counts_from-date"
        - $ref: "#/parameters/query_ticket-counts_to-date"
        - $ref: "#/parameters/query_ticket-counts_show-ignored"
        - $ref: "#/parameters/query_ticket-counts_show-not-approved"
        - $ref: "#/parameters/query_ticket-counts_sort"
        - $ref: "#/parameters/query_page-size"
      responses:
        "200":
          description: Successful operation, gives an array of detailed ticket counts
          schema:
            items:
              $ref: "#/definitions/TicketCountsDetailedEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all detailed ticket counts for one event
      tags:
        - Counts
  "/events/{event_id}/ticket-counts/detailed/{ticket_count_id}":
    get:
      operationId: fetchOneDetailedTicketCount
      parameters:
        - $ref: "#/parameters/path_event-id"
        - description: ID of the targeted ticket count.
          format: int32
          in: path
          name: ticket_count_id
          required: true
          type: integer
        - $ref: "#/parameters/query_ticket-counts_show-ignored"
      responses:
        "200":
          description: Successful operation, gives one detailed ticket count
          schema:
            $ref: "#/definitions/TicketCountsDetailedEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one detailed ticket count by ID
      tags:
        - Counts
  "/events/{event_id}/ticket-counts/{ticket_count_id}":
    get:
      operationId: fetchOneTicketCount
      parameters:
        - $ref: "#/parameters/path_event-id"
        - description: ID of the targeted ticket count.
          format: int32
          in: path
          name: ticket_count_id
          required: true
          type: integer
        - $ref: "#/parameters/query_ticket-counts_show-ignored"
      responses:
        "200":
          description: Successful operation, gives one ticket count
          schema:
            $ref: "#/definitions/TicketCountsEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one ticket count by ID
      tags:
        - Counts
  /price-ranges:
    get:
      operationId: fetchAllPriceRanges
      parameters:
        - description: Find only the price ranges whose label contains this value.
          in: query
          name: label
          type: string
        - default: false
          description: If set to `false`, show only the price ranges which are not ignored. If set to `true`, show all price ranges.
          in: query
          name: show_ignored
          type: boolean
        - default: label
          description: Sort the price ranges in the corresponding order.
          enum:
            - label
            - -label
            - order
            - -order
          in: query
          name: sort
          type: string
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives an array of price ranges
          schema:
            items:
              $ref: "#/definitions/PriceRangesEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all price ranges
      tags:
        - Price ranges
  "/price-ranges/{price_range_id}":
    get:
      operationId: fetchOnePriceRange
      parameters:
        - description: ID of the targeted price range.
          format: int32
          in: path
          name: price_range_id
          required: true
          type: integer
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one price range
          schema:
            $ref: "#/definitions/VenuesEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one price range by ID
      tags:
        - Price ranges
  /promotions:
    get:
      operationId: fetchAllPromotions
      parameters:
        - $ref: "#/parameters/query_promotions_label"
        - $ref: "#/parameters/query_promotions_from-date"
        - $ref: "#/parameters/query_promotions_to-date"
        - $ref: "#/parameters/query_promotions_type"
        - $ref: "#/parameters/query_promotions_family"
        - $ref: "#/parameters/query_promotions_sort"
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          $ref: "#/responses/200-promotions"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all promotions
      tags:
        - Promotions
  "/promotions/{promotion_id}":
    get:
      operationId: fetchOnePromotion
      parameters:
        - description: ID of the targeted promotion.
          format: int32
          in: path
          name: promotion_id
          required: true
          type: integer
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one promotion
          schema:
            $ref: "#/definitions/PromotionsEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one promotion by ID
      tags:
        - Promotions
  /series:
    get:
      operationId: fetchAllSeries
      parameters:
        - description: Find only the venues whose label contains this value.
          in: query
          name: label
          type: string
        - description: Find only the series starting after this date.
          format: date
          in: query
          name: from_date
          type: string
        - description: Find only the series ending before this date.
          format: date
          in: query
          name: to_date
          type: string
        - description: Find only the series whose type is equal to this value.
          enum:
            - TOU
            - LGS
          in: query
          name: type
          type: string
        - default: first_date
          description: Sort the series in the corresponding order.
          enum:
            - label
            - -label
            - first_date
            - -first_date
            - last_date
            - -last_date
          in: query
          name: sort
          type: string
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives an array of series
          schema:
            items:
              $ref: "#/definitions/SeriesEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all series
      tags:
        - Series
  "/series/{series_id}":
    get:
      operationId: fetchOneSeries
      parameters:
        - description: ID of the targeted series.
          format: int32
          in: path
          name: series_id
          required: true
          type: integer
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one series
          schema:
            $ref: "#/definitions/SeriesEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one series by ID
      tags:
        - Series
  "/series/{series_id}/events":
    get:
      operationId: fetchAllSeriesEvents
      parameters:
        - description: ID of the targeted series.
          format: int32
          in: path
          name: series_id
          required: true
          type: integer
        - $ref: "#/parameters/query_events_from-datetime"
        - $ref: "#/parameters/query_events_to-datetime"
        - $ref: "#/parameters/query_events_city"
        - $ref: "#/parameters/query_events_sort"
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          $ref: "#/responses/200-events"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all events for one series
      tags:
        - Events
  "/series/{series_id}/promotions":
    get:
      operationId: fetchAllSeriesPromotions
      parameters:
        - description: ID of the targeted series.
          format: int32
          in: path
          name: series_id
          required: true
          type: integer
        - $ref: "#/parameters/query_promotions_label"
        - $ref: "#/parameters/query_promotions_from-date"
        - $ref: "#/parameters/query_promotions_to-date"
        - $ref: "#/parameters/query_promotions_type"
        - $ref: "#/parameters/query_promotions_family"
        - $ref: "#/parameters/query_promotions_sort"
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          $ref: "#/responses/200-promotions"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all promotions for one series
      tags:
        - Promotions
  /venues:
    get:
      operationId: fetchAllVenues
      parameters:
        - description: Find only the venues whose label contains this value.
          in: query
          name: label
          type: string
        - description: Find only the venues whose city contains this value.
          in: query
          name: city
          type: string
        - description: Find only the venues whose country_code is equal to this value.
          in: query
          name: country_code
          type: string
        - description: Find only the venues whose type is equal to this value.
          enum:
            - SAL
            - FES
          in: query
          name: type
          type: string
        - default: label
          description: Sort the venues in the corresponding order.
          enum:
            - label
            - -label
            - city
            - -city
            - country
            - -country
          in: query
          name: sort
          type: string
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives an array of venues
          schema:
            items:
              $ref: "#/definitions/VenuesEntity"
            type: array
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all venues
      tags:
        - Venues
  "/venues/{venue_id}":
    get:
      operationId: fetchOneVenue
      parameters:
        - description: ID of the targeted venue.
          format: int32
          in: path
          name: venue_id
          required: true
          type: integer
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          description: Successful operation, gives one venue
          schema:
            $ref: "#/definitions/VenuesEntity"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "404":
          $ref: "#/responses/404"
        "500":
          $ref: "#/responses/500"
      summary: Get one venue by ID
      tags:
        - Venues
  "/venues/{venue_id}/events":
    get:
      operationId: fetchAllVenuesEvents
      parameters:
        - description: ID of the targeted venue.
          format: int32
          in: path
          name: venue_id
          required: true
          type: integer
        - $ref: "#/parameters/query_events_from-datetime"
        - $ref: "#/parameters/query_events_to-datetime"
        - $ref: "#/parameters/query_events_city"
        - $ref: "#/parameters/query_events_sort"
        - $ref: "#/parameters/query_page-size"
        - $ref: "#/parameters/header_Accept-Language"
      responses:
        "200":
          $ref: "#/responses/200-events"
        "401":
          $ref: "#/responses/401"
        "403":
          $ref: "#/responses/403"
        "422":
          $ref: "#/responses/422"
        "500":
          $ref: "#/responses/500"
      summary: Find all events for one venue
      tags:
        - Events
definitions:
  CategoriesEntity:
    properties:
      id:
        description: Unique ID of the category.
        example: 123
        format: int32
        type: integer
      ignored:
        description: Defines whether this category is ignored or not.
        example: false
        type: boolean
      label:
        description: Full label of the category.
        example: CATEGORY 1
        type: string
      last_update_timestamp:
        description: Timestamp for when the category was last updated in the customer's database.
        example: 1516500001
        format: int64
        type: integer
      short_label:
        description: Short label of the category (generally less than 5 characters).
        example: CAT1
        type: string
        x-nullable: true
    required:
      - id
      - label
      - short_label
      - ignored
      - last_update_timestamp
    title: Category
    type: object
  ChannelsEntity:
    properties:
      id:
        description: Unique ID of the channel.
        example: 123
        format: int32
        type: integer
      ignored:
        description: Defines whether this channel is ignored or not.
        example: false
        type: boolean
      label:
        description: Full label of the channel.
        example: TICKETMASTER
        type: string
      last_update_timestamp:
        description: Timestamp for when the channel was last updated in the customer's database.
        example: 1516500001
        format: int64
        type: integer
      short_label:
        description: Short label of the channel (generally less than 5 characters).
        example: TKM
        type: string
        x-nullable: true
    required:
      - id
      - label
      - short_label
      - ignored
      - last_update_timestamp
    title: Channel
    type: object
  Error401:
    properties:
      detail:
        description: Description of the error.
        example: Unauthorized
        type: string
      status:
        description: Status code of the error.
        example: 401
        format: int32
        type: integer
      title:
        description: Message corresponding to the status code.
        example: Unauthorized
        type: string
      type:
        description: Link to RFC 2616 about status codes definitions.
        example: https://tools.ietf.org/html/rfc2616#section-10
        type: string
    required:
      - type
      - title
      - status
      - detail
    type: object
  Error403:
    properties:
      detail:
        description: Description of the error.
        example: Forbidden
        type: string
      status:
        description: Status code of the error.
        example: 403
        format: int32
        type: integer
      title:
        description: Message corresponding to the status code.
        example: Forbidden
        type: string
      type:
        description: Link to RFC 2616 about status codes definitions.
        example: https://tools.ietf.org/html/rfc2616#section-10
        type: string
    required:
      - type
      - title
      - status
      - detail
    type: object
  Error404:
    properties:
      detail:
        description: Description of the error.
        example: Entity not found.
        type: string
      status:
        description: Status code of the error.
        example: 404
        format: int32
        type: integer
      title:
        description: Message corresponding to the status code.
        example: Not Found
        type: string
      type:
        description: Link to RFC 2616 about status codes definitions.
        example: https://tools.ietf.org/html/rfc2616#section-10
        type: string
    required:
      - type
      - title
      - status
      - detail
    type: object
  Error422:
    properties:
      detail:
        description: Description of the error.
        example: Unknown date format, should be 'Y-m-d?H:i:s'
        type: string
      status:
        description: Status code of the error.
        example: 422
        format: int32
        type: integer
      title:
        description: Message corresponding to the status code.
        example: Unprocessable Entity
        type: string
      type:
        description: Link to RFC 2616 about status codes definitions.
        example: https://tools.ietf.org/html/rfc2616#section-10
        type: string
    required:
      - type
      - title
      - status
      - detail
    type: object
  Error500:
    properties:
      detail:
        description: Description of the error.
        example: Internal Server Error
        type: string
      status:
        description: Status code of the error.
        example: 500
        format: int32
        type: integer
      title:
        description: Message corresponding to the status code.
        example: Internal Server Error
        type: string
      type:
        description: Link to RFC 2616 about status codes definitions.
        example: https://tools.ietf.org/html/rfc2616#section-10
        type: string
    required:
      - type
      - title
      - status
      - detail
    type: object
  EventsCapacitiesEntity:
    properties:
      date:
        description: Date from which the capacity is active.
        format: date
        type: string
      event_categories:
        description: Array of categories with their detailed capacities.
        items:
          properties:
            comps:
              description: Number of comps in the category.
              format: int32
              type: integer
              x-nullable: true
            holds:
              description: Number of *holds* in the category. <span class="definition">Holds</span> are seats/places that are not in sale at the date of the capacity, but will eventually be later.
              format: int32
              type: integer
              x-nullable: true
            id:
              description: Unique ID of the event category.
              format: int32
              type: integer
            kills:
              description: Number of *kills* in the category. <span class="definition">Kills</span> are seats/places that will not be sold for technical reasons.
              format: int32
              type: integer
              x-nullable: true
            sellable_capacity:
              description: "Number of sellable seats/places in the category. This is calculated by the formula: `total_capacity - kills - comps - holds`."
              format: int32
              type: integer
            total_capacity:
              description: Total number of seats/places in the category.
              format: int32
              type: integer
          required:
            - id
            - total_capacity
            - kills
            - comps
            - holds
            - sellable_capacity
          type: object
        type: array
      id:
        description: Unique ID of the event capacity.
        format: int32
        type: integer
    required:
      - id
      - date
    title: Event capacity
    type: object
  EventsCategoriesEntity:
    properties:
      category:
        $ref: "#/definitions/CategoriesEntity"
      event_price_ranges:
        description: Array of event price ranges.
        items:
          properties:
            base_price:
              description: Base price of the event price range (i.e. including VAT but excluding all commissions).
              example: 44.5
              format: float
              minimum: 0
              type: number
            currency:
              description: Currency of the prices.
              example: EUR
              type: string
            id:
              description: ID of the event price range.
              example: 56789
              format: int32
              type: integer
            ignored:
              description: Defines whether this event price range is ignored or not.
              example: false
              type: boolean
            price_range:
              $ref: "#/definitions/PriceRangesEntity"
            public_price:
              description: Public price of the event price range (i.e. including VAT and all commissions).
              example: 50
              format: float
              minimum: 0
              type: number
              x-nullable: true
          required:
            - id
            - price_range
            - base_price
            - public_price
            - currency
          type: object
        type: array
      id:
        description: Unique ID of the event category.
        example: 12345
        format: int32
        type: integer
      ignored:
        description: Defines whether this event category is ignored or not.
        example: false
        type: boolean
    required:
      - id
      - ignored
      - category
    title: Event category
    type: object
  EventsChannelsEntity:
    properties:
      channel:
        $ref: "#/definitions/ChannelsEntity"
      id:
        description: Unique ID of the event channel.
        example: 12345
        format: int32
        type: integer
      ignored:
        description: Defines whether this event channel is ignored or not.
        example: false
        type: boolean
    required:
      - id
      - ignored
      - channel
    title: Event channel
    type: object
  EventsEntity:
    properties:
      break_even:
        description: Value of the break-even for the event.
        example: 1727
        format: int32
        minimum: 0
        type: integer
      cancellation_date:
        description: Date the event was canceled.
        format: date
        type: string
      contract:
        description: Contract of the series.
        properties:
          partner:
            description: Contract partner.
            properties:
              id:
                description: Unique ID identifying the contract partner.
                example: 12
                format: int32
                type: integer
              label:
                description: Label of the contract partner.
                example: K Prod
                type: string
            required:
              - id
              - label
            type: object
            x-nullable: true
          type:
            description: Contract type.
            properties:
              id:
                description: String identifying the contract type.
                enum:
                  - PRO
                  - COP
                  - PLO
                  - COR
                  - CES
                example: COP
                type: string
              label:
                description: Label of the contract type. This value is translated according to the 'Accept-Language' header.
                example: Coprod
                type: string
            required:
              - id
              - label
            type: object
        required:
          - type
          - partner
        type: object
      costing_capacity:
        description: Costing capacity of the event.
        example: 2074
        format: int32
        minimum: 0
        type: integer
      creation_timestamp:
        description: Timestamp for when the venue was created in the customer's database.
        example: 1496903403
        format: int64
        type: integer
      currency:
        description: Currency of the prices.
        type: string
      datetime:
        description: Datetime of the event (relative to the timezone of the venue).
        example: 2018-01-11T20:00:00
        format: datetime
        type: string
      free:
        description: Whether this event is free or not.
        type: boolean
      general_sales_date:
        description: Date the event went on general sales (relative to the timezone of the venue).
        example: 2017-06-15
        format: date
        type: string
      id:
        description: Unique ID of the event.
        example: 2142
        format: int32
        type: integer
      input_type:
        description: Input type of the event.
        properties:
          id:
            description: String identifying the input type of the event.
            enum:
              - DET
              - GLO
            example: DET
            type: string
          label:
            description: Label of the input type. This value is translated according to the 'Accept-Language' header.
            example: Detailed sales
            type: string
        required:
          - id
          - label
        type: object
      label:
        description: Label of the event.
        example: Alan Wilson
        type: string
      last_update_timestamp:
        description: Timestamp for when the venue was last updated in the customer's database.
        example: 1516500001
        format: int64
        type: integer
      max_capacity:
        description: Maximum capacity for the venue in which the event occurs.
        example: 2100
        format: int32
        minimum: 0
        type: integer
      presales_date:
        description: Date the event went on presales (relative to the timezone of the venue).
        example: 2017-06-14
        format: date
        type: string
      series_id:
        description: ID of the series the event belongs to.
        example: 263
        format: int32
        type: integer
        x-nullable: true
      sold_out_date:
        description: Date the event was sold out.
        format: date
        type: string
      venue:
        $ref: "#/definitions/VenuesEntity"
    required:
      - id
      - series_id
      - label
      - datetime
      - venue
      - input_type
      - contract
      - free
      - creation_timestamp
      - last_update_timestamp
    title: Event
    type: object
  PriceRangesEntity:
    properties:
      id:
        description: Unique ID of the price range.
        example: 123
        format: int32
        type: integer
      ignored:
        description: Defines whether this price range is ignored or not.
        example: false
        type: boolean
      label:
        description: Full label of the price range.
        example: REDUCED PRICE
        type: string
      last_update_timestamp:
        description: Timestamp for when the price range was last updated in the customer's database.
        example: 1516500001
        format: int64
        type: integer
      short_label:
        description: Short label of the price range (generally less than 5 characters).
        example: RED
        type: string
        x-nullable: true
    required:
      - id
      - label
      - short_label
      - ignored
      - last_update_timestamp
    title: Price range
    type: object
  PromotionsEntity:
    properties:
      applied_to:
        description: List of events and/or series where the promotion is applied. A promotion can be applied on several events, and its costs can be split between those events.
        items:
          properties:
            event_id:
              description: "ID of the event the promotion applies to. This property is exclusive with 'series_id': if defined, then 'series_id' will not be displayed."
              example: 2142
              format: int32
              type: integer
              x-nullable: true
            quantity:
              description: Quantity share of the promotion devoted to this event/series.
              format: float
              minimum: 0
              type: number
              x-nullable: true
            series_id:
              description: "ID of the series the promotion applies to. This property is exclusive with 'event_id': if defined, then 'event_id' will not be displayed."
              example: 263
              format: int32
              type: integer
              x-nullable: true
            unit_cost:
              description: "Unit cost share of the promotion devoted to this event/series. The total cost of the share can be calculated with: quantity × unit_cost. *This field may be omitted according to the customer configuration.*"
              format: float
              minimum: 0
              type: number
              x-nullable: true
            valorized_quantity:
              description: Valorized quantity share of the promotion devoted to this event/series. *This field may be omitted according to the customer configuration.*
              format: float
              minimum: 0
              type: number
              x-nullable: true
            valorized_unit_cost:
              description: "Valorized unit cost share of the promotion devoted to this event/series. The total valorized cost of the share can be calculated with: valorized_quantity × valorized_unit_cost."
              format: float
              minimum: 0
              type: number
              x-nullable: true
          type: object
        type: array
      comments:
        description: Comments on the promotion.
        type: string
        x-nullable: true
      cost:
        description: Cost of the promotion.
        properties:
          currency:
            description: Currency of the unit_cost (<a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4212 alphabetic code</a>).
            type: string
            x-nullable: true
          exchange:
            description: What was offered in exchange of the promotion.
            type: string
            x-nullable: true
          quantity:
            description: Quantity of the promotion (see unit_cost).
            format: float
            minimum: 0
            type: number
            x-nullable: true
          state:
            description: State of the promotion cost. *This object may be omitted according to the customer configuration.*
            properties:
              id:
                description: String identifying the state of the promotion cost.
                enum:
                  - PRE
                  - ENG
                  - FAC
                  - PAY
                type: string
              label:
                description: Label of the state of the promotion cost. This value is translated according to the 'Accept-Language' header.
                type: string
            required:
              - id
              - label
            type: object
            x-nullable: true
          type:
            description: Type of the promotion cost.
            properties:
              id:
                description: String identifying the type of the promotion cost.
                enum:
                  - PAY
                  - ECH
                  - GRA
                example: GRA
                type: string
              label:
                description: Label of the type of the promotion cost. This value is translated according to the 'Accept-Language' header.
                example: Free
                type: string
            required:
              - id
              - label
            type: object
          unit_cost:
            description: "Unit cost of the promotion. The total cost of the promotion can be calculated with: quantity × unit_cost."
            format: float
            minimum: 0
            type: number
            x-nullable: true
          valorized_quantity:
            description: Valorized quantity of the promotion (see valorized_unit_cost). *This field may be omitted according to the customer configuration.*
            format: float
            minimum: 0
            type: number
            x-nullable: true
          valorized_unit_cost:
            description: "Valorized unit cost of the promotion. The total valorized cost of the promotion can be calculated with: valorized_quantity × valorized_unit_cost. *This field may be omitted according to the customer configuration.*"
            format: float
            minimum: 0
            type: number
            x-nullable: true
        required:
          - type
        type: object
      end_date:
        description: Date the promotion ends. (If null, has the same value as start_date.)
        example: 2018-01-31
        format: date
        type: string
        x-nullable: true
      file:
        description: File associated to the promotion.
        type: string
        x-nullable: true
      id:
        description: Unique ID of the promotion.
        example: 2404
        format: int32
        type: integer
      label:
        description: Label of the promotion.
        example: 1/2 page Club et Concerts
        type: string
      start_date:
        description: Date the promotion begins.
        example: 2018-01-02
        format: date
        type: string
        x-nullable: true
      supplier:
        description: Supplier of the promotion.
        properties:
          id:
            description: Unique ID of the supplier.
            format: int32
            type: integer
          label:
            description: Name of the supplier.
            type: string
        required:
          - id
          - label
        type: object
        x-nullable: true
      type:
        description: Type of the promotion.
        properties:
          family:
            description: Family the promotion type belongs to.
            properties:
              id:
                description: String identifying the promotion family.
                example: PRE
                type: string
              label:
                description: Label of the promotion family. This value is translated according to the 'Accept-Language' header.
                example: Press
                type: string
            required:
              - id
              - label
            type: object
          id:
            description: String identifying the promotion type.
            example: PPR
            type: string
          label:
            description: Label of the promotion type. This value is translated according to the 'Accept-Language' header.
            example: Media ads
            type: string
        required:
          - id
          - label
          - family
        type: object
    required:
      - id
      - type
      - label
      - supplier
      - start_date
      - end_date
      - cost
      - comments
      - applied_to
    title: Promotion
    type: object
  SeriesEntity:
    properties:
      contract:
        description: Contract of the series.
        properties:
          partner:
            description: Contract partner.
            properties:
              id:
                description: Unique ID identifying the contract partner.
                format: int32
                type: integer
              label:
                description: Label of the contract partner.
                type: string
            required:
              - id
              - label
            type: object
            x-nullable: true
          type:
            description: Contract type.
            properties:
              id:
                description: String identifying the contract type.
                enum:
                  - PRO
                  - COP
                  - PLO
                  - COR
                  - CES
                example: PRO
                type: string
              label:
                description: Label of the contract type. This value is translated according to the 'Accept-Language' header.
                example: Production
                type: string
            required:
              - id
              - label
            type: object
        required:
          - type
        type: object
      costing_capacity:
        description: Value of the costing capacity.
        example: 1465
        format: int32
        minimum: 0
        type: integer
        x-nullable: true
      creation_timestamp:
        description: Timestamp for when the series was created in the customer's database.
        example: 1503655564
        format: int64
        type: integer
      first_date:
        description: Date of the first event in the series.
        example: 2018-05-22
        format: date
        type: string
      id:
        description: Unique ID of the series.
        example: 263
        format: int32
        type: integer
      label:
        description: Label of the series.
        example: Tintin et Milou Live - Paris 2018
        type: string
      last_date:
        description: Date of the last event in the series.
        example: 2018-06-03
        format: date
        type: string
      last_update_timestamp:
        description: Timestamp for when the series was last updated in the customer's database.
        example: 1516500001
        format: int64
        type: integer
      type:
        description: Type of the series
        properties:
          id:
            description: String identifying the series type.
            enum:
              - TOU
              - LGS
            example: LGS
            type: string
          label:
            description: Label of the series type. This value is translated according to the 'Accept-Language' header.
            example: Long series
            type: string
        required:
          - id
          - label
        type: object
      venue:
        $ref: "#/definitions/VenuesEntity"
        x-nullable: true
    required:
      - id
      - type
      - label
      - first_date
      - last_date
      - creation_timestamp
      - last_update_timestamp
    title: Series
    type: object
  TicketCountsDetailedEntity:
    properties:
      approved:
        description: Defines whether this ticket count is approved or not.
        example: true
        type: boolean
      comment:
        description: Comment for the ticket count.
        example: No sales
        type: string
        x-nullable: true
      date:
        description: Date of the ticket count.
        example: 2018-07-03
        format: date
        type: string
      event_channels:
        description: Array of event channels where the sales were made.
        items:
          properties:
            event_categories:
              description: Array of event categories which where sold.
              items:
                properties:
                  event_price_ranges:
                    description: Array of event price ranges which where sold.
                    items:
                      properties:
                        currency:
                          description: Currency of the gross (<a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4212 alphabetic code</a>).
                          example: EUR
                          type: string
                        gross:
                          description: Gross (= income for the sold tickets for the current channel/category/price range, including VAT but excluding all commissions).
                          example: 864
                          format: float
                          minimum: 0
                          type: number
                          x-nullable: true
                        id:
                          description: ID of the event price range.
                          example: 24680
                          format: int32
                          type: integer
                        reservations:
                          description: Detailed ticket reservations (= number of reserved tickets for the current channel/category/price range). *This field may be omitted according to the customer configuration.*
                          example: 0
                          format: int32
                          minimum: 0
                          type: integer
                          x-nullable: true
                        sales:
                          description: Detailed ticket sales (= number of sold tickets for the current channel/category/price range).
                          example: 37
                          format: int32
                          minimum: 0
                          type: integer
                          x-nullable: true
                      required:
                        - id
                        - sales
                        - gross
                        - currency
                      type: object
                    type: array
                  id:
                    description: ID of the event category.
                    example: 56789
                    format: int32
                    type: integer
                required:
                  - id
                  - event_price_ranges
                type: object
              type: array
            id:
              description: ID of the event channel.
              example: 12345
              format: int32
              type: integer
          required:
            - id
            - event_categories
          type: object
        type: array
      final:
        description: Whether this ticket count is the last and final one of its event or not. If it is, it means that no further ticket counts will be added for the event it belongs to.
        example: false
        type: boolean
      id:
        description: Unique ID of the ticket count.
        example: 12345
        format: int32
        type: integer
    required:
      - id
      - date
      - comment
      - approved
      - final
    title: Detailed ticket count
    type: object
  TicketCountsEntity:
    properties:
      approved:
        description: Defines whether this ticket count is approved or not.
        example: true
        type: boolean
      comment:
        description: Comment for the ticket count.
        example: No sales
        type: string
        x-nullable: true
      currency:
        description: Currency of the gross (<a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4212 alphabetic code</a>).
        example: EUR
        type: string
      date:
        description: Date of the ticket count.
        example: 2018-07-03
        format: date
        type: string
      final:
        description: Whether this ticket count is the last and final one of its event or not. If it is, it means that no further ticket counts will be added for the event it belongs to.
        example: false
        type: boolean
      gross:
        description: Gross (= income for the sold tickets, including VAT but excluding all commissions).
        example: 48735.6
        format: float
        minimum: 0
        type: number
      id:
        description: Unique ID of the ticket count.
        example: 12345
        format: int32
        type: integer
      reservations:
        description: Ticket reservations (= number of reserved tickets). *This field may be omitted according to the customer configuration.*
        example: 81
        format: int32
        minimum: 0
        type: integer
      sales:
        description: Ticket sales (= number of sold tickets).
        example: 1025
        format: int32
        minimum: 0
        type: integer
    required:
      - id
      - date
      - comment
      - approved
      - final
      - sales
    title: Ticket count
    type: object
  VenuesEntity:
    properties:
      alternative_labels:
        description: Array of alternative/old names of the venue.
        items:
          type: string
        type: array
      city:
        description: City in which the venue is.
        example: Saint-Herblain
        type: string
      country_code:
        description: Country in which the venue is (<a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3'>ISO 3166-1 alpha-3 code</a>).
        example: FR
        type: string
      creation_timestamp:
        description: Timestamp for when the venue was created in the customer's database.
        example: 1262300401
        format: int64
        type: integer
      first_address:
        description: First address field of the venue.
        example: ZAC d'Ar Mor
        type: string
        x-nullable: true
      id:
        description: Unique ID of the venue.
        example: 27
        format: int32
        type: integer
      label:
        description: Name of the venue.
        example: Zénith de Nantes Métropole
        type: string
      last_update_timestamp:
        description: Timestamp for when the venue was last updated in the customer's database.
        example: 1473008115
        format: int64
        type: integer
      major_city:
        description: Major city or metropolitan area the venue belongs to.
        example: Nantes
        type: string
        x-nullable: true
      second_address:
        description: Second address field of the venue.
        example: Boulevard du Zénith
        type: string
        x-nullable: true
      type:
        properties:
          id:
            description: String identifying the venue type.
            enum:
              - SAL
              - FES
            example: SAL
            type: string
          label:
            description: Label of the venue type. This value is translated according to the 'Accept-Language' header.
            example: Venue
            type: string
        required:
          - id
          - label
        type: object
      zip_code:
        description: ZIP code of the venue.
        example: "44800"
        type: string
        x-nullable: true
    required:
      - id
      - type
      - label
      - first_address
      - second_address
      - zip_code
      - city
      - major_city
      - country_code
      - creation_timestamp
      - last_update_timestamp
    title: Venue
    type: object
x-servers:
  - description: Server for testing purposes, with sandbox data from demo.pims.io
    url: https://demo.pims.io/api
  - description: Example of server for a real customer (Gérard Drouot Productions)
    url: https://gdp.pims.io/api
x-tagGroups:
  - name: Structure
    tags:
      - Events
      - Series
      - Venues
  - name: Ticket settings
    tags:
      - Categories
      - Price ranges
      - Channels
  - name: Ticket counts
    tags:
      - Capacities
      - Counts
  - name: Promotion
    tags:
      - Promotions
  - name: Misc
    tags:
      - Bindings
      - Subsidiaries
