Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dba9a56a67 | ||
|
|
15f445cb3d | ||
|
|
c9f6c71c81 | ||
|
|
2032d36ad6 | ||
|
|
ffb4cf08d1 |
42
.github/workflows/docs.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: Documentation
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
- 'src/pretix/static/**'
|
|
||||||
- 'src/tests/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
- 'src/pretix/static/**'
|
|
||||||
- 'src/tests/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
spelling:
|
|
||||||
name: Spellcheck
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.8
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Install system packages
|
|
||||||
run: sudo apt update && sudo apt install enchant hunspell aspell-en
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: pip3 install --no-use-pep517 -Ur doc/requirements.txt
|
|
||||||
- name: Spellcheck docs
|
|
||||||
run: make spelling
|
|
||||||
working-directory: ./doc
|
|
||||||
- name:
|
|
||||||
run: '[ ! -s _build/spelling/output.txt ]'
|
|
||||||
working-directory: ./doc
|
|
||||||
62
.github/workflows/strings.yml
vendored
@@ -1,62 +0,0 @@
|
|||||||
name: Strings
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
paths:
|
|
||||||
- 'doc/**'
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
paths:
|
|
||||||
- 'doc/**'
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
compile:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Check gettext syntax
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.8
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Install system packages
|
|
||||||
run: sudo apt update && sudo apt install gettext
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: pip3 install --no-use-pep517 -Ur src/requirements.txt
|
|
||||||
- name: Compile messages
|
|
||||||
run: python manage.py compilemessages
|
|
||||||
working-directory: ./src
|
|
||||||
- name: Compile jsi18n
|
|
||||||
run: python manage.py compilejsi18n
|
|
||||||
working-directory: ./src
|
|
||||||
spelling:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Spellcheck
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.8
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Install system packages
|
|
||||||
run: sudo apt update && sudo apt install enchant hunspell hunspell-de-de aspell-en aspell-de
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: pip3 install --no-use-pep517 -Ur src/requirements/dev.txt
|
|
||||||
- name: Spellcheck translations
|
|
||||||
run: potypo
|
|
||||||
working-directory: ./src
|
|
||||||
55
.github/workflows/style.yml
vendored
@@ -1,55 +0,0 @@
|
|||||||
name: Code Style
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
- 'src/pretix/static/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
- 'src/pretix/static/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
isort:
|
|
||||||
name: isort
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.8
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: pip3 install --no-use-pep517 -Ur src/requirements/dev.txt
|
|
||||||
- name: Run isort
|
|
||||||
run: isort -c .
|
|
||||||
working-directory: ./src
|
|
||||||
flake:
|
|
||||||
name: flake8
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up Python 3.8
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: pip3 install -r src/requirements.txt --no-use-pep517 -Ur src/requirements/dev.txt
|
|
||||||
- name: Run flake8
|
|
||||||
run: flake8 .
|
|
||||||
working-directory: ./src
|
|
||||||
75
.github/workflows/tests.yml
vendored
@@ -1,75 +0,0 @@
|
|||||||
name: Tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- 'doc/**'
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
paths-ignore:
|
|
||||||
- 'doc/**'
|
|
||||||
- 'src/pretix/locale/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
name: Tests
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
python-version: [3.6, 3.7, 3.8]
|
|
||||||
database: [sqlite, postgres, mysql]
|
|
||||||
exclude:
|
|
||||||
- database: mysql
|
|
||||||
python-version: 3.7
|
|
||||||
- database: sqlite
|
|
||||||
python-version: 3.7
|
|
||||||
- database: mysql
|
|
||||||
python-version: 3.6
|
|
||||||
- database: sqlite
|
|
||||||
python-version: 3.6
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: getong/mariadb-action@v1.1
|
|
||||||
with:
|
|
||||||
mariadb version: '10.4'
|
|
||||||
mysql database: 'pretix'
|
|
||||||
mysql root password: ''
|
|
||||||
if: matrix.database == 'mysql'
|
|
||||||
- uses: harmon758/postgresql-action@v1
|
|
||||||
with:
|
|
||||||
postgresql version: '11'
|
|
||||||
postgresql db: 'pretix'
|
|
||||||
postgresql user: 'postgres'
|
|
||||||
postgresql password: 'postgres'
|
|
||||||
if: matrix.database == 'postgres'
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
|
||||||
uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
- name: Install system dependencies
|
|
||||||
run: sudo apt update && sudo apt install gettext mysql-client
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: pip3 install -r src/requirements.txt --no-use-pep517 -Ur src/requirements/dev.txt mysqlclient psycopg2-binary
|
|
||||||
- name: Run checks
|
|
||||||
run: python manage.py check
|
|
||||||
working-directory: ./src
|
|
||||||
- name: Compile
|
|
||||||
working-directory: ./src
|
|
||||||
run: make all compress
|
|
||||||
- name: Run tests
|
|
||||||
working-directory: ./src
|
|
||||||
run: PRETIX_CONFIG_FILE=tests/travis_${{ matrix.database }}.cfg py.test -n 3 -p no:sugar --cov=./ --cov-report=xml --reruns 3 tests --maxfail=100
|
|
||||||
- name: Upload coverage
|
|
||||||
uses: codecov/codecov-action@v1
|
|
||||||
with:
|
|
||||||
file: src/coverage.xml
|
|
||||||
fail_ci_if_error: true
|
|
||||||
if: matrix.database == 'postgres' && matrix.python-version == '3.8'
|
|
||||||
@@ -5,11 +5,7 @@ tests:
|
|||||||
- virtualenv env
|
- virtualenv env
|
||||||
- source env/bin/activate
|
- source env/bin/activate
|
||||||
- pip install -U pip wheel setuptools
|
- pip install -U pip wheel setuptools
|
||||||
- XDG_CACHE_HOME=/cache pip3 install -r src/requirements.txt --no-use-pep517 -Ur src/requirements/dev.txt
|
- XDG_CACHE_HOME=/cache bash .travis.sh tests
|
||||||
- cd src
|
|
||||||
- python manage.py check
|
|
||||||
- make all compress
|
|
||||||
- py.test --reruns 3 -n 3 tests
|
|
||||||
tags:
|
tags:
|
||||||
- python3
|
- python3
|
||||||
except:
|
except:
|
||||||
@@ -20,17 +16,15 @@ pypi:
|
|||||||
- cp /keys/.pypirc ~/.pypirc
|
- cp /keys/.pypirc ~/.pypirc
|
||||||
- virtualenv env
|
- virtualenv env
|
||||||
- source env/bin/activate
|
- source env/bin/activate
|
||||||
- pip install -U pip wheel setuptools check-manifest twine
|
- pip install -U pip wheel setuptools
|
||||||
- XDG_CACHE_HOME=/cache pip3 install -Ur src/requirements.txt -r src/requirements/dev.txt
|
- XDG_CACHE_HOME=/cache pip3 install -Ur src/requirements.txt -r src/requirements/dev.txt
|
||||||
- cd src
|
- cd src
|
||||||
- python setup.py sdist
|
- python setup.py sdist
|
||||||
- pip install dist/pretix-*.tar.gz
|
- pip install dist/pretix-*.tar.gz
|
||||||
- python -m pretix migrate
|
- python -m pretix migrate
|
||||||
- python -m pretix check
|
- python -m pretix check
|
||||||
- check-manifest
|
- python setup.py sdist upload
|
||||||
- python setup.py sdist bdist_wheel
|
- python setup.py bdist_wheel upload
|
||||||
- twine check dist/*
|
|
||||||
- twine upload dist/*
|
|
||||||
tags:
|
tags:
|
||||||
- python3
|
- python3
|
||||||
only:
|
only:
|
||||||
|
|||||||
68
.travis.sh
Executable file
@@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
echo "Executing job $1"
|
||||||
|
|
||||||
|
if [ "$PRETIX_CONFIG_FILE" == "tests/travis_mysql.cfg" ]; then
|
||||||
|
mysql -u root -e 'CREATE DATABASE pretix DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'
|
||||||
|
pip3 install -Ur src/requirements/mysql.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$PRETIX_CONFIG_FILE" == "tests/travis_postgres.cfg" ]; then
|
||||||
|
psql -c 'create database travis_ci_test;' -U postgres
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "style" ]; then
|
||||||
|
XDG_CACHE_HOME=/cache pip3 install -Ur src/requirements.txt -r src/requirements/dev.txt
|
||||||
|
cd src
|
||||||
|
flake8 .
|
||||||
|
isort -c -rc -df .
|
||||||
|
fi
|
||||||
|
if [ "$1" == "doctests" ]; then
|
||||||
|
XDG_CACHE_HOME=/cache pip3 install -Ur doc/requirements.txt
|
||||||
|
cd doc
|
||||||
|
make doctest
|
||||||
|
fi
|
||||||
|
if [ "$1" == "doc-spelling" ]; then
|
||||||
|
XDG_CACHE_HOME=/cache pip3 install -Ur doc/requirements.txt
|
||||||
|
cd doc
|
||||||
|
make spelling
|
||||||
|
if [ -s _build/spelling/output.txt ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$1" == "translation-spelling" ]; then
|
||||||
|
XDG_CACHE_HOME=/cache pip3 install -Ur src/requirements/dev.txt
|
||||||
|
cd src
|
||||||
|
potypo
|
||||||
|
fi
|
||||||
|
if [ "$1" == "tests" ]; then
|
||||||
|
pip3 install -r src/requirements.txt -Ur src/requirements/dev.txt
|
||||||
|
cd src
|
||||||
|
python manage.py check
|
||||||
|
make all compress
|
||||||
|
py.test --reruns 5 -n 3 tests
|
||||||
|
fi
|
||||||
|
if [ "$1" == "tests-cov" ]; then
|
||||||
|
pip3 install -r src/requirements.txt -Ur src/requirements/dev.txt
|
||||||
|
cd src
|
||||||
|
python manage.py check
|
||||||
|
make all compress
|
||||||
|
coverage run -m py.test --reruns 5 tests && codecov
|
||||||
|
fi
|
||||||
|
if [ "$1" == "plugins" ]; then
|
||||||
|
pip3 install -r src/requirements.txt -Ur src/requirements/dev.txt
|
||||||
|
cd src
|
||||||
|
python setup.py develop
|
||||||
|
make all compress
|
||||||
|
|
||||||
|
pushd ~
|
||||||
|
git clone --depth 1 https://github.com/pretix/pretix-cartshare.git
|
||||||
|
cd pretix-cartshare
|
||||||
|
python setup.py develop
|
||||||
|
make
|
||||||
|
py.test --reruns 5 tests
|
||||||
|
popd
|
||||||
|
|
||||||
|
fi
|
||||||
47
.travis.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
language: python
|
||||||
|
dist: xenial
|
||||||
|
sudo: false
|
||||||
|
install:
|
||||||
|
- pip install -U pip wheel setuptools
|
||||||
|
script:
|
||||||
|
- bash .travis.sh $JOB
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.cache/pip
|
||||||
|
services:
|
||||||
|
- mysql
|
||||||
|
- postgresql
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=tests PRETIX_CONFIG_FILE=tests/travis_sqlite.cfg
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=tests-cov PRETIX_CONFIG_FILE=tests/travis_postgres.cfg
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=style
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=tests PRETIX_CONFIG_FILE=tests/travis_mysql.cfg
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=tests PRETIX_CONFIG_FILE=tests/travis_postgres.cfg
|
||||||
|
- python: 3.5
|
||||||
|
env: JOB=tests PRETIX_CONFIG_FILE=tests/travis_postgres.cfg
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=plugins
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=doc-spelling
|
||||||
|
- python: 3.7
|
||||||
|
env: JOB=translation-spelling
|
||||||
|
addons:
|
||||||
|
postgresql: "9.4"
|
||||||
|
mariadb: '10.3'
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- enchant
|
||||||
|
- myspell-de-de
|
||||||
|
- aspell-en
|
||||||
|
- sqlite3
|
||||||
|
sources:
|
||||||
|
- travis-ci/sqlite3
|
||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- /^weblate-.*/
|
||||||
@@ -3,7 +3,7 @@ Contributing to pretix
|
|||||||
|
|
||||||
Hey there and welcome to pretix!
|
Hey there and welcome to pretix!
|
||||||
|
|
||||||
We've got a contributors guide in [our documentation](https://docs.pretix.eu/en/latest/development/contribution/)
|
We've got an contributors guide in [our documentation](https://docs.pretix.eu/en/latest/development/contribution/)
|
||||||
together with notes on the [development setup](https://docs.pretix.eu/en/latest/development/setup.html).
|
together with notes on the [development setup](https://docs.pretix.eu/en/latest/development/setup.html).
|
||||||
|
|
||||||
Please note that we have a [Code of Conduct](https://docs.pretix.eu/en/latest/development/contribution/codeofconduct.html)
|
Please note that we have a [Code of Conduct](https://docs.pretix.eu/en/latest/development/contribution/codeofconduct.html)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ RUN apt-get update && \
|
|||||||
mkdir /etc/pretix && \
|
mkdir /etc/pretix && \
|
||||||
mkdir /data && \
|
mkdir /data && \
|
||||||
useradd -ms /bin/bash -d /pretix -u 15371 pretixuser && \
|
useradd -ms /bin/bash -d /pretix -u 15371 pretixuser && \
|
||||||
echo 'pretixuser ALL=(ALL) NOPASSWD:SETENV: /usr/bin/supervisord' >> /etc/sudoers && \
|
echo 'pretixuser ALL=(ALL) NOPASSWD: /usr/bin/supervisord' >> /etc/sudoers && \
|
||||||
mkdir /static
|
mkdir /static
|
||||||
|
|
||||||
ENV LC_ALL=C.UTF-8 \
|
ENV LC_ALL=C.UTF-8 \
|
||||||
@@ -57,8 +57,6 @@ COPY deployment/docker/nginx.conf /etc/nginx/nginx.conf
|
|||||||
COPY deployment/docker/production_settings.py /pretix/src/production_settings.py
|
COPY deployment/docker/production_settings.py /pretix/src/production_settings.py
|
||||||
COPY src /pretix/src
|
COPY src /pretix/src
|
||||||
|
|
||||||
RUN cd /pretix/src && pip3 install .
|
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/pretix && \
|
RUN chmod +x /usr/local/bin/pretix && \
|
||||||
rm /etc/nginx/sites-enabled/default && \
|
rm /etc/nginx/sites-enabled/default && \
|
||||||
cd /pretix/src && \
|
cd /pretix/src && \
|
||||||
|
|||||||
24
README.rst
@@ -4,10 +4,11 @@ pretix
|
|||||||
.. image:: https://img.shields.io/pypi/v/pretix.svg
|
.. image:: https://img.shields.io/pypi/v/pretix.svg
|
||||||
:target: https://pypi.python.org/pypi/pretix
|
:target: https://pypi.python.org/pypi/pretix
|
||||||
|
|
||||||
.. image:: https://github.com/pretix/pretix/workflows/Documentation/badge.svg
|
.. image:: https://readthedocs.org/projects/pretix/badge/?version=latest
|
||||||
:target: https://docs.pretix.eu/en/latest/
|
:target: https://docs.pretix.eu/en/latest/
|
||||||
|
|
||||||
.. image:: https://github.com/pretix/pretix/workflows/Tests/badge.svg
|
.. image:: https://travis-ci.org/pretix/pretix.svg?branch=master
|
||||||
|
:target: https://travis-ci.org/pretix/pretix
|
||||||
|
|
||||||
.. image:: https://codecov.io/gh/pretix/pretix/branch/master/graph/badge.svg
|
.. image:: https://codecov.io/gh/pretix/pretix/branch/master/graph/badge.svg
|
||||||
:target: https://codecov.io/gh/pretix/pretix
|
:target: https://codecov.io/gh/pretix/pretix
|
||||||
@@ -19,8 +20,9 @@ Reinventing ticket presales, one ticket at a time.
|
|||||||
Project status & release cycle
|
Project status & release cycle
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
While there is always a lot to do and improve on, pretix by now has been in use for thousands of events
|
While there is always a lot to do and improve on, pretix by now has been in use for more than a dozen
|
||||||
conferences that sold millions of tickets combined. We therefore think of pretix as being stable and ready to use.
|
conferences that sold over ten thousand tickets combined without major problems. We therefore think of
|
||||||
|
pretix as being stable and ready to use.
|
||||||
|
|
||||||
If you want to use or extend pretix, we strongly recommend to follow our `blog`_. We will announce all
|
If you want to use or extend pretix, we strongly recommend to follow our `blog`_. We will announce all
|
||||||
releases there. You can always find the latest stable version on PyPI or in the ``release/X.Y`` branch of
|
releases there. You can always find the latest stable version on PyPI or in the ``release/X.Y`` branch of
|
||||||
@@ -29,13 +31,9 @@ the sense that it does not break your data, but its APIs might change without p
|
|||||||
|
|
||||||
To get started using pretix on your own server, look at the `installation guide`_ in our documentation.
|
To get started using pretix on your own server, look at the `installation guide`_ in our documentation.
|
||||||
|
|
||||||
Support
|
This project is 100 percent free and open source software. If you are interested in commercial support,
|
||||||
-------
|
hosting services or supporting this project financially, please go to `pretix.eu`_ or contact us at
|
||||||
|
support@pretix.eu.
|
||||||
This project is 100 percent free and open source software. You are welcome to ask questions in the GitHub
|
|
||||||
repository. Private support via email or phone is only offered to customers of our pretix Hosted or pretix
|
|
||||||
Enterprise offerings. If you are interested in commercial support, hosting services or supporting this project
|
|
||||||
financially, please go to `pretix.eu`_ or contact us at support@pretix.eu.
|
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
@@ -55,8 +53,8 @@ License
|
|||||||
The code in this repository is published under the terms of the Apache License.
|
The code in this repository is published under the terms of the Apache License.
|
||||||
See the LICENSE file for the complete license text.
|
See the LICENSE file for the complete license text.
|
||||||
|
|
||||||
This project is maintained by Raphael Michel. See the AUTHORS file for a list of all
|
This project is maintained by Raphael Michel <mail@raphaelmichel.de>. See the
|
||||||
the awesome folks who contributed to this project.
|
AUTHORS file for a list of all the awesome folks who contributed to this project.
|
||||||
|
|
||||||
.. _installation guide: https://docs.pretix.eu/en/latest/admin/installation/index.html
|
.. _installation guide: https://docs.pretix.eu/en/latest/admin/installation/index.html
|
||||||
.. _developer documentation: https://docs.pretix.eu/en/latest/development/index.html
|
.. _developer documentation: https://docs.pretix.eu/en/latest/development/index.html
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ pid /var/run/nginx.pid;
|
|||||||
daemon off;
|
daemon off;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 4096;
|
worker_connections 768;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
@@ -39,7 +39,7 @@ http {
|
|||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 backlog=4096 default_server;
|
listen 80 default_server;
|
||||||
listen [::]:80 ipv6only=on default_server;
|
listen [::]:80 ipv6only=on default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ fi
|
|||||||
python3 -m pretix migrate --noinput
|
python3 -m pretix migrate --noinput
|
||||||
|
|
||||||
if [ "$1" == "all" ]; then
|
if [ "$1" == "all" ]; then
|
||||||
exec sudo -E /usr/bin/supervisord -n -c /etc/supervisord.conf
|
exec sudo /usr/bin/supervisord -n -c /etc/supervisord.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "webworker" ]; then
|
if [ "$1" == "webworker" ]; then
|
||||||
|
|||||||
@@ -57,9 +57,6 @@ Example::
|
|||||||
A comma-separated list of plugins that are not available even though they are installed.
|
A comma-separated list of plugins that are not available even though they are installed.
|
||||||
Defaults to an empty string.
|
Defaults to an empty string.
|
||||||
|
|
||||||
``auth_backends``
|
|
||||||
A comma-separated list of available auth backends. Defaults to ``pretix.base.auth.NativeAuthBackend``.
|
|
||||||
|
|
||||||
``cookie_domain``
|
``cookie_domain``
|
||||||
The cookie domain to be set. Defaults to ``None``.
|
The cookie domain to be set. Defaults to ``None``.
|
||||||
|
|
||||||
@@ -81,22 +78,6 @@ Example::
|
|||||||
Enables or disables nagging staff users for leaving comments on their sessions for auditability.
|
Enables or disables nagging staff users for leaving comments on their sessions for auditability.
|
||||||
Defaults to ``off``.
|
Defaults to ``off``.
|
||||||
|
|
||||||
``obligatory_2fa``
|
|
||||||
Enables or disables obligatory usage of Two-Factor Authentication for users of the pretix backend.
|
|
||||||
Defaults to ``False``
|
|
||||||
|
|
||||||
``trust_x_forwarded_for``
|
|
||||||
Specifies whether the ``X-Forwarded-For`` header can be trusted. Only set to ``on`` if you have a reverse
|
|
||||||
proxy that actively removes and re-adds the header to make sure the correct client IP is the first value.
|
|
||||||
Defaults to ``off``.
|
|
||||||
|
|
||||||
``trust_x_forwarded_proto``
|
|
||||||
Specifies whether the ``X-Forwarded-Proto`` header can be trusted. Only set to ``on`` if you have a reverse
|
|
||||||
proxy that actively removes and re-adds the header to make sure the correct value is set.
|
|
||||||
Defaults to ``off``.
|
|
||||||
|
|
||||||
``csp_log``
|
|
||||||
Log violations of the Content Security Policy (CSP). Defaults to ``on``.
|
|
||||||
|
|
||||||
Locale settings
|
Locale settings
|
||||||
---------------
|
---------------
|
||||||
@@ -292,24 +273,6 @@ to speed up various operations::
|
|||||||
If redis is not configured, pretix will store sessions and locks in the database. If memcached
|
If redis is not configured, pretix will store sessions and locks in the database. If memcached
|
||||||
is configured, memcached will be used for caching instead of redis.
|
is configured, memcached will be used for caching instead of redis.
|
||||||
|
|
||||||
Translations
|
|
||||||
------------
|
|
||||||
|
|
||||||
pretix comes with a number of translations. Some of them are marked as "incubating", which means
|
|
||||||
they can usually only be selected in development mode. If you want to use them nevertheless, you
|
|
||||||
can activate them like this::
|
|
||||||
|
|
||||||
[languages]
|
|
||||||
allow_incubating=pt-br,da
|
|
||||||
|
|
||||||
You can also tell pretix about additional paths where it will search for translations::
|
|
||||||
|
|
||||||
[languages]
|
|
||||||
path=/path/to/my/translations
|
|
||||||
|
|
||||||
For a given language (e.g. ``pt-br``), pretix will then look in the
|
|
||||||
specific sub-folder, e.g. ``/path/to/my/translations/pt_BR/LC_MESSAGES/django.po``.
|
|
||||||
|
|
||||||
Celery task queue
|
Celery task queue
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
@@ -339,15 +302,6 @@ application. If you want to use sentry, you need to set a DSN in the configurati
|
|||||||
You will be given this value by your sentry installation.
|
You will be given this value by your sentry installation.
|
||||||
|
|
||||||
|
|
||||||
Caching
|
|
||||||
-------
|
|
||||||
|
|
||||||
You can adjust some caching settings to control how much storage pretix uses::
|
|
||||||
|
|
||||||
[cache]
|
|
||||||
tickets=48 ; Number of hours tickets (PDF, passbook, …) are cached
|
|
||||||
|
|
||||||
|
|
||||||
Secret length
|
Secret length
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|||||||
@@ -12,4 +12,3 @@ This documentation is for everyone who wants to install pretix on a server.
|
|||||||
config
|
config
|
||||||
maintainance
|
maintainance
|
||||||
scaling
|
scaling
|
||||||
indexes
|
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
Additional database indices
|
|
||||||
===========================
|
|
||||||
|
|
||||||
If you have a large pretix database, some features such as search for orders or events might turn pretty slow.
|
|
||||||
For PostgreSQL, we have compiled a list of additional database indexes that you can add to speed things up.
|
|
||||||
Just like any index, they in turn make write operations insignificantly slower and cause the database to use
|
|
||||||
more disk space.
|
|
||||||
|
|
||||||
The indexes aren't automatically created by pretix since Django does not allow us to do so only on PostgreSQL
|
|
||||||
(and they won't work on other databases). Also, they're really not necessary if you're not having tens of
|
|
||||||
thousands of records in your database.
|
|
||||||
|
|
||||||
However, this also means they won't automatically adapt if some of the referred fields change in future updates of pretix
|
|
||||||
and you might need to re-check this page and change them manually.
|
|
||||||
|
|
||||||
Here is the currently recommended set of commands::
|
|
||||||
|
|
||||||
CREATE EXTENSION pg_trgm;
|
|
||||||
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_event_slug
|
|
||||||
ON pretixbase_event
|
|
||||||
USING gin (upper("slug") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_event_name
|
|
||||||
ON pretixbase_event
|
|
||||||
USING gin (upper("name") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_order_code
|
|
||||||
ON pretixbase_order
|
|
||||||
USING gin (upper("code") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_voucher_code
|
|
||||||
ON pretixbase_voucher
|
|
||||||
USING gin (upper("code") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_invoice_nu1
|
|
||||||
ON "pretixbase_invoice" (UPPER("invoice_no"));
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_invoice_nu2
|
|
||||||
ON "pretixbase_invoice" (UPPER("full_invoice_no"));
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_organizer_name
|
|
||||||
ON pretixbase_organizer
|
|
||||||
USING gin (upper("name") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_organizer_slug
|
|
||||||
ON pretixbase_organizer
|
|
||||||
USING gin (upper("slug") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_order_email
|
|
||||||
ON pretixbase_order
|
|
||||||
USING gin (upper("email") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_order_comment
|
|
||||||
ON pretixbase_order
|
|
||||||
USING gin (upper("comment") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_orderpos_name
|
|
||||||
ON pretixbase_orderposition
|
|
||||||
USING gin (upper("attendee_name_cached") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_orderpos_scret
|
|
||||||
ON pretixbase_orderposition
|
|
||||||
USING gin (upper("secret") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_orderpos_email
|
|
||||||
ON pretixbase_orderposition
|
|
||||||
USING gin (upper("attendee_email") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_ia_name
|
|
||||||
ON pretixbase_invoiceaddress
|
|
||||||
USING gin (upper("name_cached") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_ia_company
|
|
||||||
ON pretixbase_invoiceaddress
|
|
||||||
USING gin (upper("company") gin_trgm_ops);
|
|
||||||
|
|
||||||
|
|
||||||
Also, if you use our ``pretix-shipping`` plugin::
|
|
||||||
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_sa_name
|
|
||||||
ON pretix_shipping_shippingaddress
|
|
||||||
USING gin (upper("name") gin_trgm_ops);
|
|
||||||
CREATE INDEX CONCURRENTLY pretix_addidx_sa_company
|
|
||||||
ON pretix_shipping_shippingaddress
|
|
||||||
USING gin (upper("company") gin_trgm_ops);
|
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ installation guides):
|
|||||||
* `Docker`_
|
* `Docker`_
|
||||||
* A SMTP server to send out mails, e.g. `Postfix`_ on your machine or some third-party server you have credentials for
|
* A SMTP server to send out mails, e.g. `Postfix`_ on your machine or some third-party server you have credentials for
|
||||||
* A HTTP reverse proxy, e.g. `nginx`_ or Apache to allow HTTPS connections
|
* A HTTP reverse proxy, e.g. `nginx`_ or Apache to allow HTTPS connections
|
||||||
* A `PostgreSQL`_ 9.5+, `MySQL`_ 5.7+, or MariaDB 10.2.7+ database server
|
* A `PostgreSQL`_, `MySQL`_ 5.7+, or MariaDB 10.2.7+ database server
|
||||||
* A `redis`_ server
|
* A `redis`_ server
|
||||||
|
|
||||||
We also recommend that you use a firewall, although this is not a pretix-specific recommendation. If you're new to
|
We also recommend that you use a firewall, although this is not a pretix-specific recommendation. If you're new to
|
||||||
@@ -125,8 +125,6 @@ Fill the configuration file ``/etc/pretix/pretix.cfg`` with the following conten
|
|||||||
; DO NOT change the following value, it has to be set to the location of the
|
; DO NOT change the following value, it has to be set to the location of the
|
||||||
; directory *inside* the docker container
|
; directory *inside* the docker container
|
||||||
datadir=/data
|
datadir=/data
|
||||||
trust_x_forwarded_for=on
|
|
||||||
trust_x_forwarded_proto=on
|
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
; Replace postgresql with mysql for MySQL
|
; Replace postgresql with mysql for MySQL
|
||||||
@@ -182,7 +180,6 @@ named ``/etc/systemd/system/pretix.service`` with the following content::
|
|||||||
-v /var/pretix-data:/data \
|
-v /var/pretix-data:/data \
|
||||||
-v /etc/pretix:/etc/pretix \
|
-v /etc/pretix:/etc/pretix \
|
||||||
-v /var/run/redis:/var/run/redis \
|
-v /var/run/redis:/var/run/redis \
|
||||||
--sysctl net.core.somaxconn=4096 \
|
|
||||||
pretix/standalone:stable all
|
pretix/standalone:stable all
|
||||||
ExecStop=/usr/bin/docker stop %n
|
ExecStop=/usr/bin/docker stop %n
|
||||||
|
|
||||||
@@ -279,7 +276,7 @@ choice)::
|
|||||||
|
|
||||||
Then, go to that directory and build the image::
|
Then, go to that directory and build the image::
|
||||||
|
|
||||||
$ docker build . -t mypretix
|
$ docker build -t mypretix
|
||||||
|
|
||||||
You can now use that image ``mypretix`` instead of ``pretix/standalone`` in your service file (see above). Be sure
|
You can now use that image ``mypretix`` instead of ``pretix/standalone`` in your service file (see above). Be sure
|
||||||
to re-build your custom image after you pulled ``pretix/standalone`` if you want to perform an update.
|
to re-build your custom image after you pulled ``pretix/standalone`` if you want to perform an update.
|
||||||
@@ -290,7 +287,7 @@ to re-build your custom image after you pulled ``pretix/standalone`` if you want
|
|||||||
.. _Let's Encrypt: https://letsencrypt.org/
|
.. _Let's Encrypt: https://letsencrypt.org/
|
||||||
.. _pretix.eu: https://pretix.eu/
|
.. _pretix.eu: https://pretix.eu/
|
||||||
.. _MySQL: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-apt-repo.html
|
.. _MySQL: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-apt-repo.html
|
||||||
.. _PostgreSQL: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04
|
.. _PostgreSQL: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-9-4-on-debian-8
|
||||||
.. _redis: https://blog.programster.org/debian-8-install-redis-server/
|
.. _redis: https://blog.programster.org/debian-8-install-redis-server/
|
||||||
.. _ufw: https://en.wikipedia.org/wiki/Uncomplicated_Firewall
|
.. _ufw: https://en.wikipedia.org/wiki/Uncomplicated_Firewall
|
||||||
.. _redis website: https://redis.io/topics/security
|
.. _redis website: https://redis.io/topics/security
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ generated key and installs the plugin from the URL we told you::
|
|||||||
mkdir -p /etc/ssh && \
|
mkdir -p /etc/ssh && \
|
||||||
ssh-keyscan -t rsa -p 10022 code.rami.io >> /root/.ssh/known_hosts && \
|
ssh-keyscan -t rsa -p 10022 code.rami.io >> /root/.ssh/known_hosts && \
|
||||||
echo StrictHostKeyChecking=no >> /root/.ssh/config && \
|
echo StrictHostKeyChecking=no >> /root/.ssh/config && \
|
||||||
DJANGO_SETTINGS_MODULE=pretix.settings pip3 install -U "git+ssh://git@code.rami.io:10022/pretix/pretix-slack.git@stable#egg=pretix-slack" && \
|
pip3 install -Ue "git+ssh://git@code.rami.io:10022/pretix/pretix-slack.git@stable#egg=pretix-slack" && \
|
||||||
cd /pretix/src && \
|
cd /pretix/src && \
|
||||||
sudo -u pretixuser make production
|
sudo -u pretixuser make production
|
||||||
USER pretixuser
|
USER pretixuser
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ solution with many things readily set-up, look at :ref:`dockersmallscale`.
|
|||||||
get it right. If you're not feeling comfortable managing a Linux server, check out our hosting and service
|
get it right. If you're not feeling comfortable managing a Linux server, check out our hosting and service
|
||||||
offers at `pretix.eu`_.
|
offers at `pretix.eu`_.
|
||||||
|
|
||||||
We tested this guide on the Linux distribution **Debian 10.0** but it should work very similar on other
|
We tested this guide on the Linux distribution **Debian 8.0** but it should work very similar on other
|
||||||
modern distributions, especially on all systemd-based ones.
|
modern distributions, especially on all systemd-based ones.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
@@ -23,7 +23,7 @@ installation guides):
|
|||||||
|
|
||||||
* A SMTP server to send out mails, e.g. `Postfix`_ on your machine or some third-party server you have credentials for
|
* A SMTP server to send out mails, e.g. `Postfix`_ on your machine or some third-party server you have credentials for
|
||||||
* A HTTP reverse proxy, e.g. `nginx`_ or Apache to allow HTTPS connections
|
* A HTTP reverse proxy, e.g. `nginx`_ or Apache to allow HTTPS connections
|
||||||
* A `PostgreSQL`_ 9.5+, `MySQL`_ 5.7+, or MariaDB 10.2.7+ database server
|
* A `PostgreSQL`_, `MySQL`_ 5.7+, or MariaDB 10.2.7+ database server
|
||||||
* A `redis`_ server
|
* A `redis`_ server
|
||||||
|
|
||||||
We also recommend that you use a firewall, although this is not a pretix-specific recommendation. If you're new to
|
We also recommend that you use a firewall, although this is not a pretix-specific recommendation. If you're new to
|
||||||
@@ -85,8 +85,6 @@ Fill the configuration file ``/etc/pretix/pretix.cfg`` with the following conten
|
|||||||
url=https://pretix.mydomain.com
|
url=https://pretix.mydomain.com
|
||||||
currency=EUR
|
currency=EUR
|
||||||
datadir=/var/pretix/data
|
datadir=/var/pretix/data
|
||||||
trust_x_forwarded_for=on
|
|
||||||
trust_x_forwarded_proto=on
|
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
; For MySQL, replace with "mysql"
|
; For MySQL, replace with "mysql"
|
||||||
@@ -133,7 +131,7 @@ command if you're running MySQL::
|
|||||||
|
|
||||||
(venv)$ pip3 install "pretix[postgres]" gunicorn
|
(venv)$ pip3 install "pretix[postgres]" gunicorn
|
||||||
|
|
||||||
Note that you need Python 3.6 or newer. You can find out your Python version using ``python -V``.
|
Note that you need Python 3.5 or newer. You can find out your Python version using ``python -V``.
|
||||||
|
|
||||||
We also need to create a data directory::
|
We also need to create a data directory::
|
||||||
|
|
||||||
@@ -308,7 +306,7 @@ example::
|
|||||||
.. _Let's Encrypt: https://letsencrypt.org/
|
.. _Let's Encrypt: https://letsencrypt.org/
|
||||||
.. _pretix.eu: https://pretix.eu/
|
.. _pretix.eu: https://pretix.eu/
|
||||||
.. _MySQL: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-apt-repo.html
|
.. _MySQL: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-apt-repo.html
|
||||||
.. _PostgreSQL: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04
|
.. _PostgreSQL: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-9-4-on-debian-8
|
||||||
.. _redis: https://blog.programster.org/debian-8-install-redis-server/
|
.. _redis: https://blog.programster.org/debian-8-install-redis-server/
|
||||||
.. _ufw: https://en.wikipedia.org/wiki/Uncomplicated_Firewall
|
.. _ufw: https://en.wikipedia.org/wiki/Uncomplicated_Firewall
|
||||||
.. _strong encryption settings: https://mozilla.github.io/server-side-tls/ssl-config-generator/
|
.. _strong encryption settings: https://mozilla.github.io/server-side-tls/ssl-config-generator/
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ pretix_task_duration_seconds
|
|||||||
|
|
||||||
pretix_model_instances
|
pretix_model_instances
|
||||||
Gauge. Measures number of instances of a certain model within the database, labeled with
|
Gauge. Measures number of instances of a certain model within the database, labeled with
|
||||||
the ``model`` name. Starting with pretix 3.11, these numbers might only be approximate for
|
the ``model`` name.
|
||||||
most tables when running on PostgreSQL to mitigate performance impact.
|
|
||||||
|
|
||||||
.. _metric types: https://prometheus.io/docs/concepts/metric_types/
|
.. _metric types: https://prometheus.io/docs/concepts/metric_types/
|
||||||
.. _Prometheus: https://prometheus.io/
|
.. _Prometheus: https://prometheus.io/
|
||||||
|
|||||||
@@ -170,19 +170,6 @@ Date String in ISO 8601 format ``2017-12-27``
|
|||||||
Multi-lingual string Object of strings ``{"en": "red", "de": "rot", "de_Informal": "rot"}``
|
Multi-lingual string Object of strings ``{"en": "red", "de": "rot", "de_Informal": "rot"}``
|
||||||
Money String with decimal number ``"23.42"``
|
Money String with decimal number ``"23.42"``
|
||||||
Currency String with ISO 4217 code ``"EUR"``, ``"USD"``
|
Currency String with ISO 4217 code ``"EUR"``, ``"USD"``
|
||||||
Relative datetime *either* String in ISO 8601 ``"2017-12-27T10:00:00.596934Z"``,
|
|
||||||
format *or* specification of ``"RELDATE/3/12:00:00/presale_start/"``
|
|
||||||
a relative datetime,
|
|
||||||
constructed from a number of
|
|
||||||
days before the base point,
|
|
||||||
a time of day, and the base
|
|
||||||
point.
|
|
||||||
Relative date *either* String in ISO 8601 ``"2017-12-27"``,
|
|
||||||
format *or* specification of ``"RELDATE/3/-/presale_start/"``
|
|
||||||
a relative date,
|
|
||||||
constructed from a number of
|
|
||||||
days before the base point
|
|
||||||
and the base point.
|
|
||||||
===================== ============================ ===================================
|
===================== ============================ ===================================
|
||||||
|
|
||||||
Query parameters
|
Query parameters
|
||||||
|
|||||||
@@ -1,132 +0,0 @@
|
|||||||
Creating an external checkout process
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
Occasionally, we get asked whether it is possible to just use pretix' powerful backend as a ticketing engine but use
|
|
||||||
a fully-customized checkout process that only communicates via the API. This is possible, but with a few limitations.
|
|
||||||
If you go down this route, you will miss out on many of pretix features and safeguards, as well as the added flexibility
|
|
||||||
by most of pretix' plugins. We strongly recommend to talk this through with us before you decide this is the way to go.
|
|
||||||
|
|
||||||
However, this is really useful if you need to tightly integrate pretix into existing web applications that e.g. control
|
|
||||||
the pricing of your products in a way that cannot be mapped to pretix' product structures.
|
|
||||||
|
|
||||||
Creating orders
|
|
||||||
---------------
|
|
||||||
|
|
||||||
After letting your user select the products to buy in your application, you should create a new order object inside
|
|
||||||
pretix. Below, you can see an example of such an order, but most fields are optional and there are some more features
|
|
||||||
supported. Read :ref:`rest-orders-create` to learn more about this endpoint.
|
|
||||||
|
|
||||||
Please note that this endpoint assumes trustworthy input for the most part. By default, the endpoint checks that
|
|
||||||
you do not exceed any quotas, do not sell any seats twice, or do not use any redeemed vouchers. However, it will not
|
|
||||||
complain about violation of any other availability constraints, such as violation of time frames or minimum/maximum
|
|
||||||
amounts of either your product or event. Bundled products will not be added in automatically and fees will not be
|
|
||||||
calculated automatically.
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/democon/events/3vjrh/orders/ HTTP/1.1
|
|
||||||
Host: test.pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Authorization: …
|
|
||||||
|
|
||||||
{
|
|
||||||
"email": "dummy@example.org",
|
|
||||||
"locale": "en",
|
|
||||||
"sales_channel": "web",
|
|
||||||
"payment_provider": "banktransfer",
|
|
||||||
"invoice_address": {
|
|
||||||
"is_business": false,
|
|
||||||
"company": "Sample company",
|
|
||||||
"name_parts": {"full_name": "John Doe"},
|
|
||||||
"street": "Sesam Street 12",
|
|
||||||
"zipcode": "12345",
|
|
||||||
"city": "Sample City",
|
|
||||||
"country": "US",
|
|
||||||
"state": "NY",
|
|
||||||
"internal_reference": "",
|
|
||||||
"vat_id": ""
|
|
||||||
},
|
|
||||||
"positions": [
|
|
||||||
{
|
|
||||||
"item": 21,
|
|
||||||
"variation": null,
|
|
||||||
"attendee_name_parts": {
|
|
||||||
"full_name": "Peter"
|
|
||||||
},
|
|
||||||
"answers": [
|
|
||||||
{
|
|
||||||
"question": 1,
|
|
||||||
"answer": "23",
|
|
||||||
"options": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"subevent": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"fees": []
|
|
||||||
}
|
|
||||||
|
|
||||||
You will be returned a full order object that you can inspect, store, or use to build emails or confirmation pages for
|
|
||||||
the user. If you don't want to do that yourself, it will also contain the URL to our confirmation page in the ``url``
|
|
||||||
attribute. If you pass the ``"send_mail": true`` option, pretix will also send order confirmations for you.
|
|
||||||
|
|
||||||
Handling payments yourself
|
|
||||||
--------------------------
|
|
||||||
|
|
||||||
If you want to handle payments in your application, you can either just create the orders with status "paid" or you can
|
|
||||||
create them in "pending" state (the default) and later confirm the payment. We strongly advise to use the payment
|
|
||||||
provider ``"manual"`` in this case to avoid interference with payment code with pretix.
|
|
||||||
|
|
||||||
However, it is often unfeasible to implement the payment process yourself, and it also requires you to give up a
|
|
||||||
lot of pretix functionality, such as automatic refunds. Therefore, it is also possible to utilize pretix' native
|
|
||||||
payment process even in this case:
|
|
||||||
|
|
||||||
Using pretix payment providers
|
|
||||||
------------------------------
|
|
||||||
|
|
||||||
If you passed a ``payment_provider`` during order creation above, pretix will have created a payment object with state
|
|
||||||
``created`` that you can see in the returned order object. This payment object will have an attribute ``payment_url``
|
|
||||||
that you can use to let the user pay. For example, you could link or redirect to this page.
|
|
||||||
|
|
||||||
If you want the user to return to your application after the payment is complete, you can pass a query parameter
|
|
||||||
``return_url``. To prepare your event for this, open your event in the pretix backend and go to "Settings", then
|
|
||||||
"Plugins". Enable the plugin "Redirection from order page". Then, go to the new page "Settings", then "Redirection".
|
|
||||||
Enter the base URL of your web application. This will allow you to redirect to pages under this base URL later on.
|
|
||||||
For example, if you want users to be redirected to ``https://example.org/order/return?tx_id=1234``, you could now
|
|
||||||
either enter ``https://example.org`` or ``https://example.org/order/``.
|
|
||||||
|
|
||||||
The user will be redirected back to your page instead of pretix' order confirmation page after the payment,
|
|
||||||
**regardless of whether it was successful or not**. Make sure you use our API to check if the payment actually
|
|
||||||
worked! Your final URL could look like this::
|
|
||||||
|
|
||||||
https://test.pretix.eu/democon/3vjrh/order/NSLEZ/ujbrnsjzbq4dzhck/pay/123/?return_url=https%3A%2F%2Fexample.org%2Forder%2Freturn%3Ftx_id%3D1234
|
|
||||||
|
|
||||||
You can also embed this page in an ``<iframe>`` instead. Note, however, that this causes problems with some payment
|
|
||||||
methods such as PayPal which do not allow being opened in an iframe. pretix can partly work around these issues by
|
|
||||||
opening a new window, but will only to so if you also append an ``iframe=1`` parameter to the URL::
|
|
||||||
|
|
||||||
https://test.pretix.eu/democon/3vjrh/order/NSLEZ/ujbrnsjzbq4dzhck/pay/123/?return_url=https%3A%2F%2Fexample.org%2Forder%2Freturn%3Ftx_id%3D1234&iframe=1
|
|
||||||
|
|
||||||
If you did **not** pass a payment method since you want us to ask the user which payment method they want to use, you
|
|
||||||
need to construct the URL from the ``url`` attribute of the order and the sub-path ``pay/change```. For example, you
|
|
||||||
would end up with the following URL::
|
|
||||||
|
|
||||||
https://test.pretix.eu/democon/3vjrh/order/NSLEZ/ujbrnsjzbq4dzhck/pay/change
|
|
||||||
|
|
||||||
Of course, you can also use the ``iframe`` and ``return_url`` parameters here.
|
|
||||||
|
|
||||||
Optional: Cart reservations
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
Creating orders is an atomic operation: The order is either created as a whole or not at all. However, pretix'
|
|
||||||
built-in checkout automatically reserves tickets in a user's cart for a configurable amount of time to ensure users
|
|
||||||
will actually get their tickets once they started entering all their details. If you want a similar behavior in your
|
|
||||||
application, you need to create :ref:`rest-carts` through the API.
|
|
||||||
|
|
||||||
When creating your order, you can pass a ``consume_carts`` parameter with the cart ID(s) of your user. This way, the
|
|
||||||
quota reserved by the cart will be credited towards the order and the carts will be destroyed if (and only if) the
|
|
||||||
order creation succeeds.
|
|
||||||
|
|
||||||
Cart creation is currently even more limited than the order creation endpoints, as cart creation currently does not
|
|
||||||
support vouchers or automatic price calculation. If you require these features, please get in touch with us.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
.. _`rest-api-guides`:
|
|
||||||
|
|
||||||
API Usage Guides
|
|
||||||
================
|
|
||||||
|
|
||||||
This part of the documentation contains how-to guides on some special use cases of our API.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
custom_checkout
|
|
||||||
@@ -7,6 +7,9 @@ This part of the documentation contains information about the REST-style API
|
|||||||
exposed by pretix since version 1.5 that can be used by third-party programs
|
exposed by pretix since version 1.5 that can be used by third-party programs
|
||||||
to interact with pretix and its data structures.
|
to interact with pretix and its data structures.
|
||||||
|
|
||||||
|
Currently, the API provides mostly read-only capabilities, but it will be extended
|
||||||
|
in functionality over time.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
@@ -15,4 +18,3 @@ to interact with pretix and its data structures.
|
|||||||
resources/index
|
resources/index
|
||||||
ratelimit
|
ratelimit
|
||||||
webhooks
|
webhooks
|
||||||
guides/index
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ access to the API. The ``token`` endpoint expects you to authenticate using `HTT
|
|||||||
ID as a username and your client secret as a password. You are also required to again supply the same ``redirect_uri``
|
ID as a username and your client secret as a password. You are also required to again supply the same ``redirect_uri``
|
||||||
parameter that you used for the authorization.
|
parameter that you used for the authorization.
|
||||||
|
|
||||||
.. http:post:: /api/v1/oauth/token
|
.. http:get:: /api/v1/oauth/token
|
||||||
|
|
||||||
Request a new access token
|
Request a new access token
|
||||||
|
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
pretix Hosted billing invoices
|
|
||||||
==============================
|
|
||||||
|
|
||||||
This endpoint allows you to access invoices you received for pretix Hosted. It only contains invoices created starting
|
|
||||||
November 2017.
|
|
||||||
|
|
||||||
.. note:: Only available on pretix Hosted, not on self-hosted pretix instances.
|
|
||||||
|
|
||||||
Resource description
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
invoice_number string Invoice number
|
|
||||||
date_issued date Invoice date
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
|
|
||||||
Endpoints
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/billing_invoices/
|
|
||||||
|
|
||||||
Returns a list of all invoices to a given organizer.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/billing_invoices/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"invoice_number": "R2019002",
|
|
||||||
"date_issued": "2019-06-03"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:query string ordering: Manually set the ordering of results. Valid fields to be used are ``date_issued`` and
|
|
||||||
its reverse, ``-date_issued``. Default: ``date_issued``.
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/billing_invoices/(invoice_number)/
|
|
||||||
|
|
||||||
Returns information on one invoice, identified by its invoice number.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/billing_invoices/R2019002/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"invoice_number": "R2019002",
|
|
||||||
"date_issued": "2019-06-03"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param invoice_number: The ``invoice_number`` field of the invoice to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/billing_invoices/(invoice_number)/download/
|
|
||||||
|
|
||||||
Download an invoice in PDF format.
|
|
||||||
|
|
||||||
.. warning:: After we created the invoices, they are placed in review with our accounting department. You will
|
|
||||||
already see them in the API at this point, but you are not able to download them until they completed
|
|
||||||
review and are sent to you via email. This usually takes a few hours. If you try to download them
|
|
||||||
in this time frame, you will receive a status code :http:statuscode:`423`.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/billing_invoices/R2019002/download/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/pdf
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param invoice_number: The ``invoice_number`` field of the invoice to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 423: The file is not yet ready and will now be prepared. Retry the request after waiting for a few
|
|
||||||
seconds.
|
|
||||||
@@ -1,148 +0,0 @@
|
|||||||
pretix Hosted reseller API
|
|
||||||
==========================
|
|
||||||
|
|
||||||
This API is only accessible to our `value-added reseller partners`_ on pretix Hosted.
|
|
||||||
|
|
||||||
.. note:: This API is only accessible with user-level permissions, not with API tokens. Therefore, you will need to
|
|
||||||
create an :ref:`OAuth application <rest-oauth>` and obtain an OAuth access token for a user account that has
|
|
||||||
permission to your reseller account.
|
|
||||||
|
|
||||||
Reseller account resource
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
The resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Your reseller ID
|
|
||||||
name string Internal name of your reseller account
|
|
||||||
public_name string Public name of your reseller account
|
|
||||||
public_url string Public URL of your company
|
|
||||||
support_email string Your support email address
|
|
||||||
support_phone string Your support phone number
|
|
||||||
communication_language string Language code we use to communicate with you
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
|
|
||||||
Endpoints
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/var/
|
|
||||||
|
|
||||||
Returns a list of all reseller accounts you have access to.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/var/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "ticketshop.live Ltd & Co. KG",
|
|
||||||
"public_name": "ticketshop.live",
|
|
||||||
"public_url": "https://ticketshop.live",
|
|
||||||
"support_email": "support@ticketshop.live",
|
|
||||||
"support_phone": "+4962213217750",
|
|
||||||
"communication_language": "de"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/var/(id)/
|
|
||||||
|
|
||||||
Returns information on one reseller account, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/var/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "ticketshop.live Ltd & Co. KG",
|
|
||||||
"public_name": "ticketshop.live",
|
|
||||||
"public_url": "https://ticketshop.live",
|
|
||||||
"support_email": "support@ticketshop.live",
|
|
||||||
"support_phone": "+4962213217750",
|
|
||||||
"communication_language": "de"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param id: The ``id`` field of the reseller account to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 404: The requested account does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/var/(id)/create_organizer/
|
|
||||||
|
|
||||||
Creates a new organizer account that will be associated with a given reseller account.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/var/1/create_organizer/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 123
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "My new client",
|
|
||||||
"slug": "New client"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "My new client",
|
|
||||||
"slug": "New client"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param id: The ``id`` field of the reseller account to fetch
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 400: Invalid request body, usually the slug is invalid or already taken.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 404: The requested account does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. _value-added reseller partners: https://pretix.eu/about/en/var
|
|
||||||
@@ -36,20 +36,12 @@ answers list of objects Answers to user
|
|||||||
├ question_identifier string The question's ``identifier`` field
|
├ question_identifier string The question's ``identifier`` field
|
||||||
├ options list of integers Internal IDs of selected option(s)s (only for choice types)
|
├ options list of integers Internal IDs of selected option(s)s (only for choice types)
|
||||||
└ option_identifiers list of strings The ``identifier`` fields of the selected option(s)s
|
└ option_identifiers list of strings The ``identifier`` fields of the selected option(s)s
|
||||||
seat objects The assigned seat. Can be ``null``.
|
|
||||||
├ id integer Internal ID of the seat instance
|
|
||||||
├ name string Human-readable seat name
|
|
||||||
└ seat_guid string Identifier of the seat within the seating plan
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 1.17
|
.. versionchanged:: 1.17
|
||||||
|
|
||||||
This resource has been added.
|
This resource has been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
This ``seat`` attribute has been added.
|
|
||||||
|
|
||||||
|
|
||||||
Cart position endpoints
|
Cart position endpoints
|
||||||
-----------------------
|
-----------------------
|
||||||
@@ -95,7 +87,6 @@ Cart position endpoints
|
|||||||
"datetime": "2018-06-11T10:00:00Z",
|
"datetime": "2018-06-11T10:00:00Z",
|
||||||
"expires": "2018-06-11T10:00:00Z",
|
"expires": "2018-06-11T10:00:00Z",
|
||||||
"includes_tax": true,
|
"includes_tax": true,
|
||||||
"seat": null,
|
|
||||||
"answers": []
|
"answers": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -141,7 +132,6 @@ Cart position endpoints
|
|||||||
"datetime": "2018-06-11T10:00:00Z",
|
"datetime": "2018-06-11T10:00:00Z",
|
||||||
"expires": "2018-06-11T10:00:00Z",
|
"expires": "2018-06-11T10:00:00Z",
|
||||||
"includes_tax": true,
|
"includes_tax": true,
|
||||||
"seat": null,
|
|
||||||
"answers": []
|
"answers": []
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,13 +178,11 @@ Cart position endpoints
|
|||||||
* ``item``
|
* ``item``
|
||||||
* ``variation`` (optional)
|
* ``variation`` (optional)
|
||||||
* ``price``
|
* ``price``
|
||||||
* ``seat`` (The ``seat_guid`` attribute of a seat. Required when the specified ``item`` requires a seat, otherwise must be ``null``.)
|
|
||||||
* ``attendee_name`` **or** ``attendee_name_parts`` (optional)
|
* ``attendee_name`` **or** ``attendee_name_parts`` (optional)
|
||||||
* ``attendee_email`` (optional)
|
* ``attendee_email`` (optional)
|
||||||
* ``subevent`` (optional)
|
* ``subevent`` (optional)
|
||||||
* ``expires`` (optional)
|
* ``expires`` (optional)
|
||||||
* ``includes_tax`` (optional)
|
* ``includes_tax`` (optional)
|
||||||
* ``sales_channel`` (optional)
|
|
||||||
* ``answers``
|
* ``answers``
|
||||||
|
|
||||||
* ``question``
|
* ``question``
|
||||||
@@ -208,7 +196,7 @@ Cart position endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/cartpositions/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/cartpositions/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"item": 1,
|
"item": 1,
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/categories/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/categories/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": {"en": "Tickets"},
|
"name": {"en": "Tickets"},
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
.. spelling:: checkin
|
|
||||||
|
|
||||||
Check-in lists
|
Check-in lists
|
||||||
==============
|
==============
|
||||||
|
|
||||||
@@ -29,10 +27,6 @@ subevent integer ID of the date
|
|||||||
position_count integer Number of tickets that match this list (read-only).
|
position_count integer Number of tickets that match this list (read-only).
|
||||||
checkin_count integer Number of check-ins performed on this list (read-only).
|
checkin_count integer Number of check-ins performed on this list (read-only).
|
||||||
include_pending boolean If ``true``, the check-in list also contains tickets from orders in pending state.
|
include_pending boolean If ``true``, the check-in list also contains tickets from orders in pending state.
|
||||||
auto_checkin_sales_channels list of strings All items on the check-in list will be automatically marked as checked-in when purchased through any of the listed sales channels.
|
|
||||||
allow_multiple_entries boolean If ``true``, subsequent scans of a ticket on this list should not show a warning but instead be stored as an additional check-in.
|
|
||||||
allow_entry_after_exit boolean If ``true``, subsequent scans of a ticket on this list are valid if the last scan of the ticket was an exit scan.
|
|
||||||
rules object Custom check-in logic. The contents of this field are currently not considered a stable API and modifications through the API are highly discouraged.
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 1.10
|
.. versionchanged:: 1.10
|
||||||
@@ -47,19 +41,6 @@ rules object Custom check-in
|
|||||||
|
|
||||||
The ``include_pending`` field has been added.
|
The ``include_pending`` field has been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
|
||||||
|
|
||||||
The ``auto_checkin_sales_channels`` field has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.9
|
|
||||||
|
|
||||||
The ``subevent`` attribute may now be ``null`` inside event series. The ``allow_multiple_entries``,
|
|
||||||
``allow_entry_after_exit``, and ``rules`` attributes have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.11
|
|
||||||
|
|
||||||
The ``subevent_match`` and ``exclude`` query parameters have been added.
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -100,21 +81,13 @@ Endpoints
|
|||||||
"all_products": true,
|
"all_products": true,
|
||||||
"limit_products": [],
|
"limit_products": [],
|
||||||
"include_pending": false,
|
"include_pending": false,
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"allow_multiple_entries": false,
|
|
||||||
"allow_entry_after_exit": true,
|
|
||||||
"rules": {},
|
|
||||||
"auto_checkin_sales_channels": [
|
|
||||||
"pretixpos"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
:query integer page: The page number in case of a multi-page result set, default is 1
|
||||||
:query integer subevent: Only return check-in lists of the sub-event with the given ID
|
:query integer subevent: Only return check-in lists of the sub-event with the given ID
|
||||||
:query integer subevent_match: Only return check-in lists that are valid for the sub-event with the given ID (i.e. also lists valid for all subevents)
|
|
||||||
:query string exclude: Exclude a field from the output, e.g. ``checkin_count``. Can be used as a performance optimization. Can be passed multiple times.
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
:param event: The ``slug`` field of the event to fetch
|
:param event: The ``slug`` field of the event to fetch
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
@@ -149,13 +122,7 @@ Endpoints
|
|||||||
"all_products": true,
|
"all_products": true,
|
||||||
"limit_products": [],
|
"limit_products": [],
|
||||||
"include_pending": false,
|
"include_pending": false,
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"allow_multiple_entries": false,
|
|
||||||
"allow_entry_after_exit": true,
|
|
||||||
"rules": {},
|
|
||||||
"auto_checkin_sales_channels": [
|
|
||||||
"pretixpos"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
@@ -242,18 +209,13 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/checkinlists/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/checkinlists/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "VIP entry",
|
"name": "VIP entry",
|
||||||
"all_products": false,
|
"all_products": false,
|
||||||
"limit_products": [1, 2],
|
"limit_products": [1, 2],
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"allow_multiple_entries": false,
|
|
||||||
"allow_entry_after_exit": true,
|
|
||||||
"auto_checkin_sales_channels": [
|
|
||||||
"pretixpos"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
@@ -272,12 +234,7 @@ Endpoints
|
|||||||
"all_products": false,
|
"all_products": false,
|
||||||
"limit_products": [1, 2],
|
"limit_products": [1, 2],
|
||||||
"include_pending": false,
|
"include_pending": false,
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"allow_multiple_entries": false,
|
|
||||||
"allow_entry_after_exit": true,
|
|
||||||
"auto_checkin_sales_channels": [
|
|
||||||
"pretixpos"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer of the event/item to create a list for
|
:param organizer: The ``slug`` field of the organizer of the event/item to create a list for
|
||||||
@@ -326,12 +283,7 @@ Endpoints
|
|||||||
"all_products": false,
|
"all_products": false,
|
||||||
"limit_products": [1, 2],
|
"limit_products": [1, 2],
|
||||||
"include_pending": false,
|
"include_pending": false,
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"allow_multiple_entries": false,
|
|
||||||
"allow_entry_after_exit": true,
|
|
||||||
"auto_checkin_sales_channels": [
|
|
||||||
"pretixpos"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
:param organizer: The ``slug`` field of the organizer to modify
|
||||||
@@ -390,11 +342,6 @@ Order position endpoints
|
|||||||
``ignore_status`` filter. The ``attendee_name`` field is now "smart" (see below) and the redemption endpoint
|
``ignore_status`` filter. The ``attendee_name`` field is now "smart" (see below) and the redemption endpoint
|
||||||
returns ``400`` instead of ``404`` on tickets which are known but not paid.
|
returns ``400`` instead of ``404`` on tickets which are known but not paid.
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
|
||||||
|
|
||||||
The ``checkins`` dict now also contains a ``auto_checked_in`` value to indicate if the check-in has been performed
|
|
||||||
automatically by the system.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/checkinlists/(list)/positions/
|
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/checkinlists/(list)/positions/
|
||||||
|
|
||||||
Returns a list of all order positions within a given event. The result is the same as
|
Returns a list of all order positions within a given event. The result is the same as
|
||||||
@@ -449,12 +396,10 @@ Order position endpoints
|
|||||||
"addon_to": null,
|
"addon_to": null,
|
||||||
"subevent": null,
|
"subevent": null,
|
||||||
"pseudonymization_id": "MQLJvANO3B",
|
"pseudonymization_id": "MQLJvANO3B",
|
||||||
"seat": null,
|
|
||||||
"checkins": [
|
"checkins": [
|
||||||
{
|
{
|
||||||
"list": 1,
|
"list": 1,
|
||||||
"datetime": "2017-12-25T12:45:23Z",
|
"datetime": "2017-12-25T12:45:23Z"
|
||||||
"auto_checked_in": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
@@ -560,12 +505,10 @@ Order position endpoints
|
|||||||
"addon_to": null,
|
"addon_to": null,
|
||||||
"subevent": null,
|
"subevent": null,
|
||||||
"pseudonymization_id": "MQLJvANO3B",
|
"pseudonymization_id": "MQLJvANO3B",
|
||||||
"seat": null,
|
|
||||||
"checkins": [
|
"checkins": [
|
||||||
{
|
{
|
||||||
"list": 1,
|
"list": 1,
|
||||||
"datetime": "2017-12-25T12:45:23Z",
|
"datetime": "2017-12-25T12:45:23Z"
|
||||||
"auto_checked_in": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
@@ -603,12 +546,9 @@ Order position endpoints
|
|||||||
you do not implement question handling in your user interface, you **must**
|
you do not implement question handling in your user interface, you **must**
|
||||||
set this to ``false``. In that case, questions will just be ignored. Defaults
|
set this to ``false``. In that case, questions will just be ignored. Defaults
|
||||||
to ``true``.
|
to ``true``.
|
||||||
:<json boolean canceled_supported: When this parameter is set to ``true``, the response code ``canceled`` may be
|
|
||||||
returned. Otherwise, canceled orders will return ``unpaid``.
|
|
||||||
:<json datetime datetime: Specifies the datetime of the check-in. If not supplied, the current time will be used.
|
:<json datetime datetime: Specifies the datetime of the check-in. If not supplied, the current time will be used.
|
||||||
:<json boolean force: Specifies that the check-in should succeed regardless of previous check-ins or required
|
:<json boolean force: Specifies that the check-in should succeed regardless of previous check-ins or required
|
||||||
questions that have not been filled. Defaults to ``false``.
|
questions that have not been filled. Defaults to ``false``.
|
||||||
:<json string type: Send ``"exit"`` for an exit and ``"entry"`` (default) for an entry.
|
|
||||||
:<json boolean ignore_unpaid: Specifies that the check-in should succeed even if the order is in pending state.
|
:<json boolean ignore_unpaid: Specifies that the check-in should succeed even if the order is in pending state.
|
||||||
Defaults to ``false`` and only works when ``include_pending`` is set on the check-in
|
Defaults to ``false`` and only works when ``include_pending`` is set on the check-in
|
||||||
list.
|
list.
|
||||||
@@ -634,7 +574,6 @@ Order position endpoints
|
|||||||
"nonce": "Pvrk50vUzQd0DhdpNRL4I4OcXsvg70uA",
|
"nonce": "Pvrk50vUzQd0DhdpNRL4I4OcXsvg70uA",
|
||||||
"datetime": null,
|
"datetime": null,
|
||||||
"questions_supported": true,
|
"questions_supported": true,
|
||||||
"canceled_supported": true,
|
|
||||||
"answers": {
|
"answers": {
|
||||||
"4": "XS"
|
"4": "XS"
|
||||||
}
|
}
|
||||||
@@ -718,12 +657,9 @@ Order position endpoints
|
|||||||
|
|
||||||
Possible error reasons:
|
Possible error reasons:
|
||||||
|
|
||||||
* ``unpaid`` - Ticket is not paid for
|
* ``unpaid`` - Ticket is not paid for or has been refunded
|
||||||
* ``canceled`` – Ticket is canceled or expired. This reason is only sent when your request sets
|
|
||||||
``canceled_supported`` to ``true``, otherwise these orders return ``unpaid``.
|
|
||||||
* ``already_redeemed`` - Ticket already has been redeemed
|
* ``already_redeemed`` - Ticket already has been redeemed
|
||||||
* ``product`` - Tickets with this product may not be scanned at this device
|
* ``product`` - Tickets with this product may not be scanned at this device
|
||||||
* ``rules`` - Check-in prevented by a user-defined rule
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
:param event: The ``slug`` field of the event to fetch
|
:param event: The ``slug`` field of the event to fetch
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
.. spelling::
|
|
||||||
|
|
||||||
geo
|
|
||||||
lat
|
|
||||||
lon
|
|
||||||
|
|
||||||
Events
|
Events
|
||||||
======
|
======
|
||||||
|
|
||||||
@@ -31,19 +25,11 @@ is_public boolean If ``true``, th
|
|||||||
presale_start datetime The date at which the ticket shop opens (or ``null``)
|
presale_start datetime The date at which the ticket shop opens (or ``null``)
|
||||||
presale_end datetime The date at which the ticket shop closes (or ``null``)
|
presale_end datetime The date at which the ticket shop closes (or ``null``)
|
||||||
location multi-lingual string The event location (or ``null``)
|
location multi-lingual string The event location (or ``null``)
|
||||||
geo_lat float Latitude of the location (or ``null``)
|
|
||||||
geo_lon float Longitude of the location (or ``null``)
|
|
||||||
has_subevents boolean ``true`` if the event series feature is active for this
|
has_subevents boolean ``true`` if the event series feature is active for this
|
||||||
event. Cannot change after event is created.
|
event. Cannot change after event is created.
|
||||||
meta_data object Values set for organizer-specific meta data parameters.
|
meta_data dict Values set for organizer-specific meta data parameters.
|
||||||
plugins list A list of package names of the enabled plugins for this
|
plugins list A list of package names of the enabled plugins for this
|
||||||
event.
|
event.
|
||||||
seating_plan integer If reserved seating is in use, the ID of a seating
|
|
||||||
plan. Otherwise ``null``.
|
|
||||||
seat_category_mapping object An object mapping categories of the seating plan
|
|
||||||
(strings) to items in the event (integers or ``null``).
|
|
||||||
timezone string Event timezone name
|
|
||||||
item_meta_properties object Item-specific meta data parameters and default values.
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
|
|
||||||
@@ -64,33 +50,9 @@ item_meta_properties object Item-specific m
|
|||||||
|
|
||||||
The ``testmode`` attribute has been added.
|
The ``testmode`` attribute has been added.
|
||||||
|
|
||||||
.. versionchanged:: 2.8
|
|
||||||
|
|
||||||
When cloning events, the ``testmode`` attribute will now be cloned, too.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The attributes ``seating_plan`` and ``seat_category_mapping`` have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
|
||||||
|
|
||||||
The attributes ``geo_lat`` and ``geo_lon`` have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.4
|
|
||||||
|
|
||||||
The attribute ``timezone`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.7
|
|
||||||
|
|
||||||
The attribute ``item_meta_properties`` has been added.
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
|
||||||
|
|
||||||
The events resource can now be filtered by meta data attributes.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/
|
.. http:get:: /api/v1/organizers/(organizer)/events/
|
||||||
|
|
||||||
Returns a list of all events within a given organizer the authenticated user/token has access to.
|
Returns a list of all events within a given organizer the authenticated user/token has access to.
|
||||||
@@ -131,14 +93,8 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.banktransfer"
|
"pretix.plugins.banktransfer"
|
||||||
"pretix.plugins.stripe"
|
"pretix.plugins.stripe"
|
||||||
@@ -156,13 +112,6 @@ Endpoints
|
|||||||
:query is_future: If set to ``true`` (``false``), only events that happen currently or in the future are (not) returned. Event series are never (always) returned.
|
:query is_future: If set to ``true`` (``false``), only events that happen currently or in the future are (not) returned. Event series are never (always) returned.
|
||||||
:query is_past: If set to ``true`` (``false``), only events that are over are (not) returned. Event series are never (always) returned.
|
:query is_past: If set to ``true`` (``false``), only events that are over are (not) returned. Event series are never (always) returned.
|
||||||
:query ends_after: If set to a date and time, only events that happen during of after the given time are returned. Event series are never returned.
|
:query ends_after: If set to a date and time, only events that happen during of after the given time are returned. Event series are never returned.
|
||||||
:query string ordering: Manually set the ordering of results. Valid fields to be used are ``date_from`` and
|
|
||||||
``slug``. Keep in mind that ``date_from`` of event series does not really tell you anything.
|
|
||||||
Default: ``slug``.
|
|
||||||
:query array attr[meta_data_key]: By providing the key and value of a meta data attribute, the list of events will
|
|
||||||
only contain the events matching the set criteria. Providing ``?attr[Format]=Seminar`` would return only those
|
|
||||||
events having set their ``Format`` meta data to ``Seminar``, ``?attr[Format]=`` only those, that have no value
|
|
||||||
set. Please note that this filter will respect default values set on organizer level.
|
|
||||||
:param organizer: The ``slug`` field of a valid organizer
|
:param organizer: The ``slug`` field of a valid organizer
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
:statuscode 401: Authentication failure
|
:statuscode 401: Authentication failure
|
||||||
@@ -203,14 +152,8 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.banktransfer"
|
"pretix.plugins.banktransfer"
|
||||||
"pretix.plugins.stripe"
|
"pretix.plugins.stripe"
|
||||||
@@ -241,7 +184,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": {"en": "Sample Conference"},
|
"name": {"en": "Sample Conference"},
|
||||||
@@ -255,15 +198,9 @@ Endpoints
|
|||||||
"is_public": false,
|
"is_public": false,
|
||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.stripe",
|
"pretix.plugins.stripe",
|
||||||
"pretix.plugins.paypal"
|
"pretix.plugins.paypal"
|
||||||
@@ -291,14 +228,8 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.stripe",
|
"pretix.plugins.stripe",
|
||||||
"pretix.plugins.paypal"
|
"pretix.plugins.paypal"
|
||||||
@@ -314,11 +245,11 @@ Endpoints
|
|||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/clone/
|
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/clone/
|
||||||
|
|
||||||
Creates a new event with properties as set in the request body. The properties that are copied are: ``is_public``,
|
Creates a new event with properties as set in the request body. The properties that are copied are: 'is_public',
|
||||||
``testmode``, ``has_subevents``, settings, plugin settings, items, variations, add-ons, quotas, categories, tax rules, questions.
|
settings, plugin settings, items, variations, add-ons, quotas, categories, tax rules, questions.
|
||||||
|
|
||||||
If the ``plugins``, ``has_subevents`` and/or ``is_public`` fields are present in the post body this will determine their
|
If the 'plugins' and/or 'is_public' fields are present in the post body this will determine their value. Otherwise
|
||||||
value. Otherwise their value will be copied from the existing event.
|
their value will be copied from the existing event.
|
||||||
|
|
||||||
Please note that you can only copy from events under the same organizer.
|
Please note that you can only copy from events under the same organizer.
|
||||||
|
|
||||||
@@ -331,7 +262,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/clone/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/clone/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": {"en": "Sample Conference"},
|
"name": {"en": "Sample Conference"},
|
||||||
@@ -346,14 +277,8 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.stripe",
|
"pretix.plugins.stripe",
|
||||||
"pretix.plugins.paypal"
|
"pretix.plugins.paypal"
|
||||||
@@ -381,14 +306,8 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.stripe",
|
"pretix.plugins.stripe",
|
||||||
"pretix.plugins.paypal"
|
"pretix.plugins.paypal"
|
||||||
@@ -416,7 +335,7 @@ Endpoints
|
|||||||
PATCH /api/v1/organizers/bigevents/events/sampleconf/ HTTP/1.1
|
PATCH /api/v1/organizers/bigevents/events/sampleconf/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"plugins": [
|
"plugins": [
|
||||||
@@ -448,14 +367,8 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"has_subevents": false,
|
"has_subevents": false,
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"meta_data": {},
|
"meta_data": {},
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"item_meta_properties": {},
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"pretix.plugins.banktransfer",
|
"pretix.plugins.banktransfer",
|
||||||
"pretix.plugins.stripe",
|
"pretix.plugins.stripe",
|
||||||
@@ -498,123 +411,3 @@ Endpoints
|
|||||||
:statuscode 204: no error
|
:statuscode 204: no error
|
||||||
:statuscode 401: Authentication failure
|
:statuscode 401: Authentication failure
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to delete this resource.
|
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to delete this resource.
|
||||||
|
|
||||||
Event settings
|
|
||||||
--------------
|
|
||||||
|
|
||||||
pretix events have lots and lots of parameters of different types that are stored in a key-value store on our system.
|
|
||||||
Since many of these settings depend on each other in complex ways, we can not give direct access to all of these
|
|
||||||
settings through the API. However, we do expose many of the simple and useful flags through the API.
|
|
||||||
|
|
||||||
Please note that the available settings flags change between pretix versions and also between events, depending on the
|
|
||||||
installed plugins, and we do not give a guarantee on backwards-compatibility like with other parts of the API.
|
|
||||||
Therefore, we're also not including a list of the options here, but instead recommend to look at the endpoint output
|
|
||||||
to see available options. The ``explain=true`` flag enables a verbose mode that provides you with human-readable
|
|
||||||
information about the properties.
|
|
||||||
|
|
||||||
.. note:: Please note that this is not a complete representation of all event settings. You will find more settings
|
|
||||||
in the web interface.
|
|
||||||
|
|
||||||
.. warning:: This API is intended for advanced users. Even though we take care to validate your input, you will be
|
|
||||||
able to break your event using this API by creating situations of conflicting settings. Please take care.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.6
|
|
||||||
|
|
||||||
Initial support for settings has been added to the API.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/settings/
|
|
||||||
|
|
||||||
Get current values of event settings.
|
|
||||||
|
|
||||||
Permission required: "Can change event settings" (Exception: with device auth, *some* settings can always be *read*.)
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/events/sampleconf/settings/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example standard response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"imprint_url": "https://pretix.eu",
|
|
||||||
…
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example verbose response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"imprint_url":
|
|
||||||
{
|
|
||||||
"value": "https://pretix.eu",
|
|
||||||
"label": "Imprint URL",
|
|
||||||
"help_text": "This should point e.g. to a part of your website that has your contact details and legal information."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
…
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer of the event to access
|
|
||||||
:param event: The ``slug`` field of the event to access
|
|
||||||
:query explain: Set to ``true`` to enable verbose response mode
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:patch:: /api/v1/organizers/(organizer)/events/(event)/settings/
|
|
||||||
|
|
||||||
Updates event settings. Note that ``PUT`` is not allowed here, only ``PATCH``.
|
|
||||||
|
|
||||||
.. warning::
|
|
||||||
|
|
||||||
Settings can be stored at different levels in pretix. If a value is not set on event level, a default setting
|
|
||||||
from a higher level (organizer, global) will be returned. If you explicitly set a setting on event level, it
|
|
||||||
will no longer be inherited from the higher levels. Therefore, we recommend you to send only settings that you
|
|
||||||
explicitly want to set on event level. To unset a settings, pass ``null``.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/events/sampleconf/settings/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"imprint_url": "https://example.org/imprint/"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"imprint_url": "https://example.org/imprint/",
|
|
||||||
…
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer of the event to update
|
|
||||||
:param event: The ``slug`` field of the event to update
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The event could not be updated due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to create this resource.
|
|
||||||
|
|||||||
@@ -1,251 +0,0 @@
|
|||||||
.. _`rest-giftcards`:
|
|
||||||
|
|
||||||
Gift cards
|
|
||||||
==========
|
|
||||||
|
|
||||||
Resource description
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The gift card resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal ID of the gift card
|
|
||||||
secret string Gift card code (can not be modified later)
|
|
||||||
value money (string) Current gift card value
|
|
||||||
currency string Currency of the value (can not be modified later)
|
|
||||||
testmode boolean Whether this is a test gift card
|
|
||||||
expires datetime Expiry date (or ``null``)
|
|
||||||
conditions string Special terms and conditions for this card (or ``null``)
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
Endpoints
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/giftcards/
|
|
||||||
|
|
||||||
Returns a list of all gift cards issued by a given organizer.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/giftcards/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"secret": "HLBYVELFRC77NCQY",
|
|
||||||
"currency": "EUR",
|
|
||||||
"testmode": false,
|
|
||||||
"expires": null,
|
|
||||||
"conditions": null,
|
|
||||||
"value": "13.37"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:query string secret: Only show gift cards with the given secret.
|
|
||||||
:query boolean testmode: Filter for gift cards that are (not) in test mode.
|
|
||||||
:query boolean include_accepted: Also show gift cards issued by other organizers that are accepted by this organizer.
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/giftcards/(id)/
|
|
||||||
|
|
||||||
Returns information on one gift card, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/giftcards/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"secret": "HLBYVELFRC77NCQY",
|
|
||||||
"currency": "EUR",
|
|
||||||
"testmode": false,
|
|
||||||
"expires": null,
|
|
||||||
"conditions": null,
|
|
||||||
"value": "13.37"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param id: The ``id`` field of the gift card to fetch
|
|
||||||
:query boolean include_accepted: Also show gift cards issued by other organizers that are accepted by this organizer.
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/giftcards/
|
|
||||||
|
|
||||||
Creates a new gift card
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/giftcards/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"secret": "HLBYVELFRC77NCQY",
|
|
||||||
"currency": "EUR",
|
|
||||||
"value": "13.37"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"secret": "HLBYVELFRC77NCQY",
|
|
||||||
"testmode": false,
|
|
||||||
"currency": "EUR",
|
|
||||||
"expires": null,
|
|
||||||
"conditions": null,
|
|
||||||
"value": "13.37"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to create a gift card for
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 400: The gift card could not be created due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
|
|
||||||
.. http:patch:: /api/v1/organizers/(organizer)/giftcards/(id)/
|
|
||||||
|
|
||||||
Update a gift card. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of
|
|
||||||
the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you
|
|
||||||
want to change.
|
|
||||||
|
|
||||||
You can change all fields of the resource except the ``id``, ``secret``, ``testmode``, and ``currency`` fields. Be
|
|
||||||
careful when modifying the ``value`` field to avoid race conditions. We recommend to use the ``transact`` method
|
|
||||||
described below.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/giftcards/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 94
|
|
||||||
|
|
||||||
{
|
|
||||||
"value": "14.00"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"secret": "HLBYVELFRC77NCQY",
|
|
||||||
"testmode": false,
|
|
||||||
"currency": "EUR",
|
|
||||||
"expires": null,
|
|
||||||
"conditions": null,
|
|
||||||
"value": "14.00"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param id: The ``id`` field of the gift card to modify
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The gift card could not be modified due to invalid submitted data
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to change this resource.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/giftcards/(id)/transact/
|
|
||||||
|
|
||||||
Atomically change the value of a gift card. A positive amount will increase the value of the gift card,
|
|
||||||
a negative amount will decrease it.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/giftcards/1/transact/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 94
|
|
||||||
|
|
||||||
{
|
|
||||||
"value": "2.00"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"secret": "HLBYVELFRC77NCQY",
|
|
||||||
"currency": "EUR",
|
|
||||||
"testmode": false,
|
|
||||||
"expires": null,
|
|
||||||
"conditions": null,
|
|
||||||
"value": "15.37"
|
|
||||||
}
|
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
This endpoint now returns status code ``409`` if the transaction would lead to a negative gift card value.
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param id: The ``id`` field of the gift card to modify
|
|
||||||
:query boolean include_accepted: Also show gift cards issued by other organizers that are accepted by this organizer.
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The gift card could not be modified due to invalid submitted data
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to change this resource.
|
|
||||||
:statuscode 409: There is not sufficient credit on the gift card.
|
|
||||||
@@ -21,10 +21,5 @@ Resources and endpoints
|
|||||||
vouchers
|
vouchers
|
||||||
checkinlists
|
checkinlists
|
||||||
waitinglist
|
waitinglist
|
||||||
giftcards
|
|
||||||
carts
|
carts
|
||||||
teams
|
|
||||||
webhooks
|
webhooks
|
||||||
seatingplans
|
|
||||||
billing_invoices
|
|
||||||
billing_var
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ payment_provider_text string Text to be prin
|
|||||||
payment information
|
payment information
|
||||||
footer_text string Text to be printed in the page footer area
|
footer_text string Text to be printed in the page footer area
|
||||||
lines list of objects The actual invoice contents
|
lines list of objects The actual invoice contents
|
||||||
├ position integer Number of the line within an invoice.
|
|
||||||
├ description string Text representing the invoice line (e.g. product name)
|
├ description string Text representing the invoice line (e.g. product name)
|
||||||
├ gross_value money (string) Price including taxes
|
├ gross_value money (string) Price including taxes
|
||||||
├ tax_value money (string) Tax amount included
|
├ tax_value money (string) Tax amount included
|
||||||
@@ -64,11 +63,6 @@ internal_reference string Customer's refe
|
|||||||
The attribute ``internal_reference`` has been added.
|
The attribute ``internal_reference`` has been added.
|
||||||
|
|
||||||
|
|
||||||
.. versionchanged:: 3.4
|
|
||||||
|
|
||||||
The attribute ``lines.number`` has been added.
|
|
||||||
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -113,7 +107,6 @@ Endpoints
|
|||||||
"footer_text": "Big Events LLC - Registration No. 123456 - VAT ID: EU0987654321",
|
"footer_text": "Big Events LLC - Registration No. 123456 - VAT ID: EU0987654321",
|
||||||
"lines": [
|
"lines": [
|
||||||
{
|
{
|
||||||
"position": 1,
|
|
||||||
"description": "Budget Ticket",
|
"description": "Budget Ticket",
|
||||||
"gross_value": "23.00",
|
"gross_value": "23.00",
|
||||||
"tax_value": "0.00",
|
"tax_value": "0.00",
|
||||||
@@ -178,7 +171,6 @@ Endpoints
|
|||||||
"footer_text": "Big Events LLC - Registration No. 123456 - VAT ID: EU0987654321",
|
"footer_text": "Big Events LLC - Registration No. 123456 - VAT ID: EU0987654321",
|
||||||
"lines": [
|
"lines": [
|
||||||
{
|
{
|
||||||
"position": 1,
|
|
||||||
"description": "Budget Ticket",
|
"description": "Budget Ticket",
|
||||||
"gross_value": "23.00",
|
"gross_value": "23.00",
|
||||||
"tax_value": "0.00",
|
"tax_value": "0.00",
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ addon_category integer Internal ID of
|
|||||||
min_count integer The minimal number of add-ons that need to be chosen.
|
min_count integer The minimal number of add-ons that need to be chosen.
|
||||||
max_count integer The maximal number of add-ons that can be chosen.
|
max_count integer The maximal number of add-ons that can be chosen.
|
||||||
position integer An integer, used for sorting
|
position integer An integer, used for sorting
|
||||||
multi_allowed boolean Adding the same item multiple times is allowed
|
|
||||||
price_included boolean Adding this add-on to the item is free
|
price_included boolean Adding this add-on to the item is free
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
@@ -66,7 +65,6 @@ Endpoints
|
|||||||
"min_count": 0,
|
"min_count": 0,
|
||||||
"max_count": 10,
|
"max_count": 10,
|
||||||
"position": 0,
|
"position": 0,
|
||||||
"multi_allowed": false,
|
|
||||||
"price_included": true
|
"price_included": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -75,7 +73,6 @@ Endpoints
|
|||||||
"min_count": 0,
|
"min_count": 0,
|
||||||
"max_count": 10,
|
"max_count": 10,
|
||||||
"position": 1,
|
"position": 1,
|
||||||
"multi_allowed": false,
|
|
||||||
"price_included": true
|
"price_included": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -115,7 +112,6 @@ Endpoints
|
|||||||
"min_count": 0,
|
"min_count": 0,
|
||||||
"max_count": 10,
|
"max_count": 10,
|
||||||
"position": 1,
|
"position": 1,
|
||||||
"multi_allowed": false,
|
|
||||||
"price_included": true
|
"price_included": true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,14 +134,13 @@ Endpoints
|
|||||||
POST /api/v1/organizers/(organizer)/events/(event)/items/(item)/addons/ HTTP/1.1
|
POST /api/v1/organizers/(organizer)/events/(event)/items/(item)/addons/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"addon_category": 1,
|
"addon_category": 1,
|
||||||
"min_count": 0,
|
"min_count": 0,
|
||||||
"max_count": 10,
|
"max_count": 10,
|
||||||
"position": 1,
|
"position": 1,
|
||||||
"multi_allowed": false,
|
|
||||||
"price_included": true
|
"price_included": true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +158,6 @@ Endpoints
|
|||||||
"min_count": 0,
|
"min_count": 0,
|
||||||
"max_count": 10,
|
"max_count": 10,
|
||||||
"position": 1,
|
"position": 1,
|
||||||
"multi_allowed": false,
|
|
||||||
"price_included": true
|
"price_included": true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +206,6 @@ Endpoints
|
|||||||
"min_count": 0,
|
"min_count": 0,
|
||||||
"max_count": 10,
|
"max_count": 10,
|
||||||
"position": 1,
|
"position": 1,
|
||||||
"multi_allowed": false,
|
|
||||||
"price_included": true
|
"price_included": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/(organizer)/events/(event)/items/(item)/bundles/ HTTP/1.1
|
POST /api/v1/organizers/(organizer)/events/(event)/items/(item)/bundles/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"bundled_item": 3,
|
"bundled_item": 3,
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/items/1/variations/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/items/1/variations/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"value": {"en": "Student"},
|
"value": {"en": "Student"},
|
||||||
|
|||||||
@@ -44,9 +44,6 @@ available_from datetime The first date
|
|||||||
(or ``null``).
|
(or ``null``).
|
||||||
available_until datetime The last date time at which this item can be bought
|
available_until datetime The last date time at which this item can be bought
|
||||||
(or ``null``).
|
(or ``null``).
|
||||||
hidden_if_available integer The internal ID of a quota object, or ``null``. If
|
|
||||||
set, this item won't be shown publicly as long as this
|
|
||||||
quota is available.
|
|
||||||
require_voucher boolean If ``true``, this item can only be bought using a
|
require_voucher boolean If ``true``, this item can only be bought using a
|
||||||
voucher that is specifically assigned to this item.
|
voucher that is specifically assigned to this item.
|
||||||
hide_without_voucher boolean If ``true``, this item is only shown during the voucher
|
hide_without_voucher boolean If ``true``, this item is only shown during the voucher
|
||||||
@@ -75,11 +72,6 @@ generate_tickets boolean If ``false``, t
|
|||||||
non-admission or add-on product, regardless of event
|
non-admission or add-on product, regardless of event
|
||||||
settings. If this is ``null``, regular ticketing
|
settings. If this is ``null``, regular ticketing
|
||||||
rules apply.
|
rules apply.
|
||||||
allow_waitinglist boolean If ``false``, no waiting list will be shown for this
|
|
||||||
product when it is sold out.
|
|
||||||
issue_giftcard boolean If ``true``, buying this product will yield a gift card.
|
|
||||||
show_quota_left boolean Publicly show how many tickets are still available.
|
|
||||||
If this is ``null``, the event default is used.
|
|
||||||
has_variations boolean Shows whether or not this item has variations.
|
has_variations boolean Shows whether or not this item has variations.
|
||||||
variations list of objects A list with one object for each variation of this item.
|
variations list of objects A list with one object for each variation of this item.
|
||||||
Can be empty. Only writable during creation,
|
Can be empty. Only writable during creation,
|
||||||
@@ -104,7 +96,6 @@ addons list of objects Definition of a
|
|||||||
├ min_count integer The minimal number of add-ons that need to be chosen.
|
├ min_count integer The minimal number of add-ons that need to be chosen.
|
||||||
├ max_count integer The maximal number of add-ons that can be chosen.
|
├ max_count integer The maximal number of add-ons that can be chosen.
|
||||||
├ position integer An integer, used for sorting
|
├ position integer An integer, used for sorting
|
||||||
├ multi_allowed boolean Adding the same item multiple times is allowed
|
|
||||||
└ price_included boolean Adding this add-on to the item is free
|
└ price_included boolean Adding this add-on to the item is free
|
||||||
bundles list of objects Definition of bundles that are included in this item.
|
bundles list of objects Definition of bundles that are included in this item.
|
||||||
Only writable during creation,
|
Only writable during creation,
|
||||||
@@ -115,7 +106,6 @@ bundles list of objects Definition of b
|
|||||||
└ designated_price money (string) Designated price of the bundled product. This will be
|
└ designated_price money (string) Designated price of the bundled product. This will be
|
||||||
used to split the price of the base item e.g. for mixed
|
used to split the price of the base item e.g. for mixed
|
||||||
taxation. This is not added to the price.
|
taxation. This is not added to the price.
|
||||||
meta_data object Values set for event-specific meta data parameters.
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 2.7
|
.. versionchanged:: 2.7
|
||||||
@@ -152,18 +142,6 @@ meta_data object Values set for
|
|||||||
|
|
||||||
The ``bundles`` and ``require_bundling`` attributes have been added.
|
The ``bundles`` and ``require_bundling`` attributes have been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The ``show_quota_left``, ``allow_waitinglist``, and ``hidden_if_available`` attributes have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.7
|
|
||||||
|
|
||||||
The attribute ``meta_data`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
|
||||||
|
|
||||||
The attribute ``multi_allowed`` has been added to ``addons``.
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@@ -217,13 +195,10 @@ Endpoints
|
|||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_rule": 1,
|
"tax_rule": 1,
|
||||||
"admission": false,
|
"admission": false,
|
||||||
"issue_giftcard": false,
|
|
||||||
"meta_data": {},
|
|
||||||
"position": 0,
|
"position": 0,
|
||||||
"picture": null,
|
"picture": null,
|
||||||
"available_from": null,
|
"available_from": null,
|
||||||
"available_until": null,
|
"available_until": null,
|
||||||
"hidden_if_available": null,
|
|
||||||
"require_voucher": false,
|
"require_voucher": false,
|
||||||
"hide_without_voucher": false,
|
"hide_without_voucher": false,
|
||||||
"allow_cancel": true,
|
"allow_cancel": true,
|
||||||
@@ -232,8 +207,6 @@ Endpoints
|
|||||||
"checkin_attention": false,
|
"checkin_attention": false,
|
||||||
"has_variations": false,
|
"has_variations": false,
|
||||||
"generate_tickets": null,
|
"generate_tickets": null,
|
||||||
"allow_waitinglist": true,
|
|
||||||
"show_quota_left": null,
|
|
||||||
"require_approval": false,
|
"require_approval": false,
|
||||||
"require_bundling": false,
|
"require_bundling": false,
|
||||||
"variations": [
|
"variations": [
|
||||||
@@ -313,19 +286,14 @@ Endpoints
|
|||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_rule": 1,
|
"tax_rule": 1,
|
||||||
"admission": false,
|
"admission": false,
|
||||||
"issue_giftcard": false,
|
|
||||||
"meta_data": {},
|
|
||||||
"position": 0,
|
"position": 0,
|
||||||
"picture": null,
|
"picture": null,
|
||||||
"available_from": null,
|
"available_from": null,
|
||||||
"available_until": null,
|
"available_until": null,
|
||||||
"hidden_if_available": null,
|
|
||||||
"require_voucher": false,
|
"require_voucher": false,
|
||||||
"hide_without_voucher": false,
|
"hide_without_voucher": false,
|
||||||
"allow_cancel": true,
|
"allow_cancel": true,
|
||||||
"generate_tickets": null,
|
"generate_tickets": null,
|
||||||
"allow_waitinglist": true,
|
|
||||||
"show_quota_left": null,
|
|
||||||
"min_per_order": null,
|
"min_per_order": null,
|
||||||
"max_per_order": null,
|
"max_per_order": null,
|
||||||
"checkin_attention": false,
|
"checkin_attention": false,
|
||||||
@@ -374,7 +342,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/items/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/items/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
@@ -390,19 +358,14 @@ Endpoints
|
|||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_rule": 1,
|
"tax_rule": 1,
|
||||||
"admission": false,
|
"admission": false,
|
||||||
"issue_giftcard": false,
|
|
||||||
"meta_data": {},
|
|
||||||
"position": 0,
|
"position": 0,
|
||||||
"picture": null,
|
"picture": null,
|
||||||
"available_from": null,
|
"available_from": null,
|
||||||
"available_until": null,
|
"available_until": null,
|
||||||
"hidden_if_available": null,
|
|
||||||
"require_voucher": false,
|
"require_voucher": false,
|
||||||
"hide_without_voucher": false,
|
"hide_without_voucher": false,
|
||||||
"allow_cancel": true,
|
"allow_cancel": true,
|
||||||
"generate_tickets": null,
|
"generate_tickets": null,
|
||||||
"allow_waitinglist": true,
|
|
||||||
"show_quota_left": null,
|
|
||||||
"min_per_order": null,
|
"min_per_order": null,
|
||||||
"max_per_order": null,
|
"max_per_order": null,
|
||||||
"checkin_attention": false,
|
"checkin_attention": false,
|
||||||
@@ -454,21 +417,16 @@ Endpoints
|
|||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_rule": 1,
|
"tax_rule": 1,
|
||||||
"admission": false,
|
"admission": false,
|
||||||
"issue_giftcard": false,
|
|
||||||
"meta_data": {},
|
|
||||||
"position": 0,
|
"position": 0,
|
||||||
"picture": null,
|
"picture": null,
|
||||||
"available_from": null,
|
"available_from": null,
|
||||||
"available_until": null,
|
"available_until": null,
|
||||||
"hidden_if_available": null,
|
|
||||||
"require_voucher": false,
|
"require_voucher": false,
|
||||||
"hide_without_voucher": false,
|
"hide_without_voucher": false,
|
||||||
"allow_cancel": true,
|
"allow_cancel": true,
|
||||||
"min_per_order": null,
|
"min_per_order": null,
|
||||||
"max_per_order": null,
|
"max_per_order": null,
|
||||||
"generate_tickets": null,
|
"generate_tickets": null,
|
||||||
"allow_waitinglist": true,
|
|
||||||
"show_quota_left": null,
|
|
||||||
"checkin_attention": false,
|
"checkin_attention": false,
|
||||||
"has_variations": true,
|
"has_variations": true,
|
||||||
"require_approval": false,
|
"require_approval": false,
|
||||||
@@ -550,18 +508,13 @@ Endpoints
|
|||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_rule": 1,
|
"tax_rule": 1,
|
||||||
"admission": false,
|
"admission": false,
|
||||||
"issue_giftcard": false,
|
|
||||||
"meta_data": {},
|
|
||||||
"position": 0,
|
"position": 0,
|
||||||
"picture": null,
|
"picture": null,
|
||||||
"available_from": null,
|
"available_from": null,
|
||||||
"available_until": null,
|
"available_until": null,
|
||||||
"hidden_if_available": null,
|
|
||||||
"require_voucher": false,
|
"require_voucher": false,
|
||||||
"hide_without_voucher": false,
|
"hide_without_voucher": false,
|
||||||
"generate_tickets": null,
|
"generate_tickets": null,
|
||||||
"allow_waitinglist": true,
|
|
||||||
"show_quota_left": null,
|
|
||||||
"allow_cancel": true,
|
"allow_cancel": true,
|
||||||
"min_per_order": null,
|
"min_per_order": null,
|
||||||
"max_per_order": null,
|
"max_per_order": null,
|
||||||
|
|||||||
@@ -53,18 +53,15 @@ invoice_address object Invoice address
|
|||||||
├ street string Customer street
|
├ street string Customer street
|
||||||
├ zipcode string Customer ZIP code
|
├ zipcode string Customer ZIP code
|
||||||
├ city string Customer city
|
├ city string Customer city
|
||||||
├ country string Customer country code
|
├ country string Customer country
|
||||||
├ state string Customer state (ISO 3166-2 code). Only supported in
|
|
||||||
AU, BR, CA, CN, MY, MX, and US.
|
|
||||||
├ internal_reference string Customer's internal reference to be printed on the invoice
|
├ internal_reference string Customer's internal reference to be printed on the invoice
|
||||||
├ vat_id string Customer VAT ID
|
├ vat_id string Customer VAT ID
|
||||||
└ vat_id_validated string ``true``, if the VAT ID has been validated against the
|
└ vat_id_validated string ``true``, if the VAT ID has been validated against the
|
||||||
EU VAT service and validation was successful. This only
|
EU VAT service and validation was successful. This only
|
||||||
happens in rare cases.
|
happens in rare cases.
|
||||||
positions list of objects List of order positions (see below). By default, only
|
positions list of objects List of non-canceled order positions (see below)
|
||||||
non-canceled positions are included.
|
fees list of objects List of non-canceled fees included in the order total
|
||||||
fees list of objects List of fees included in the order total. By default, only
|
(i.e. payment fees)
|
||||||
non-canceled fees are included.
|
|
||||||
├ fee_type string Type of fee (currently ``payment``, ``passbook``,
|
├ fee_type string Type of fee (currently ``payment``, ``passbook``,
|
||||||
``other``)
|
``other``)
|
||||||
├ value money (string) Fee amount
|
├ value money (string) Fee amount
|
||||||
@@ -73,8 +70,7 @@ fees list of objects List of fees in
|
|||||||
can be empty
|
can be empty
|
||||||
├ tax_rate decimal (string) VAT rate applied for this fee
|
├ tax_rate decimal (string) VAT rate applied for this fee
|
||||||
├ tax_value money (string) VAT included in this fee
|
├ tax_value money (string) VAT included in this fee
|
||||||
├ tax_rule integer The ID of the used tax rule (or ``null``)
|
└ tax_rule integer The ID of the used tax rule (or ``null``)
|
||||||
└ canceled boolean Whether or not this fee has been canceled.
|
|
||||||
downloads list of objects List of ticket download options for order-wise ticket
|
downloads list of objects List of ticket download options for order-wise ticket
|
||||||
downloading. This might be a multi-page PDF or a ZIP
|
downloading. This might be a multi-page PDF or a ZIP
|
||||||
file of tickets for outputs that do not support
|
file of tickets for outputs that do not support
|
||||||
@@ -86,7 +82,6 @@ require_approval boolean If ``true`` and
|
|||||||
needs approval by an organizer before it can
|
needs approval by an organizer before it can
|
||||||
continue. If ``true`` and the order is canceled,
|
continue. If ``true`` and the order is canceled,
|
||||||
this order has been denied by the event organizer.
|
this order has been denied by the event organizer.
|
||||||
url string The full URL to the order confirmation page
|
|
||||||
payments list of objects List of payment processes (see below)
|
payments list of objects List of payment processes (see below)
|
||||||
refunds list of objects List of refund processes (see below)
|
refunds list of objects List of refund processes (see below)
|
||||||
last_modified datetime Last modification of this object
|
last_modified datetime Last modification of this object
|
||||||
@@ -133,37 +128,15 @@ last_modified datetime Last modificati
|
|||||||
|
|
||||||
The ``sales_channel`` attribute has been added.
|
The ``sales_channel`` attribute has been added.
|
||||||
|
|
||||||
.. versionchanged:: 2.4
|
.. versionchanged:: 2.4:
|
||||||
|
|
||||||
``order.status`` can no longer be ``r``, ``…/mark_canceled/`` now accepts a ``cancellation_fee`` parameter and
|
``order.status`` can no longer be ``r``, ``…/mark_canceled/`` now accepts a ``cancellation_fee`` parameter and
|
||||||
``…/mark_refunded/`` has been deprecated.
|
``…/mark_refunded/`` has been deprecated.
|
||||||
|
|
||||||
.. versionchanged:: 2.5
|
.. versionchanged:: 2.5:
|
||||||
|
|
||||||
The ``testmode`` attribute has been added and ``DELETE`` has been implemented for orders.
|
The ``testmode`` attribute has been added and ``DELETE`` has been implemented for orders.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``invoice_address.state`` and ``url`` attributes have been added. When creating orders through the API,
|
|
||||||
vouchers are now supported and many fields are now optional.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
The ``order.fees.canceled`` attribute has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.8
|
|
||||||
|
|
||||||
The ``reactivate`` operation has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
|
||||||
|
|
||||||
The ``search`` query parameter has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.11
|
|
||||||
|
|
||||||
The ``exclude`` and ``subevent_after`` query parameter has been added.
|
|
||||||
|
|
||||||
|
|
||||||
.. _order-position-resource:
|
.. _order-position-resource:
|
||||||
|
|
||||||
Order position resource
|
Order position resource
|
||||||
@@ -177,21 +150,12 @@ Field Type Description
|
|||||||
id integer Internal ID of the order position
|
id integer Internal ID of the order position
|
||||||
order string Order code of the order the position belongs to
|
order string Order code of the order the position belongs to
|
||||||
positionid integer Number of the position within the order
|
positionid integer Number of the position within the order
|
||||||
canceled boolean Whether or not this position has been canceled. Note that
|
|
||||||
by default, only non-canceled positions are shown.
|
|
||||||
item integer ID of the purchased item
|
item integer ID of the purchased item
|
||||||
variation integer ID of the purchased variation (or ``null``)
|
variation integer ID of the purchased variation (or ``null``)
|
||||||
price money (string) Price of this position
|
price money (string) Price of this position
|
||||||
attendee_name string Specified attendee name for this position (or ``null``)
|
attendee_name string Specified attendee name for this position (or ``null``)
|
||||||
attendee_name_parts object of strings Decomposition of attendee name (i.e. given name, family name)
|
attendee_name_parts object of strings Decomposition of attendee name (i.e. given name, family name)
|
||||||
attendee_email string Specified attendee email address for this position (or ``null``)
|
attendee_email string Specified attendee email address for this position (or ``null``)
|
||||||
company string Attendee company name (or ``null``)
|
|
||||||
street string Attendee street (or ``null``)
|
|
||||||
zipcode string Attendee ZIP code (or ``null``)
|
|
||||||
city string Attendee city (or ``null``)
|
|
||||||
country string Attendee country code (or ``null``)
|
|
||||||
state string Attendee state (ISO 3166-2 code). Only supported in
|
|
||||||
AU, BR, CA, CN, MY, MX, and US, otherwise ``null``.
|
|
||||||
voucher integer Internal ID of the voucher used for this position (or ``null``)
|
voucher integer Internal ID of the voucher used for this position (or ``null``)
|
||||||
tax_rate decimal (string) VAT rate applied for this position
|
tax_rate decimal (string) VAT rate applied for this position
|
||||||
tax_value money (string) VAT included in this position
|
tax_value money (string) VAT included in this position
|
||||||
@@ -202,9 +166,7 @@ subevent integer ID of the date
|
|||||||
pseudonymization_id string A random ID, e.g. for use in lead scanning apps
|
pseudonymization_id string A random ID, e.g. for use in lead scanning apps
|
||||||
checkins list of objects List of check-ins with this ticket
|
checkins list of objects List of check-ins with this ticket
|
||||||
├ list integer Internal ID of the check-in list
|
├ list integer Internal ID of the check-in list
|
||||||
├ datetime datetime Time of check-in
|
└ datetime datetime Time of check-in
|
||||||
├ type string Type of scan (defaults to ``entry``)
|
|
||||||
└ auto_checked_in boolean Indicates if this check-in been performed automatically by the system
|
|
||||||
downloads list of objects List of ticket download options
|
downloads list of objects List of ticket download options
|
||||||
├ output string Ticket output provider (e.g. ``pdf``, ``passbook``)
|
├ output string Ticket output provider (e.g. ``pdf``, ``passbook``)
|
||||||
└ url string Download URL
|
└ url string Download URL
|
||||||
@@ -214,10 +176,6 @@ answers list of objects Answers to user
|
|||||||
├ question_identifier string The question's ``identifier`` field
|
├ question_identifier string The question's ``identifier`` field
|
||||||
├ options list of integers Internal IDs of selected option(s)s (only for choice types)
|
├ options list of integers Internal IDs of selected option(s)s (only for choice types)
|
||||||
└ option_identifiers list of strings The ``identifier`` fields of the selected option(s)s
|
└ option_identifiers list of strings The ``identifier`` fields of the selected option(s)s
|
||||||
seat objects The assigned seat. Can be ``null``.
|
|
||||||
├ id integer Internal ID of the seat instance
|
|
||||||
├ name string Human-readable seat name
|
|
||||||
└ seat_guid string Identifier of the seat within the seating plan
|
|
||||||
pdf_data object Data object required for ticket PDF generation. By default,
|
pdf_data object Data object required for ticket PDF generation. By default,
|
||||||
this field is missing. It will be added only if you add the
|
this field is missing. It will be added only if you add the
|
||||||
``pdf_data=true`` query parameter to your request.
|
``pdf_data=true`` query parameter to your request.
|
||||||
@@ -239,31 +197,6 @@ pdf_data object Data object req
|
|||||||
|
|
||||||
The attributes ``pseudonymization_id`` and ``pdf_data`` have been added.
|
The attributes ``pseudonymization_id`` and ``pdf_data`` have been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The attribute ``seat`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
|
||||||
|
|
||||||
The value ``auto_checked_in`` has been added to the ``checkins``-attribute.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
|
||||||
|
|
||||||
The ``url`` of a ticket ``download`` can now also return a ``text/uri-list`` instead of a file. See
|
|
||||||
:ref:`order-position-ticket-download` for details.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
The attribute ``canceled`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.8
|
|
||||||
|
|
||||||
The attributes ``company``, ``street``, ``zipcode``, ``city``, ``country``, and ``state`` have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.9
|
|
||||||
|
|
||||||
The ``checkin.type`` attribute has been added.
|
|
||||||
|
|
||||||
.. _order-payment-resource:
|
.. _order-payment-resource:
|
||||||
|
|
||||||
Order payment resource
|
Order payment resource
|
||||||
@@ -280,27 +213,13 @@ amount money (string) Payment amount
|
|||||||
created datetime Date and time of creation of this payment
|
created datetime Date and time of creation of this payment
|
||||||
payment_date datetime Date and time of completion of this payment (or ``null``)
|
payment_date datetime Date and time of completion of this payment (or ``null``)
|
||||||
provider string Identification string of the payment provider
|
provider string Identification string of the payment provider
|
||||||
payment_url string The URL where an user can continue with the payment (or ``null``)
|
|
||||||
details object Payment-specific information. This is a dictionary
|
|
||||||
with various fields that can be different between
|
|
||||||
payment providers, versions, payment states, etc. If
|
|
||||||
you read this field, you always need to be able to
|
|
||||||
deal with situations where values that you expect are
|
|
||||||
missing. Mostly, the field contains various IDs that
|
|
||||||
can be used for matching with other systems. If a
|
|
||||||
payment provider does not implement this feature,
|
|
||||||
the object is empty.
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 2.0
|
.. versionchanged:: 2.0
|
||||||
|
|
||||||
This resource has been added.
|
This resource has been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
.. _order-payment-resource:
|
||||||
|
|
||||||
The attributes ``payment_url`` and ``details`` have been added.
|
|
||||||
|
|
||||||
.. _order-refund-resource:
|
|
||||||
|
|
||||||
Order refund resource
|
Order refund resource
|
||||||
---------------------
|
---------------------
|
||||||
@@ -330,10 +249,6 @@ List of all orders
|
|||||||
|
|
||||||
Filtering for emails or order codes is now case-insensitive.
|
Filtering for emails or order codes is now case-insensitive.
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
The ``include_canceled_positions`` and ``include_canceled_fees`` query parameters have been added.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orders/
|
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orders/
|
||||||
|
|
||||||
Returns a list of all orders within a given event.
|
Returns a list of all orders within a given event.
|
||||||
@@ -365,7 +280,6 @@ List of all orders
|
|||||||
"status": "p",
|
"status": "p",
|
||||||
"testmode": false,
|
"testmode": false,
|
||||||
"secret": "k24fiuwvu8kxz3y1",
|
"secret": "k24fiuwvu8kxz3y1",
|
||||||
"url": "https://test.pretix.eu/dummy/dummy/order/ABC12/k24fiuwvu8kxz3y1/",
|
|
||||||
"email": "tester@example.org",
|
"email": "tester@example.org",
|
||||||
"locale": "en",
|
"locale": "en",
|
||||||
"sales_channel": "web",
|
"sales_channel": "web",
|
||||||
@@ -388,8 +302,7 @@ List of all orders
|
|||||||
"street": "Test street 12",
|
"street": "Test street 12",
|
||||||
"zipcode": "12345",
|
"zipcode": "12345",
|
||||||
"city": "Testington",
|
"city": "Testington",
|
||||||
"country": "DE",
|
"country": "Testikistan",
|
||||||
"state": "",
|
|
||||||
"internal_reference": "",
|
"internal_reference": "",
|
||||||
"vat_id": "EU123456789",
|
"vat_id": "EU123456789",
|
||||||
"vat_id_validated": false
|
"vat_id_validated": false
|
||||||
@@ -399,7 +312,6 @@ List of all orders
|
|||||||
"id": 23442,
|
"id": 23442,
|
||||||
"order": "ABC12",
|
"order": "ABC12",
|
||||||
"positionid": 1,
|
"positionid": 1,
|
||||||
"canceled": false,
|
|
||||||
"item": 1345,
|
"item": 1345,
|
||||||
"variation": null,
|
"variation": null,
|
||||||
"price": "23.00",
|
"price": "23.00",
|
||||||
@@ -408,12 +320,6 @@ List of all orders
|
|||||||
"full_name": "Peter",
|
"full_name": "Peter",
|
||||||
},
|
},
|
||||||
"attendee_email": null,
|
"attendee_email": null,
|
||||||
"company": "Sample company",
|
|
||||||
"street": "Test street 12",
|
|
||||||
"zipcode": "12345",
|
|
||||||
"city": "Testington",
|
|
||||||
"country": "DE",
|
|
||||||
"state": null,
|
|
||||||
"voucher": null,
|
"voucher": null,
|
||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_value": "0.00",
|
"tax_value": "0.00",
|
||||||
@@ -422,13 +328,10 @@ List of all orders
|
|||||||
"addon_to": null,
|
"addon_to": null,
|
||||||
"subevent": null,
|
"subevent": null,
|
||||||
"pseudonymization_id": "MQLJvANO3B",
|
"pseudonymization_id": "MQLJvANO3B",
|
||||||
"seat": null,
|
|
||||||
"checkins": [
|
"checkins": [
|
||||||
{
|
{
|
||||||
"list": 44,
|
"list": 44,
|
||||||
"type": "entry",
|
"datetime": "2017-12-25T12:45:23Z"
|
||||||
"datetime": "2017-12-25T12:45:23Z",
|
|
||||||
"auto_checked_in": false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
@@ -461,8 +364,6 @@ List of all orders
|
|||||||
"amount": "23.00",
|
"amount": "23.00",
|
||||||
"created": "2017-12-01T10:00:00Z",
|
"created": "2017-12-01T10:00:00Z",
|
||||||
"payment_date": "2017-12-04T12:13:12Z",
|
"payment_date": "2017-12-04T12:13:12Z",
|
||||||
"payment_url": null,
|
|
||||||
"details": {},
|
|
||||||
"provider": "banktransfer"
|
"provider": "banktransfer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -476,21 +377,15 @@ List of all orders
|
|||||||
``last_modified``, and ``status``. Default: ``datetime``
|
``last_modified``, and ``status``. Default: ``datetime``
|
||||||
:query string code: Only return orders that match the given order code
|
:query string code: Only return orders that match the given order code
|
||||||
:query string status: Only return orders in the given order status (see above)
|
:query string status: Only return orders in the given order status (see above)
|
||||||
:query string search: Only return orders matching a given search query
|
|
||||||
:query boolean testmode: Only return orders with ``testmode`` set to ``true`` or ``false``
|
:query boolean testmode: Only return orders with ``testmode`` set to ``true`` or ``false``
|
||||||
:query boolean require_approval: If set to ``true`` or ``false``, only categories with this value for the field
|
:query boolean require_approval: If set to ``true`` or ``false``, only categories with this value for the field
|
||||||
``require_approval`` will be returned.
|
``require_approval`` will be returned.
|
||||||
:query include_canceled_positions: If set to ``true``, the output will contain canceled order positions. Note that this
|
|
||||||
only affects position-level cancellations, not fully-canceled orders.
|
|
||||||
:query include_canceled_fees: If set to ``true``, the output will contain canceled order fees.
|
|
||||||
:query string email: Only return orders created with the given email address
|
:query string email: Only return orders created with the given email address
|
||||||
:query string locale: Only return orders with the given customer locale
|
:query string locale: Only return orders with the given customer locale
|
||||||
:query datetime modified_since: Only return orders that have changed since the given date. Be careful: We only
|
:query datetime modified_since: Only return orders that have changed since the given date. Be careful: We only
|
||||||
recommend using this in combination with ``testmode=false``, since test mode orders can vanish at any time and
|
recommend using this in combination with ``testmode=false``, since test mode orders can vanish at any time and
|
||||||
you will not notice it using this method.
|
you will not notice it using this method.
|
||||||
:query datetime created_since: Only return orders that have been created since the given date.
|
:query datetime created_since: Only return orders that have been created since the given date.
|
||||||
:query datetime subevent_after: Only return orders that contain a ticket for a subevent taking place after the given date.
|
|
||||||
:query string exclude: Exclude a field from the output, e.g. ``fees`` or ``positions.downloads``. Can be used as a performance optimization. Can be passed multiple times.
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
:param event: The ``slug`` field of the event to fetch
|
:param event: The ``slug`` field of the event to fetch
|
||||||
:resheader X-Page-Generated: The server time at the beginning of the operation. If you're using this API to fetch
|
:resheader X-Page-Generated: The server time at the beginning of the operation. If you're using this API to fetch
|
||||||
@@ -502,10 +397,6 @@ List of all orders
|
|||||||
Fetching individual orders
|
Fetching individual orders
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
The ``include_canceled_positions`` and ``include_canceled_fees`` query parameters have been added.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/
|
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/
|
||||||
|
|
||||||
Returns information on one order, identified by its order code.
|
Returns information on one order, identified by its order code.
|
||||||
@@ -531,7 +422,6 @@ Fetching individual orders
|
|||||||
"status": "p",
|
"status": "p",
|
||||||
"testmode": false,
|
"testmode": false,
|
||||||
"secret": "k24fiuwvu8kxz3y1",
|
"secret": "k24fiuwvu8kxz3y1",
|
||||||
"url": "https://test.pretix.eu/dummy/dummy/order/ABC12/k24fiuwvu8kxz3y1/",
|
|
||||||
"email": "tester@example.org",
|
"email": "tester@example.org",
|
||||||
"locale": "en",
|
"locale": "en",
|
||||||
"sales_channel": "web",
|
"sales_channel": "web",
|
||||||
@@ -554,8 +444,7 @@ Fetching individual orders
|
|||||||
"street": "Test street 12",
|
"street": "Test street 12",
|
||||||
"zipcode": "12345",
|
"zipcode": "12345",
|
||||||
"city": "Testington",
|
"city": "Testington",
|
||||||
"country": "DE",
|
"country": "Testikistan",
|
||||||
"state": "",
|
|
||||||
"internal_reference": "",
|
"internal_reference": "",
|
||||||
"vat_id": "EU123456789",
|
"vat_id": "EU123456789",
|
||||||
"vat_id_validated": false
|
"vat_id_validated": false
|
||||||
@@ -565,7 +454,6 @@ Fetching individual orders
|
|||||||
"id": 23442,
|
"id": 23442,
|
||||||
"order": "ABC12",
|
"order": "ABC12",
|
||||||
"positionid": 1,
|
"positionid": 1,
|
||||||
"canceled": false,
|
|
||||||
"item": 1345,
|
"item": 1345,
|
||||||
"variation": null,
|
"variation": null,
|
||||||
"price": "23.00",
|
"price": "23.00",
|
||||||
@@ -574,12 +462,6 @@ Fetching individual orders
|
|||||||
"full_name": "Peter",
|
"full_name": "Peter",
|
||||||
},
|
},
|
||||||
"attendee_email": null,
|
"attendee_email": null,
|
||||||
"company": "Sample company",
|
|
||||||
"street": "Test street 12",
|
|
||||||
"zipcode": "12345",
|
|
||||||
"city": "Testington",
|
|
||||||
"country": "DE",
|
|
||||||
"state": null,
|
|
||||||
"voucher": null,
|
"voucher": null,
|
||||||
"tax_rate": "0.00",
|
"tax_rate": "0.00",
|
||||||
"tax_rule": null,
|
"tax_rule": null,
|
||||||
@@ -588,13 +470,10 @@ Fetching individual orders
|
|||||||
"addon_to": null,
|
"addon_to": null,
|
||||||
"subevent": null,
|
"subevent": null,
|
||||||
"pseudonymization_id": "MQLJvANO3B",
|
"pseudonymization_id": "MQLJvANO3B",
|
||||||
"seat": null,
|
|
||||||
"checkins": [
|
"checkins": [
|
||||||
{
|
{
|
||||||
"list": 44,
|
"list": 44,
|
||||||
"type": "entry",
|
"datetime": "2017-12-25T12:45:23Z"
|
||||||
"datetime": "2017-12-25T12:45:23Z",
|
|
||||||
"auto_checked_in": false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
@@ -627,8 +506,6 @@ Fetching individual orders
|
|||||||
"amount": "23.00",
|
"amount": "23.00",
|
||||||
"created": "2017-12-01T10:00:00Z",
|
"created": "2017-12-01T10:00:00Z",
|
||||||
"payment_date": "2017-12-04T12:13:12Z",
|
"payment_date": "2017-12-04T12:13:12Z",
|
||||||
"payment_url": null,
|
|
||||||
"details": {},
|
|
||||||
"provider": "banktransfer"
|
"provider": "banktransfer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -638,9 +515,6 @@ Fetching individual orders
|
|||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
:param event: The ``slug`` field of the event to fetch
|
:param event: The ``slug`` field of the event to fetch
|
||||||
:param code: The ``code`` field of the order to fetch
|
:param code: The ``code`` field of the order to fetch
|
||||||
:query include_canceled_positions: If set to ``true``, the output will contain canceled order positions. Note that this
|
|
||||||
only affects position-level cancellations, not fully-canceled orders.
|
|
||||||
:query include_canceled_fees: If set to ``true``, the output will contain canceled order fees.
|
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
:statuscode 401: Authentication failure
|
:statuscode 401: Authentication failure
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
||||||
@@ -807,8 +681,6 @@ Deleting orders
|
|||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to delete this resource **or** the order may not be deleted.
|
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to delete this resource **or** the order may not be deleted.
|
||||||
:statuscode 404: The requested order does not exist.
|
:statuscode 404: The requested order does not exist.
|
||||||
|
|
||||||
.. _rest-orders-create:
|
|
||||||
|
|
||||||
Creating orders
|
Creating orders
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
@@ -816,6 +688,8 @@ Creating orders
|
|||||||
|
|
||||||
Creates a new order.
|
Creates a new order.
|
||||||
|
|
||||||
|
.. warning:: This endpoint is considered **experimental**. It might change at any time without prior notice.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
This endpoint is intended for advanced users. It is not designed to be used to build your own shop frontend,
|
This endpoint is intended for advanced users. It is not designed to be used to build your own shop frontend,
|
||||||
@@ -834,20 +708,24 @@ Creating orders
|
|||||||
|
|
||||||
* does not validate the number of items per order or the number of times an item can be included in an order
|
* does not validate the number of items per order or the number of times an item can be included in an order
|
||||||
|
|
||||||
* does not validate any requirements related to add-on products and does not add bundled products automatically
|
* does not validate any requirements related to add-on products
|
||||||
|
|
||||||
* does not check prices but believes any prices you send
|
* does not check or calculate prices but believes any prices you send
|
||||||
|
|
||||||
|
* does not support the redemption of vouchers
|
||||||
|
|
||||||
* does not prevent you from buying items that can only be bought with a voucher
|
* does not prevent you from buying items that can only be bought with a voucher
|
||||||
|
|
||||||
* does not calculate fees automatically
|
* does not calculate fees
|
||||||
|
|
||||||
* does not allow to pass data to plugins and will therefore cause issues with some plugins like the shipping
|
* does not allow to pass data to plugins and will therefore cause issues with some plugins like the shipping
|
||||||
module
|
module
|
||||||
|
|
||||||
* does not support file upload questions
|
* does not send order confirmations via email
|
||||||
|
|
||||||
* does not support redeeming gift cards
|
* does not support reverse charge taxation
|
||||||
|
|
||||||
|
* does not support file upload questions
|
||||||
|
|
||||||
You can supply the following fields of the resource:
|
You can supply the following fields of the resource:
|
||||||
|
|
||||||
@@ -859,15 +737,14 @@ Creating orders
|
|||||||
then call the ``mark_paid`` API method.
|
then call the ``mark_paid`` API method.
|
||||||
* ``testmode`` (optional) – Defaults to ``false``
|
* ``testmode`` (optional) – Defaults to ``false``
|
||||||
* ``consume_carts`` (optional) – A list of cart IDs. All cart positions with these IDs will be deleted if the
|
* ``consume_carts`` (optional) – A list of cart IDs. All cart positions with these IDs will be deleted if the
|
||||||
order creation is successful. Any quotas or seats that become free by this operation will be credited to your order
|
order creation is successful. Any quotas that become free by this operation will be credited to your order
|
||||||
creation.
|
creation.
|
||||||
* ``email`` (optional)
|
* ``email``
|
||||||
* ``locale``
|
* ``locale``
|
||||||
* ``sales_channel`` (optional)
|
* ``sales_channel``
|
||||||
* ``payment_provider`` (optional) – The identifier of the payment provider set for this order. This needs to be an
|
* ``payment_provider`` – The identifier of the payment provider set for this order. This needs to be an existing
|
||||||
existing payment provider. You should use ``"free"`` for free orders, and we strongly advise to use ``"manual"``
|
payment provider. You should use ``"free"`` for free orders, and we strongly advise to use ``"manual"`` for all
|
||||||
for all orders you create as paid. This field is optional when the order status is ``"n"`` or the order total is
|
orders you create as paid.
|
||||||
zero, otherwise it is required.
|
|
||||||
* ``payment_info`` (optional) – You can pass a nested JSON object that will be set as the internal ``info``
|
* ``payment_info`` (optional) – You can pass a nested JSON object that will be set as the internal ``info``
|
||||||
value of the payment object that will be created. How this value is handled is up to the payment provider and you
|
value of the payment object that will be created. How this value is handled is up to the payment provider and you
|
||||||
should only use this if you know the specific payment provider in detail. Please keep in mind that the payment
|
should only use this if you know the specific payment provider in detail. Please keep in mind that the payment
|
||||||
@@ -885,32 +762,20 @@ Creating orders
|
|||||||
* ``zipcode``
|
* ``zipcode``
|
||||||
* ``city``
|
* ``city``
|
||||||
* ``country``
|
* ``country``
|
||||||
* ``state``
|
|
||||||
* ``internal_reference``
|
* ``internal_reference``
|
||||||
* ``vat_id``
|
* ``vat_id``
|
||||||
* ``vat_id_validated`` (optional) – If you need support for reverse charge (rarely the case), you need to check
|
|
||||||
yourself if the passed VAT ID is a valid EU VAT ID. In that case, set this to ``true``. Only valid VAT IDs will
|
|
||||||
trigger reverse charge taxation. Don't forget to set ``is_business`` as well!
|
|
||||||
|
|
||||||
* ``positions``
|
* ``positions``
|
||||||
|
|
||||||
* ``positionid`` (optional, see below)
|
* ``positionid`` (optional, see below)
|
||||||
* ``item``
|
* ``item``
|
||||||
* ``variation`` (optional)
|
* ``variation``
|
||||||
* ``price`` (optional, if set to ``null`` or missing the price will be computed from the given product)
|
* ``price``
|
||||||
* ``seat`` (The ``seat_guid`` attribute of a seat. Required when the specified ``item`` requires a seat, otherwise must be ``null``.)
|
* ``attendee_name`` **or** ``attendee_name_parts``
|
||||||
* ``attendee_name`` **or** ``attendee_name_parts`` (optional)
|
* ``attendee_email``
|
||||||
* ``voucher`` (optional, the ``code`` attribute of a valid voucher)
|
|
||||||
* ``attendee_email`` (optional)
|
|
||||||
* ``company`` (optional)
|
|
||||||
* ``street`` (optional)
|
|
||||||
* ``zipcode`` (optional)
|
|
||||||
* ``city`` (optional)
|
|
||||||
* ``country`` (optional)
|
|
||||||
* ``state`` (optional)
|
|
||||||
* ``secret`` (optional)
|
* ``secret`` (optional)
|
||||||
* ``addon_to`` (optional, see below)
|
* ``addon_to`` (optional, see below)
|
||||||
* ``subevent`` (optional)
|
* ``subevent``
|
||||||
* ``answers``
|
* ``answers``
|
||||||
|
|
||||||
* ``question``
|
* ``question``
|
||||||
@@ -924,32 +789,14 @@ Creating orders
|
|||||||
* ``description``
|
* ``description``
|
||||||
* ``internal_type``
|
* ``internal_type``
|
||||||
* ``tax_rule``
|
* ``tax_rule``
|
||||||
* ``_treat_value_as_percentage`` (Optional convenience flag. If set to ``true``, your ``value`` parameter will
|
|
||||||
be treated as a percentage and the fee will be calculated using that percentage and the sum of all product
|
|
||||||
prices. Note that this will not include other fees and is calculated once during order generation and will not
|
|
||||||
be respected automatically when the order changes later.)
|
|
||||||
* ``_split_taxes_like_products`` (Optional convenience flag. If set to ``true``, your ``tax_rule`` will be ignored
|
|
||||||
and the fee will be taxed like the products in the order. If the products have multiple tax rates, multiple fees
|
|
||||||
will be generated with weights adjusted to the net price of the products. Note that this will be calculated once
|
|
||||||
during order generation and is not respected automatically when the order changes later.)
|
|
||||||
|
|
||||||
* ``force`` (optional). If set to ``true``, quotas will be ignored.
|
* ``force`` (optional). If set to ``true``, quotas will be ignored.
|
||||||
* ``send_mail`` (optional). If set to ``true``, the same emails will be sent as for a regular order, regardless of
|
|
||||||
whether these emails are enabled for certain sales channels. Defaults to
|
|
||||||
``false``.
|
|
||||||
|
|
||||||
If you want to use add-on products, you need to set the ``positionid`` fields of all positions manually
|
If you want to use add-on products, you need to set the ``positionid`` fields of all positions manually
|
||||||
to incrementing integers starting with ``1``. Then, you can reference one of these
|
to incrementing integers starting with ``1``. Then, you can reference one of these
|
||||||
IDs in the ``addon_to`` field of another position. Note that all add_ons for a specific position need to come
|
IDs in the ``addon_to`` field of another position. Note that all add_ons for a specific position need to come
|
||||||
immediately after the position itself.
|
immediately after the position itself.
|
||||||
|
|
||||||
Starting with pretix 3.7, you can add ``"simulate": true`` to the body to do a "dry run" of your order. This will
|
|
||||||
validate your order and return you an order object with the resulting prices, but will not create an actual order.
|
|
||||||
You can use this for testing or to look up prices. In this case, some attributes are ignored, such as whether
|
|
||||||
to send an email or what payment provider will be used. Note that some returned fields will contain empty values
|
|
||||||
(e.g. all ``id`` fields of positions will be zero) and some will contain fake values (e.g. the order code will
|
|
||||||
always be ``PREVIEW``). pretix plugins will not be triggered, so some special behavior might be missing as well.
|
|
||||||
|
|
||||||
**Example request**:
|
**Example request**:
|
||||||
|
|
||||||
.. sourcecode:: http
|
.. sourcecode:: http
|
||||||
@@ -981,7 +828,6 @@ Creating orders
|
|||||||
"zipcode": "12345",
|
"zipcode": "12345",
|
||||||
"city": "Sample City",
|
"city": "Sample City",
|
||||||
"country": "UK",
|
"country": "UK",
|
||||||
"state": "",
|
|
||||||
"internal_reference": "",
|
"internal_reference": "",
|
||||||
"vat_id": ""
|
"vat_id": ""
|
||||||
},
|
},
|
||||||
@@ -1005,7 +851,7 @@ Creating orders
|
|||||||
],
|
],
|
||||||
"subevent": null
|
"subevent": null
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
@@ -1109,42 +955,6 @@ Order state operations
|
|||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
||||||
:statuscode 404: The requested order does not exist.
|
:statuscode 404: The requested order does not exist.
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/reactivate/
|
|
||||||
|
|
||||||
Reactivates a canceled order. This will set the order to pending or paid state. Only possible if all products are
|
|
||||||
still available.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/events/sampleconf/orders/ABC12/reactivate/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"code": "ABC12",
|
|
||||||
"status": "n",
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param event: The ``slug`` field of the event to modify
|
|
||||||
:param code: The ``code`` field of the order to modify
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The order cannot be reactivated
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested order does not exist.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/mark_pending/
|
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/mark_pending/
|
||||||
|
|
||||||
Marks a paid order as unpaid.
|
Marks a paid order as unpaid.
|
||||||
@@ -1432,13 +1242,7 @@ List of all order positions
|
|||||||
The order positions endpoint has been extended by the filter queries ``voucher``, ``voucher__code`` and
|
The order positions endpoint has been extended by the filter queries ``voucher``, ``voucher__code`` and
|
||||||
``pseudonymization_id``.
|
``pseudonymization_id``.
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
.. note:: Individually canceled order positions are currently not visible via the API at all.
|
||||||
|
|
||||||
The value ``auto_checked_in`` has been added to the ``checkins``-attribute.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
The ``include_canceled_positions`` and ``include_canceled_fees`` query parameters have been added.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/
|
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/
|
||||||
|
|
||||||
@@ -1469,7 +1273,6 @@ List of all order positions
|
|||||||
"id": 23442,
|
"id": 23442,
|
||||||
"order": "ABC12",
|
"order": "ABC12",
|
||||||
"positionid": 1,
|
"positionid": 1,
|
||||||
"canceled": false,
|
|
||||||
"item": 1345,
|
"item": 1345,
|
||||||
"variation": null,
|
"variation": null,
|
||||||
"price": "23.00",
|
"price": "23.00",
|
||||||
@@ -1484,15 +1287,12 @@ List of all order positions
|
|||||||
"tax_value": "0.00",
|
"tax_value": "0.00",
|
||||||
"secret": "z3fsn8jyufm5kpk768q69gkbyr5f4h6w",
|
"secret": "z3fsn8jyufm5kpk768q69gkbyr5f4h6w",
|
||||||
"pseudonymization_id": "MQLJvANO3B",
|
"pseudonymization_id": "MQLJvANO3B",
|
||||||
"seat": null,
|
|
||||||
"addon_to": null,
|
"addon_to": null,
|
||||||
"subevent": null,
|
"subevent": null,
|
||||||
"checkins": [
|
"checkins": [
|
||||||
{
|
{
|
||||||
"list": 44,
|
"list": 44,
|
||||||
"type": "entry",
|
"datetime": "2017-12-25T12:45:23Z"
|
||||||
"datetime": "2017-12-25T12:45:23Z",
|
|
||||||
"auto_checked_in": false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
@@ -1540,8 +1340,6 @@ List of all order positions
|
|||||||
comma-separated IDs.
|
comma-separated IDs.
|
||||||
:query string voucher: Only return positions with a specific voucher.
|
:query string voucher: Only return positions with a specific voucher.
|
||||||
:query string voucher__code: Only return positions with a specific voucher code.
|
:query string voucher__code: Only return positions with a specific voucher code.
|
||||||
:query include_canceled_positions: If set to ``true``, the output will contain canceled order positions. Note that this
|
|
||||||
only affects position-level cancellations, not fully-canceled orders.
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
:param event: The ``slug`` field of the event to fetch
|
:param event: The ``slug`` field of the event to fetch
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
@@ -1575,7 +1373,6 @@ Fetching individual positions
|
|||||||
"id": 23442,
|
"id": 23442,
|
||||||
"order": "ABC12",
|
"order": "ABC12",
|
||||||
"positionid": 1,
|
"positionid": 1,
|
||||||
"canceled": false,
|
|
||||||
"item": 1345,
|
"item": 1345,
|
||||||
"variation": null,
|
"variation": null,
|
||||||
"price": "23.00",
|
"price": "23.00",
|
||||||
@@ -1592,13 +1389,10 @@ Fetching individual positions
|
|||||||
"addon_to": null,
|
"addon_to": null,
|
||||||
"subevent": null,
|
"subevent": null,
|
||||||
"pseudonymization_id": "MQLJvANO3B",
|
"pseudonymization_id": "MQLJvANO3B",
|
||||||
"seat": null,
|
|
||||||
"checkins": [
|
"checkins": [
|
||||||
{
|
{
|
||||||
"list": 44,
|
"list": 44,
|
||||||
"type": "entry",
|
"datetime": "2017-12-25T12:45:23Z"
|
||||||
"datetime": "2017-12-25T12:45:23Z",
|
|
||||||
"auto_checked_in": false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
@@ -1621,14 +1415,11 @@ Fetching individual positions
|
|||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
:param event: The ``slug`` field of the event to fetch
|
:param event: The ``slug`` field of the event to fetch
|
||||||
:param id: The ``id`` field of the order position to fetch
|
:param id: The ``id`` field of the order position to fetch
|
||||||
:query include_canceled_positions: If set to ``true``, canceled positions may be returned (otherwise, they return 404).
|
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
:statuscode 401: Authentication failure
|
:statuscode 401: Authentication failure
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
||||||
:statuscode 404: The requested order position does not exist.
|
:statuscode 404: The requested order position does not exist.
|
||||||
|
|
||||||
.. _`order-position-ticket-download`:
|
|
||||||
|
|
||||||
Order position ticket download
|
Order position ticket download
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
@@ -1638,11 +1429,6 @@ Order position ticket download
|
|||||||
Depending on the chosen output, the response might be a ZIP file, PDF file or something else. The order details
|
Depending on the chosen output, the response might be a ZIP file, PDF file or something else. The order details
|
||||||
response contains a list of output options for this particular order position.
|
response contains a list of output options for this particular order position.
|
||||||
|
|
||||||
Be aware that the output does not have to be a file, but can also be a regular HTTP response with a ``Content-Type``
|
|
||||||
set to ``text/uri-list``. In this case, the user is expected to navigate to that URL in order to access their ticket.
|
|
||||||
The referenced URL can provide a download or a regular, human-viewable website - so it is advised to open this URL
|
|
||||||
in a webbrowser and leave it up to the user to handle the result.
|
|
||||||
|
|
||||||
Tickets can be only downloaded if the order is paid and if ticket downloads are active. Also, depending on event
|
Tickets can be only downloaded if the order is paid and if ticket downloads are active. Also, depending on event
|
||||||
configuration downloads might be only unavailable for add-on products or non-admission products.
|
configuration downloads might be only unavailable for add-on products or non-admission products.
|
||||||
Note that in some cases the ticket file might not yet have been created. In that case, you will receive a status
|
Note that in some cases the ticket file might not yet have been created. In that case, you will receive a status
|
||||||
@@ -1718,10 +1504,6 @@ Order payment endpoints
|
|||||||
|
|
||||||
These endpoints have been added.
|
These endpoints have been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.6
|
|
||||||
|
|
||||||
Payments can now be created through the API.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/payments/
|
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/payments/
|
||||||
|
|
||||||
Returns a list of all payments for an order.
|
Returns a list of all payments for an order.
|
||||||
@@ -1753,8 +1535,6 @@ Order payment endpoints
|
|||||||
"amount": "23.00",
|
"amount": "23.00",
|
||||||
"created": "2017-12-01T10:00:00Z",
|
"created": "2017-12-01T10:00:00Z",
|
||||||
"payment_date": "2017-12-04T12:13:12Z",
|
"payment_date": "2017-12-04T12:13:12Z",
|
||||||
"payment_url": null,
|
|
||||||
"details": {},
|
|
||||||
"provider": "banktransfer"
|
"provider": "banktransfer"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1795,8 +1575,6 @@ Order payment endpoints
|
|||||||
"amount": "23.00",
|
"amount": "23.00",
|
||||||
"created": "2017-12-01T10:00:00Z",
|
"created": "2017-12-01T10:00:00Z",
|
||||||
"payment_date": "2017-12-04T12:13:12Z",
|
"payment_date": "2017-12-04T12:13:12Z",
|
||||||
"payment_url": null,
|
|
||||||
"details": {},
|
|
||||||
"provider": "banktransfer"
|
"provider": "banktransfer"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1930,61 +1708,6 @@ Order payment endpoints
|
|||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
||||||
:statuscode 404: The requested order or payment does not exist.
|
:statuscode 404: The requested order or payment does not exist.
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orders/(code)/payments/
|
|
||||||
|
|
||||||
Creates a new payment.
|
|
||||||
|
|
||||||
Be careful with the ``info`` parameter: You can pass a nested JSON object that will be set as the internal ``info``
|
|
||||||
value of the payment object that will be created. How this value is handled is up to the payment provider and you
|
|
||||||
should only use this if you know the specific payment provider in detail. Please keep in mind that the payment
|
|
||||||
provider will not be called to do anything about this (i.e. if you pass a bank account to a debit provider, *no*
|
|
||||||
charge will be created), this is just informative in case you *handled the payment already*.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/events/sampleconf/orders/ABC12/payments/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"state": "confirmed",
|
|
||||||
"amount": "23.00",
|
|
||||||
"payment_date": "2017-12-04T12:13:12Z",
|
|
||||||
"info": {},
|
|
||||||
"provider": "banktransfer"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"local_id": 1,
|
|
||||||
"state": "confirmed",
|
|
||||||
"amount": "23.00",
|
|
||||||
"created": "2017-12-01T10:00:00Z",
|
|
||||||
"payment_date": "2017-12-04T12:13:12Z",
|
|
||||||
"payment_url": null,
|
|
||||||
"details": {},
|
|
||||||
"provider": "banktransfer"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to access
|
|
||||||
:param event: The ``slug`` field of the event to access
|
|
||||||
:param order: The ``code`` field of the order to access
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested order does not exist.
|
|
||||||
|
|
||||||
|
|
||||||
Order refund endpoints
|
Order refund endpoints
|
||||||
----------------------
|
----------------------
|
||||||
@@ -2103,8 +1826,7 @@ Order refund endpoints
|
|||||||
"payment": 1,
|
"payment": 1,
|
||||||
"execution_date": null,
|
"execution_date": null,
|
||||||
"provider": "manual",
|
"provider": "manual",
|
||||||
"mark_canceled": false,
|
"mark_canceled": false
|
||||||
"mark_pending": true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ Endpoints
|
|||||||
}
|
}
|
||||||
|
|
||||||
:query page: The page number in case of a multi-page result set, default is 1
|
:query page: The page number in case of a multi-page result set, default is 1
|
||||||
:query string ordering: Manually set the ordering of results. Valid fields to be used are ``slug`` and
|
|
||||||
``name``. Default: ``slug``.
|
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
:statuscode 401: Authentication failure
|
:statuscode 401: Authentication failure
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ Field Type Description
|
|||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
id integer Internal ID of the question
|
id integer Internal ID of the question
|
||||||
question multi-lingual string The field label shown to the customer
|
question multi-lingual string The field label shown to the customer
|
||||||
help_text multi-lingual string The help text shown to the customer
|
|
||||||
type string The expected type of answer. Valid options:
|
type string The expected type of answer. Valid options:
|
||||||
|
|
||||||
* ``N`` – number
|
* ``N`` – number
|
||||||
@@ -32,7 +31,6 @@ type string The expected ty
|
|||||||
* ``H`` – time
|
* ``H`` – time
|
||||||
* ``W`` – date and time
|
* ``W`` – date and time
|
||||||
* ``CC`` – country code (ISO 3666-1 alpha-2)
|
* ``CC`` – country code (ISO 3666-1 alpha-2)
|
||||||
* ``TEL`` – telephone number
|
|
||||||
required boolean If ``true``, the question needs to be filled out.
|
required boolean If ``true``, the question needs to be filled out.
|
||||||
position integer An integer, used for sorting
|
position integer An integer, used for sorting
|
||||||
items list of integers List of item IDs this question is assigned to.
|
items list of integers List of item IDs this question is assigned to.
|
||||||
@@ -43,8 +41,6 @@ ask_during_checkin boolean If ``true``, th
|
|||||||
the ticket instead.
|
the ticket instead.
|
||||||
hidden boolean If ``true``, the question will only be shown in the
|
hidden boolean If ``true``, the question will only be shown in the
|
||||||
backend.
|
backend.
|
||||||
print_on_invoice boolean If ``true``, the question will only be shown on
|
|
||||||
invoices.
|
|
||||||
options list of objects In case of question type ``C`` or ``M``, this lists the
|
options list of objects In case of question type ``C`` or ``M``, this lists the
|
||||||
available objects. Only writable during creation,
|
available objects. Only writable during creation,
|
||||||
use separate endpoint to modify this later.
|
use separate endpoint to modify this later.
|
||||||
@@ -58,12 +54,11 @@ dependency_question integer Internal ID of
|
|||||||
this attribute is set to the value given in
|
this attribute is set to the value given in
|
||||||
``dependency_value``. This cannot be combined with
|
``dependency_value``. This cannot be combined with
|
||||||
``ask_during_checkin``.
|
``ask_during_checkin``.
|
||||||
dependency_values list of strings If ``dependency_question`` is set to a boolean
|
dependency_value string The value ``dependency_question`` needs to be set to.
|
||||||
question, this should be ``["True"]`` or ``["False"]``.
|
If ``dependency_question`` is set to a boolean
|
||||||
Otherwise, it should be a list of ``identifier`` values
|
question, this should be ``"true"`` or ``"false"``.
|
||||||
of question options.
|
Otherwise, it should be the ``identifier`` of a
|
||||||
dependency_value string An old version of ``dependency_values`` that only allows
|
question option.
|
||||||
for one value. **Deprecated.**
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 1.12
|
.. versionchanged:: 1.12
|
||||||
@@ -80,18 +75,6 @@ dependency_value string An old version
|
|||||||
|
|
||||||
The attribute ``hidden`` and the question type ``CC`` have been added.
|
The attribute ``hidden`` and the question type ``CC`` have been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The attribute ``dependency_values`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The attribute ``print_on_invoice`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.5
|
|
||||||
|
|
||||||
The attribute ``help_text`` has been added.
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -128,7 +111,6 @@ Endpoints
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"question": {"en": "T-Shirt size"},
|
"question": {"en": "T-Shirt size"},
|
||||||
"help_text": {"en": "Choose your preferred t-shirt-size"},
|
|
||||||
"type": "C",
|
"type": "C",
|
||||||
"required": false,
|
"required": false,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
@@ -136,10 +118,8 @@ Endpoints
|
|||||||
"identifier": "WY3TP9SL",
|
"identifier": "WY3TP9SL",
|
||||||
"ask_during_checkin": false,
|
"ask_during_checkin": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"print_on_invoice": false,
|
|
||||||
"dependency_question": null,
|
"dependency_question": null,
|
||||||
"dependency_value": null,
|
"dependency_value": null,
|
||||||
"dependency_values": [],
|
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
@@ -199,7 +179,6 @@ Endpoints
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"question": {"en": "T-Shirt size"},
|
"question": {"en": "T-Shirt size"},
|
||||||
"help_text": {"en": "Choose your preferred t-shirt-size"},
|
|
||||||
"type": "C",
|
"type": "C",
|
||||||
"required": false,
|
"required": false,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
@@ -207,10 +186,8 @@ Endpoints
|
|||||||
"identifier": "WY3TP9SL",
|
"identifier": "WY3TP9SL",
|
||||||
"ask_during_checkin": false,
|
"ask_during_checkin": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"print_on_invoice": false,
|
|
||||||
"dependency_question": null,
|
"dependency_question": null,
|
||||||
"dependency_value": null,
|
"dependency_value": null,
|
||||||
"dependency_values": [],
|
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
@@ -251,20 +228,18 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/questions/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/questions/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"question": {"en": "T-Shirt size"},
|
"question": {"en": "T-Shirt size"},
|
||||||
"help_text": {"en": "Choose your preferred t-shirt-size"},
|
|
||||||
"type": "C",
|
"type": "C",
|
||||||
"required": false,
|
"required": false,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
"position": 1,
|
"position": 1,
|
||||||
"ask_during_checkin": false,
|
"ask_during_checkin": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"print_on_invoice": false,
|
|
||||||
"dependency_question": null,
|
"dependency_question": null,
|
||||||
"dependency_values": [],
|
"dependency_value": null,
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"answer": {"en": "S"}
|
"answer": {"en": "S"}
|
||||||
@@ -290,7 +265,6 @@ Endpoints
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"question": {"en": "T-Shirt size"},
|
"question": {"en": "T-Shirt size"},
|
||||||
"help_text": {"en": "Choose your preferred t-shirt-size"},
|
|
||||||
"type": "C",
|
"type": "C",
|
||||||
"required": false,
|
"required": false,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
@@ -298,10 +272,8 @@ Endpoints
|
|||||||
"identifier": "WY3TP9SL",
|
"identifier": "WY3TP9SL",
|
||||||
"ask_during_checkin": false,
|
"ask_during_checkin": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"print_on_invoice": false,
|
|
||||||
"dependency_question": null,
|
"dependency_question": null,
|
||||||
"dependency_value": null,
|
"dependency_value": null,
|
||||||
"dependency_values": [],
|
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
@@ -365,7 +337,6 @@ Endpoints
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"question": {"en": "T-Shirt size"},
|
"question": {"en": "T-Shirt size"},
|
||||||
"help_text": {"en": "Choose your preferred t-shirt-size"},
|
|
||||||
"type": "C",
|
"type": "C",
|
||||||
"required": false,
|
"required": false,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
@@ -373,10 +344,8 @@ Endpoints
|
|||||||
"identifier": "WY3TP9SL",
|
"identifier": "WY3TP9SL",
|
||||||
"ask_during_checkin": false,
|
"ask_during_checkin": false,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"print_on_invoice": false,
|
|
||||||
"dependency_question": null,
|
"dependency_question": null,
|
||||||
"dependency_value": null,
|
"dependency_value": null,
|
||||||
"dependency_values": [],
|
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
|
|||||||
@@ -20,28 +20,12 @@ size integer The size of the
|
|||||||
items list of integers List of item IDs this quota acts on.
|
items list of integers List of item IDs this quota acts on.
|
||||||
variations list of integers List of item variation IDs this quota acts on.
|
variations list of integers List of item variation IDs this quota acts on.
|
||||||
subevent integer ID of the date inside an event series this quota belongs to (or ``null``).
|
subevent integer ID of the date inside an event series this quota belongs to (or ``null``).
|
||||||
close_when_sold_out boolean If ``true``, the quota will "close" as soon as it is
|
|
||||||
sold out once. Even if tickets become available again,
|
|
||||||
they will not be sold unless the quota is set to open
|
|
||||||
again.
|
|
||||||
closed boolean Whether the quota is currently closed (see above
|
|
||||||
field).
|
|
||||||
release_after_exit boolean Whether the quota regains capacity as soon as some tickets
|
|
||||||
have been scanned at an exit.
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 1.10
|
.. versionchanged:: 1.10
|
||||||
|
|
||||||
The write operations ``POST``, ``PATCH``, ``PUT``, and ``DELETE`` have been added.
|
The write operations ``POST``, ``PATCH``, ``PUT``, and ``DELETE`` have been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The attributes ``close_when_sold_out`` and ``closed`` have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
|
||||||
|
|
||||||
The attribute ``release_after_exit`` has been added.
|
|
||||||
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
@@ -77,9 +61,7 @@ Endpoints
|
|||||||
"size": 200,
|
"size": 200,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
"variations": [1, 4, 5, 7],
|
"variations": [1, 4, 5, 7],
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"close_when_sold_out": false,
|
|
||||||
"closed": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -120,9 +102,7 @@ Endpoints
|
|||||||
"size": 200,
|
"size": 200,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
"variations": [1, 4, 5, 7],
|
"variations": [1, 4, 5, 7],
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"close_when_sold_out": false,
|
|
||||||
"closed": false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
:param organizer: The ``slug`` field of the organizer to fetch
|
||||||
@@ -143,16 +123,14 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/quotas/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/quotas/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Ticket Quota",
|
"name": "Ticket Quota",
|
||||||
"size": 200,
|
"size": 200,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
"variations": [1, 4, 5, 7],
|
"variations": [1, 4, 5, 7],
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"close_when_sold_out": false,
|
|
||||||
"closed": false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
**Example response**:
|
**Example response**:
|
||||||
@@ -169,9 +147,7 @@ Endpoints
|
|||||||
"size": 200,
|
"size": 200,
|
||||||
"items": [1, 2],
|
"items": [1, 2],
|
||||||
"variations": [1, 4, 5, 7],
|
"variations": [1, 4, 5, 7],
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"close_when_sold_out": false,
|
|
||||||
"closed": false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer of the event/item to create a quota for
|
:param organizer: The ``slug`` field of the organizer of the event/item to create a quota for
|
||||||
@@ -224,9 +200,7 @@ Endpoints
|
|||||||
1,
|
1,
|
||||||
2
|
2
|
||||||
],
|
],
|
||||||
"subevent": null,
|
"subevent": null
|
||||||
"close_when_sold_out": false,
|
|
||||||
"closed": false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
:param organizer: The ``slug`` field of the organizer to modify
|
||||||
@@ -289,7 +263,6 @@ Endpoints
|
|||||||
"total_size": 1000,
|
"total_size": 1000,
|
||||||
"pending_orders": 25,
|
"pending_orders": 25,
|
||||||
"paid_orders": 423,
|
"paid_orders": 423,
|
||||||
"exited_orders": 0,
|
|
||||||
"cart_positions": 7,
|
"cart_positions": 7,
|
||||||
"blocking_vouchers": 126,
|
"blocking_vouchers": 126,
|
||||||
"waiting_list": 0
|
"waiting_list": 0
|
||||||
|
|||||||
@@ -1,209 +0,0 @@
|
|||||||
.. _`rest-seatingplans`:
|
|
||||||
|
|
||||||
Seating plans
|
|
||||||
=============
|
|
||||||
|
|
||||||
Resource description
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The seating plan resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal ID of the plan
|
|
||||||
name string Human-readable name of the plan
|
|
||||||
layout object JSON representation of the seating plan. These
|
|
||||||
representations follow a JSON schema that currently
|
|
||||||
still evolves. The version in use can be found `here`_.
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
This endpoint has been added.
|
|
||||||
|
|
||||||
Endpoints
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/seatingplans/
|
|
||||||
|
|
||||||
Returns a list of all seating plans within a given organizer.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/seatingplans/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"name": "Main plan",
|
|
||||||
"layout": { … }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/seatingplans/(id)/
|
|
||||||
|
|
||||||
Returns information on one plan, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/seatingplans/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"name": "Main plan",
|
|
||||||
"layout": { … }
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param id: The ``id`` field of the seating plan to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/seatingplans/
|
|
||||||
|
|
||||||
Creates a new seating plan
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/seatingplans/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Main plan",
|
|
||||||
"layout": { … }
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"name": "Main plan",
|
|
||||||
"layout": { … }
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to create a seating plan for
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 400: The seating plan could not be created due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
|
|
||||||
.. http:patch:: /api/v1/organizers/(organizer)/seatingplans/(id)/
|
|
||||||
|
|
||||||
Update a plan. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of
|
|
||||||
the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you
|
|
||||||
want to change.
|
|
||||||
|
|
||||||
You can change all fields of the resource except the ``id`` field. **You can not change a plan while it is in use for
|
|
||||||
any events.**
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/seatingplans/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 94
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Old plan"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "Old plan",
|
|
||||||
"layout": { … }
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param id: The ``id`` field of the plan to modify
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The plan could not be modified due to invalid submitted data
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to change this resource **or** the plan is currently in use.
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/seatingplans/(id)/
|
|
||||||
|
|
||||||
Delete a plan. You can not delete plans which are currently in use by any events.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/seatingplans/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 204 No Content
|
|
||||||
Vary: Accept
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param id: The ``id`` field of the plan to delete
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to delete this resource **or** the plan is currently in use.
|
|
||||||
|
|
||||||
|
|
||||||
.. _here: https://github.com/pretix/pretix/blob/master/src/pretix/static/seating/seating-plan.schema.json
|
|
||||||
@@ -1,9 +1,3 @@
|
|||||||
.. spelling::
|
|
||||||
|
|
||||||
geo
|
|
||||||
lat
|
|
||||||
lon
|
|
||||||
|
|
||||||
.. _rest-subevents:
|
.. _rest-subevents:
|
||||||
|
|
||||||
Event series dates / Sub-events
|
Event series dates / Sub-events
|
||||||
@@ -34,23 +28,15 @@ date_admission datetime The sub-event's
|
|||||||
presale_start datetime The sub-date at which the ticket shop opens (or ``null``)
|
presale_start datetime The sub-date at which the ticket shop opens (or ``null``)
|
||||||
presale_end datetime The sub-date at which the ticket shop closes (or ``null``)
|
presale_end datetime The sub-date at which the ticket shop closes (or ``null``)
|
||||||
location multi-lingual string The sub-event location (or ``null``)
|
location multi-lingual string The sub-event location (or ``null``)
|
||||||
geo_lat float Latitude of the location (or ``null``)
|
|
||||||
geo_lon float Longitude of the location (or ``null``)
|
|
||||||
item_price_overrides list of objects List of items for which this sub-event overrides the
|
item_price_overrides list of objects List of items for which this sub-event overrides the
|
||||||
default price
|
default price
|
||||||
├ item integer The internal item ID
|
├ item integer The internal item ID
|
||||||
├ disabled boolean If ``true``, item should not be available for this sub-event
|
|
||||||
└ price money (string) The price or ``null`` for the default price
|
└ price money (string) The price or ``null`` for the default price
|
||||||
variation_price_overrides list of objects List of variations for which this sub-event overrides
|
variation_price_overrides list of objects List of variations for which this sub-event overrides
|
||||||
the default price
|
the default price
|
||||||
├ variation integer The internal variation ID
|
├ variation integer The internal variation ID
|
||||||
├ disabled boolean If ``true``, variation should not be available for this sub-event
|
|
||||||
└ price money (string) The price or ``null`` for the default price
|
└ price money (string) The price or ``null`` for the default price
|
||||||
meta_data object Values set for organizer-specific meta data parameters.
|
meta_data dict Values set for organizer-specific meta data parameters.
|
||||||
seating_plan integer If reserved seating is in use, the ID of a seating
|
|
||||||
plan. Otherwise ``null``.
|
|
||||||
seat_category_mapping object An object mapping categories of the seating plan
|
|
||||||
(strings) to items in the event (integers or ``null``).
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
@@ -68,25 +54,9 @@ seat_category_mapping object An object mappi
|
|||||||
|
|
||||||
The attribute ``is_public`` has been added.
|
The attribute ``is_public`` has been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The attributes ``seating_plan`` and ``seat_category_mapping`` have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
|
||||||
|
|
||||||
The attributes ``geo_lat`` and ``geo_lon`` have been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
|
||||||
|
|
||||||
The ``disabled`` attribute has been added to ``item_price_overrides`` and ``variation_price_overrides``.
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
|
||||||
|
|
||||||
The sub-events resource can now be filtered by meta data attributes.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/subevents/
|
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/subevents/
|
||||||
|
|
||||||
Returns a list of all sub-events of an event.
|
Returns a list of all sub-events of an event.
|
||||||
@@ -123,15 +93,10 @@ Endpoints
|
|||||||
"date_admission": null,
|
"date_admission": null,
|
||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "12.00"
|
"price": "12.00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -148,11 +113,6 @@ Endpoints
|
|||||||
:query ends_after: If set to a date and time, only events that happen during of after the given time are returned.
|
:query ends_after: If set to a date and time, only events that happen during of after the given time are returned.
|
||||||
:param organizer: The ``slug`` field of a valid organizer
|
:param organizer: The ``slug`` field of a valid organizer
|
||||||
:param event: The ``slug`` field of the main event
|
:param event: The ``slug`` field of the main event
|
||||||
:query array attr[meta_data_key]: By providing the key and value of a meta data attribute, the list of sub-events
|
|
||||||
will only contain the sub-events matching the set criteria. Providing ``?attr[Format]=Seminar`` would return
|
|
||||||
only those sub-events having set their ``Format`` meta data to ``Seminar``, ``?attr[Format]=`` only those, that
|
|
||||||
have no value set. Please note that this filter will respect default values set on
|
|
||||||
organizer or event level.
|
|
||||||
:statuscode 200: no error
|
:statuscode 200: no error
|
||||||
:statuscode 401: Authentication failure
|
:statuscode 401: Authentication failure
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view it.
|
:statuscode 403: The requested organizer does not exist **or** you have no permission to view it.
|
||||||
@@ -170,7 +130,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/events/sampleconf/subevents/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/events/sampleconf/subevents/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": {"en": "First Sample Conference"},
|
"name": {"en": "First Sample Conference"},
|
||||||
@@ -182,14 +142,9 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "12.00"
|
"price": "12.00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -217,14 +172,9 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "12.00"
|
"price": "12.00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -273,14 +223,9 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "12.00"
|
"price": "12.00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -310,14 +255,13 @@ Endpoints
|
|||||||
PATCH /api/v1/organizers/bigevents/events/sampleconf/subevents/1/ HTTP/1.1
|
PATCH /api/v1/organizers/bigevents/events/sampleconf/subevents/1/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": {"en": "New Subevent Name"},
|
"name": {"en": "New Subevent Name"},
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "23.42"
|
"price": "23.42"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -343,14 +287,9 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "23.42"
|
"price": "23.42"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -432,14 +371,9 @@ Endpoints
|
|||||||
"presale_start": null,
|
"presale_start": null,
|
||||||
"presale_end": null,
|
"presale_end": null,
|
||||||
"location": null,
|
"location": null,
|
||||||
"geo_lat": null,
|
|
||||||
"geo_lon": null,
|
|
||||||
"seating_plan": null,
|
|
||||||
"seat_category_mapping": {},
|
|
||||||
"item_price_overrides": [
|
"item_price_overrides": [
|
||||||
{
|
{
|
||||||
"item": 2,
|
"item": 2,
|
||||||
"disabled": false,
|
|
||||||
"price": "12.00"
|
"price": "12.00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,671 +0,0 @@
|
|||||||
.. spelling:: fullname
|
|
||||||
|
|
||||||
.. _`rest-teams`:
|
|
||||||
|
|
||||||
Teams
|
|
||||||
=====
|
|
||||||
|
|
||||||
.. warning:: Unlike our user interface, the team API **does** allow you to lock yourself out by deleting or modifying
|
|
||||||
the team your user or API key belongs to. Be careful around here!
|
|
||||||
|
|
||||||
Team resource
|
|
||||||
-------------
|
|
||||||
|
|
||||||
The team resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal ID of the team
|
|
||||||
name string Team name
|
|
||||||
all_events boolean Whether this team has access to all events
|
|
||||||
limit_events list List of event slugs this team has access to
|
|
||||||
can_create_events boolean
|
|
||||||
can_change_teams boolean
|
|
||||||
can_change_organizer_settings boolean
|
|
||||||
can_manage_gift_cards boolean
|
|
||||||
can_change_event_settings boolean
|
|
||||||
can_change_items boolean
|
|
||||||
can_view_orders boolean
|
|
||||||
can_change_orders boolean
|
|
||||||
can_view_vouchers boolean
|
|
||||||
can_change_vouchers boolean
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
Team member resource
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The team member resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal ID of the user
|
|
||||||
email string The user's email address
|
|
||||||
fullname string The user's full name (or ``null``)
|
|
||||||
require_2fa boolean Whether this user uses two-factor-authentication
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
Team invite resource
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The team invite resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal ID of the invite
|
|
||||||
email string The invitee's email address
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
Team API token resource
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
The team API token resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal ID of the invite
|
|
||||||
name string Name of this API token
|
|
||||||
active boolean Whether this API token is active (can never be set to
|
|
||||||
``true`` again once ``false``)
|
|
||||||
token string The actual API token. Will only be sent back during
|
|
||||||
token creation.
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
Team endpoints
|
|
||||||
--------------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/
|
|
||||||
|
|
||||||
Returns a list of all teams within a given organizer.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "Admin team",
|
|
||||||
"all_events": true,
|
|
||||||
"limit_events": [],
|
|
||||||
"can_create_events": true,
|
|
||||||
...
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(id)/
|
|
||||||
|
|
||||||
Returns information on one team, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "Admin team",
|
|
||||||
"all_events": true,
|
|
||||||
"limit_events": [],
|
|
||||||
"can_create_events": true,
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param id: The ``id`` field of the team to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/teams/
|
|
||||||
|
|
||||||
Creates a new team
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/teams/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "Admin team",
|
|
||||||
"all_events": true,
|
|
||||||
"limit_events": [],
|
|
||||||
"can_create_events": true,
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"name": "Admin team",
|
|
||||||
"all_events": true,
|
|
||||||
"limit_events": [],
|
|
||||||
"can_create_events": true,
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to create a team for
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 400: The team could not be created due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
|
|
||||||
.. http:patch:: /api/v1/organizers/(organizer)/teams/(id)/
|
|
||||||
|
|
||||||
Update a team. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of
|
|
||||||
the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you
|
|
||||||
want to change.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/teams/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 94
|
|
||||||
|
|
||||||
{
|
|
||||||
"can_create_events": true
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "Admin team",
|
|
||||||
"all_events": true,
|
|
||||||
"limit_events": [],
|
|
||||||
"can_create_events": true,
|
|
||||||
...
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param id: The ``id`` field of the team to modify
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The team could not be modified due to invalid submitted data
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to change this resource.
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/teams/(id)/
|
|
||||||
|
|
||||||
Deletes a team.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/teams/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 204 No Content
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param id: The ``id`` field of the team to delete
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to change this resource.
|
|
||||||
|
|
||||||
Team member endpoints
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(team)/members/
|
|
||||||
|
|
||||||
Returns a list of all members of a team.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/members/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"fullname": "John Doe",
|
|
||||||
"email": "john@example.com",
|
|
||||||
"require_2fa": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param team: The ``id`` field of the team to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested team does not exist
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(team)/members/(id)/
|
|
||||||
|
|
||||||
Returns information on one team member, identified by their ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/members/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"fullname": "John Doe",
|
|
||||||
"email": "john@example.com",
|
|
||||||
"require_2fa": true
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param team: The ``id`` field of the team to fetch
|
|
||||||
:param id: The ``id`` field of the member to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested team or member does not exist
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/teams/(team)/members/(id)/
|
|
||||||
|
|
||||||
Removes a member from the team.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/teams/1/members/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 204 No Content
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param team: The ``id`` field of the team to modify
|
|
||||||
:param id: The ``id`` field of the member to delete
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
:statuscode 404: The requested team or member does not exist
|
|
||||||
|
|
||||||
Team invite endpoints
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(team)/invites/
|
|
||||||
|
|
||||||
Returns a list of all invitations to a team.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/invites/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"email": "john@example.com"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param team: The ``id`` field of the team to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested team does not exist
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(team)/invites/(id)/
|
|
||||||
|
|
||||||
Returns information on one invite, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/invites/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"email": "john@example.org"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param team: The ``id`` field of the team to fetch
|
|
||||||
:param id: The ``id`` field of the invite to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested team or invite does not exist
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/teams/(team)/invites/
|
|
||||||
|
|
||||||
Invites someone into the team. Note that if the user already has a pretix account, you will receive a response without
|
|
||||||
an ``id`` and instead of an invite being created, the user will be directly added to the team.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/teams/1/invites/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 94
|
|
||||||
|
|
||||||
{
|
|
||||||
"email": "mark@example.org"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"email": "mark@example.org"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param team: The ``id`` field of the team to modify
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
:statuscode 404: The requested team does not exist
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/teams/(team)/invites/(id)/
|
|
||||||
|
|
||||||
Revokes an invite.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/teams/1/invites/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 204 No Content
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param team: The ``id`` field of the team to modify
|
|
||||||
:param id: The ``id`` field of the invite to delete
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
:statuscode 404: The requested team or invite does not exist
|
|
||||||
|
|
||||||
Team API token endpoints
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(team)/tokens/
|
|
||||||
|
|
||||||
Returns a list of all API tokens of a team.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/tokens/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"active": true,
|
|
||||||
"name": "Test token"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query integer page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param team: The ``id`` field of the team to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested team does not exist
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/teams/(team)/tokens/(id)/
|
|
||||||
|
|
||||||
Returns information on one token, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/teams/1/tokens/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"active": true,
|
|
||||||
"name": "Test token"
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param team: The ``id`` field of the team to fetch
|
|
||||||
:param id: The ``id`` field of the token to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to view this resource.
|
|
||||||
:statuscode 404: The requested team or token does not exist
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/teams/(team)/tokens/
|
|
||||||
|
|
||||||
Creates a new token.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/teams/1/tokens/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 94
|
|
||||||
|
|
||||||
{
|
|
||||||
"name": "New token"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"name": "New token",
|
|
||||||
"active": true,
|
|
||||||
"token": "",
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param team: The ``id`` field of the team to create a token for
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
:statuscode 404: The requested team does not exist
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/teams/(team)/tokens/(id)/
|
|
||||||
|
|
||||||
Disables a token.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/teams/1/tokens/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "My token",
|
|
||||||
"active": false
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param team: The ``id`` field of the team to modify
|
|
||||||
:param id: The ``id`` field of the token to delete
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer does not exist **or** you have no permission to create this resource.
|
|
||||||
:statuscode 404: The requested team or token does not exist
|
|
||||||
@@ -38,11 +38,9 @@ quota integer An ID of a quot
|
|||||||
attached either to a specific product or to all
|
attached either to a specific product or to all
|
||||||
products within one quota or it can be available
|
products within one quota or it can be available
|
||||||
for all items without restriction.
|
for all items without restriction.
|
||||||
seat string ``seat_guid`` attribute of a specific seat (or ``null``)
|
|
||||||
tag string A string that is used for grouping vouchers
|
tag string A string that is used for grouping vouchers
|
||||||
comment string An internal comment on the voucher
|
comment string An internal comment on the voucher
|
||||||
subevent integer ID of the date inside an event series this voucher belongs to (or ``null``).
|
subevent integer ID of the date inside an event series this voucher belongs to (or ``null``).
|
||||||
show_hidden_items boolean Only if set to ``true``, this voucher allows to buy products with the property ``hide_without_voucher``. Defaults to ``true``.
|
|
||||||
===================================== ========================== =======================================================
|
===================================== ========================== =======================================================
|
||||||
|
|
||||||
|
|
||||||
@@ -50,14 +48,6 @@ show_hidden_items boolean Only if set to
|
|||||||
|
|
||||||
The write operations ``POST``, ``PATCH``, ``PUT``, and ``DELETE`` have been added.
|
The write operations ``POST``, ``PATCH``, ``PUT``, and ``DELETE`` have been added.
|
||||||
|
|
||||||
.. versionchanged:: 3.0
|
|
||||||
|
|
||||||
The attribute ``show_hidden_items`` has been added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.4
|
|
||||||
|
|
||||||
The attribute ``seat`` has been added.
|
|
||||||
|
|
||||||
Endpoints
|
Endpoints
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -101,8 +91,7 @@ Endpoints
|
|||||||
"quota": null,
|
"quota": null,
|
||||||
"tag": "testvoucher",
|
"tag": "testvoucher",
|
||||||
"comment": "",
|
"comment": "",
|
||||||
"seat": null,
|
"subevent": null
|
||||||
"subevent": null,
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -168,7 +157,6 @@ Endpoints
|
|||||||
"quota": null,
|
"quota": null,
|
||||||
"tag": "testvoucher",
|
"tag": "testvoucher",
|
||||||
"comment": "",
|
"comment": "",
|
||||||
"seat": null,
|
|
||||||
"subevent": null
|
"subevent": null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +220,6 @@ Endpoints
|
|||||||
"quota": null,
|
"quota": null,
|
||||||
"tag": "testvoucher",
|
"tag": "testvoucher",
|
||||||
"comment": "",
|
"comment": "",
|
||||||
"seat": null,
|
|
||||||
"subevent": null
|
"subevent": null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,7 +347,6 @@ Endpoints
|
|||||||
"quota": null,
|
"quota": null,
|
||||||
"tag": "testvoucher",
|
"tag": "testvoucher",
|
||||||
"comment": "",
|
"comment": "",
|
||||||
"seat": null,
|
|
||||||
"subevent": null
|
"subevent": null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ Endpoints
|
|||||||
POST /api/v1/organizers/bigevents/webhooks/ HTTP/1.1
|
POST /api/v1/organizers/bigevents/webhooks/ HTTP/1.1
|
||||||
Host: pretix.eu
|
Host: pretix.eu
|
||||||
Accept: application/json, text/javascript
|
Accept: application/json, text/javascript
|
||||||
Content-Type: application/json
|
Content: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
@@ -70,9 +70,6 @@ and ``checkin_list``.
|
|||||||
only include the minimum amount of data necessary for you to fetch the changed objects from our
|
only include the minimum amount of data necessary for you to fetch the changed objects from our
|
||||||
:ref:`rest-api` in an authenticated way.
|
:ref:`rest-api` in an authenticated way.
|
||||||
|
|
||||||
.. warning:: In very rare cases, you could receive the same webhook notification twice. We try to avoid it, but we
|
|
||||||
prefer it over missing a notification.
|
|
||||||
|
|
||||||
If you want to further prevent others from accessing your webhook URL, you can also use `Basic authentication`_ and
|
If you want to further prevent others from accessing your webhook URL, you can also use `Basic authentication`_ and
|
||||||
supply the URL to us in the format of ``https://username:password@domain.com/path/``.
|
supply the URL to us in the format of ``https://username:password@domain.com/path/``.
|
||||||
We recommend that you use HTTPS for your webhook URL and might require it in the future. If HTTPS is used, we require
|
We recommend that you use HTTPS for your webhook URL and might require it in the future. If HTTPS is used, we require
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ source_suffix = '.rst'
|
|||||||
#source_encoding = 'utf-8-sig'
|
#source_encoding = 'utf-8-sig'
|
||||||
|
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = 'index'
|
master_doc = 'contents'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'pretix'
|
project = 'pretix'
|
||||||
@@ -234,7 +234,7 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'pretix.tex', 'pretix Documentation',
|
('contents', 'pretix.tex', 'pretix Documentation',
|
||||||
'Raphael Michel', 'manual'),
|
'Raphael Michel', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
.. highlight:: python
|
|
||||||
:linenothreshold: 5
|
|
||||||
|
|
||||||
Pluggable authentication backends
|
|
||||||
=================================
|
|
||||||
|
|
||||||
Plugins can supply additional authentication backends. This is mainly useful in self-hosted installations
|
|
||||||
and allows you to use company-wide login mechanisms such as LDAP or OAuth for accessing pretix' backend.
|
|
||||||
|
|
||||||
Every authentication backend contains an implementation of the interface defined in ``pretix.base.auth.BaseAuthBackend``
|
|
||||||
(see below). Note that pretix authentication backends work differently than plain Django authentication backends.
|
|
||||||
Basically, three pre-defined flows are supported:
|
|
||||||
|
|
||||||
* Authentication mechanisms that rely on a **set of input parameters**, e.g. a username and a password. These can be
|
|
||||||
implemented by supplying the ``login_form_fields`` property and a ``form_authenticate`` method.
|
|
||||||
|
|
||||||
* Authentication mechanisms that rely on **external sessions**, e.g. a cookie or a proxy HTTP header. These can be
|
|
||||||
implemented by supplying a ``request_authenticate`` method.
|
|
||||||
|
|
||||||
* Authentication mechanisms that rely on **redirection**, e.g. to an OAuth provider. These can be implemented by
|
|
||||||
supplying a ``authentication_url`` method and implementing a custom return view.
|
|
||||||
|
|
||||||
Authentication backends are *not* collected through a signal. Instead, they must explicitly be set through the
|
|
||||||
``auth_backends`` directive in the ``pretix.cfg`` :ref:`configuration file <config>`.
|
|
||||||
|
|
||||||
In each of these methods (``form_authenticate``, ``request_authenticate`` or your custom view) you are supposed to
|
|
||||||
either get an existing :py:class:`pretix.base.models.User` object from the database or create a new one. There are a
|
|
||||||
few rules you need to follow:
|
|
||||||
|
|
||||||
* You **MUST** only return users with the ``auth_backend`` attribute set to the ``identifier`` value of your backend.
|
|
||||||
|
|
||||||
* You **MUST** create new users with the ``auth_backend`` attribute set to the ``identifier`` value of your backend.
|
|
||||||
|
|
||||||
* Every user object **MUST** have an email address. Email addresses are globally unique. If the email address is
|
|
||||||
already registered to a user who signs in through a different backend, you **SHOULD** refuse the login.
|
|
||||||
|
|
||||||
The backend interface
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
.. class:: pretix.base.auth.BaseAuthBackend
|
|
||||||
|
|
||||||
The central object of each backend is the subclass of ``BaseAuthBackend``.
|
|
||||||
|
|
||||||
.. autoattribute:: identifier
|
|
||||||
|
|
||||||
This is an abstract attribute, you **must** override this!
|
|
||||||
|
|
||||||
.. autoattribute:: verbose_name
|
|
||||||
|
|
||||||
This is an abstract attribute, you **must** override this!
|
|
||||||
|
|
||||||
.. autoattribute:: login_form_fields
|
|
||||||
|
|
||||||
.. autoattribute:: visible
|
|
||||||
|
|
||||||
.. automethod:: form_authenticate
|
|
||||||
|
|
||||||
.. automethod:: request_authenticate
|
|
||||||
|
|
||||||
.. automethod:: authentication_url
|
|
||||||
|
|
||||||
Logging users in
|
|
||||||
----------------
|
|
||||||
|
|
||||||
If you return a user from ``form_authenticate`` or ``request_authenticate``, the system will handle everything else
|
|
||||||
for you correctly. However, if you use a redirection method and build a custom view to verify the login, we strongly
|
|
||||||
recommend that you use the following utility method to correctly set session values and enforce two-factor
|
|
||||||
authentication (if activated):
|
|
||||||
|
|
||||||
.. autofunction:: pretix.control.views.auth.process_login
|
|
||||||
@@ -66,7 +66,7 @@ event-related views, there is also a signal that allows you to add the view to t
|
|||||||
|
|
||||||
from django.urls import resolve, reverse
|
from django.urls import resolve, reverse
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from pretix.control.signals import nav_event
|
from pretix.control.signals import nav_event
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -101,12 +101,9 @@ The template is passed the following context variables:
|
|||||||
The ``Event`` object
|
The ``Event`` object
|
||||||
|
|
||||||
``signature`` (optional, only if configured)
|
``signature`` (optional, only if configured)
|
||||||
The signature with event organizer contact details as markdown (render with ``{{ signature|safe }}``)
|
The body as markdown (render with ``{{ signature|safe }}``)
|
||||||
|
|
||||||
``order`` (optional, only if applicable)
|
``order`` (optional, only if applicable)
|
||||||
The ``Order`` object
|
The ``Order`` object
|
||||||
|
|
||||||
``position`` (optional, only if applicable)
|
|
||||||
The ``OrderPosition`` object
|
|
||||||
|
|
||||||
.. _inlinestyler: https://pypi.org/project/inlinestyler/
|
.. _inlinestyler: https://pypi.org/project/inlinestyler/
|
||||||
|
|||||||
@@ -29,22 +29,6 @@ that we'll provide in this plugin::
|
|||||||
from .exporter import MyExporter
|
from .exporter import MyExporter
|
||||||
return MyExporter
|
return MyExporter
|
||||||
|
|
||||||
Some exporters might also prove to be useful, when provided on an organizer-level. In order to declare your
|
|
||||||
exporter as capable of providing exports spanning multiple events, your plugin should listen for this signal
|
|
||||||
and return the subclass of ``pretix.base.exporter.BaseExporter`` that we'll provide in this plugin::
|
|
||||||
|
|
||||||
from django.dispatch import receiver
|
|
||||||
|
|
||||||
from pretix.base.signals import register_multievent_data_exporters
|
|
||||||
|
|
||||||
|
|
||||||
@receiver(register_multievent_data_exporters, dispatch_uid="multieventexporter_myexporter")
|
|
||||||
def register_multievent_data_exporter(sender, **kwargs):
|
|
||||||
from .exporter import MyExporter
|
|
||||||
return MyExporter
|
|
||||||
|
|
||||||
If your exporter supports both event-level and multi-event level exports, you will need to listen for both
|
|
||||||
signals.
|
|
||||||
|
|
||||||
The exporter class
|
The exporter class
|
||||||
------------------
|
------------------
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Core
|
|||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
.. automodule:: pretix.base.signals
|
||||||
:members: periodic_task, event_live_issues, event_copy_data, email_filter, register_notification_types,
|
:members: periodic_task, event_live_issues, event_copy_data, email_filter, register_notification_types,
|
||||||
item_copy_data, register_sales_channels, register_global_settings, quota_availability, global_email_filter
|
item_copy_data, register_sales_channels, register_global_settings
|
||||||
|
|
||||||
Order events
|
Order events
|
||||||
""""""""""""
|
""""""""""""
|
||||||
@@ -20,24 +20,13 @@ Order events
|
|||||||
There are multiple signals that will be sent out in the ordering cycle:
|
There are multiple signals that will be sent out in the ordering cycle:
|
||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
.. automodule:: pretix.base.signals
|
||||||
:members: validate_cart, validate_cart_addons, validate_order, order_fee_calculation, order_paid, order_placed, order_canceled, order_reactivated, order_expired, order_modified, order_changed, order_approved, order_denied, order_fee_type_name, allow_ticket_download, order_split, order_gracefully_delete, invoice_line_text
|
:members: validate_cart, order_fee_calculation, order_paid, order_placed, order_canceled, order_expired, order_modified, order_changed, order_approved, order_denied, order_fee_type_name, allow_ticket_download
|
||||||
|
|
||||||
Check-ins
|
|
||||||
"""""""""
|
|
||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
|
||||||
:members: checkin_created
|
|
||||||
|
|
||||||
|
|
||||||
Frontend
|
Frontend
|
||||||
--------
|
--------
|
||||||
|
|
||||||
.. automodule:: pretix.presale.signals
|
.. automodule:: pretix.presale.signals
|
||||||
:members: html_head, html_footer, footer_link, front_page_top, front_page_bottom, front_page_bottom_widget, fee_calculation_for_cart, contact_form_fields, question_form_fields, checkout_confirm_messages, checkout_confirm_page_content, checkout_all_optional, html_page_header, sass_preamble, sass_postamble, render_seating_plan, checkout_flow_steps, position_info, position_info_top, item_description, global_html_head, global_html_footer, global_html_page_header
|
:members: html_head, html_footer, footer_link, front_page_top, front_page_bottom, fee_calculation_for_cart, contact_form_fields, question_form_fields, checkout_confirm_messages, checkout_confirm_page_content, checkout_all_optional, html_page_header, sass_preamble, sass_postamble, checkout_flow_steps, order_info, order_meta_from_request
|
||||||
|
|
||||||
|
|
||||||
.. automodule:: pretix.presale.signals
|
|
||||||
:members: order_info, order_info_top, order_meta_from_request
|
|
||||||
|
|
||||||
Request flow
|
Request flow
|
||||||
""""""""""""
|
""""""""""""
|
||||||
@@ -56,35 +45,32 @@ Backend
|
|||||||
|
|
||||||
.. automodule:: pretix.control.signals
|
.. automodule:: pretix.control.signals
|
||||||
:members: nav_event, html_head, html_page_start, quota_detail_html, nav_topbar, nav_global, nav_organizer, nav_event_settings,
|
:members: nav_event, html_head, html_page_start, quota_detail_html, nav_topbar, nav_global, nav_organizer, nav_event_settings,
|
||||||
order_info, event_settings_widget, oauth_application_registered, order_position_buttons, subevent_forms,
|
order_info, event_settings_widget, oauth_application_registered, order_position_buttons
|
||||||
item_formsets, order_search_filter_q
|
|
||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
.. automodule:: pretix.base.signals
|
||||||
:members: logentry_display, logentry_object_link, requiredaction_display, timeline_events
|
:members: logentry_display, logentry_object_link, requiredaction_display
|
||||||
|
|
||||||
Vouchers
|
Vouchers
|
||||||
""""""""
|
""""""""
|
||||||
|
|
||||||
.. automodule:: pretix.control.signals
|
.. automodule:: pretix.control.signals
|
||||||
:members: item_forms, voucher_form_class, voucher_form_html, voucher_form_validation
|
:members: item_forms
|
||||||
|
|
||||||
|
Vouchers
|
||||||
|
""""""""
|
||||||
|
|
||||||
|
.. automodule:: pretix.control.signals
|
||||||
|
:members: voucher_form_class, voucher_form_html, voucher_form_validation
|
||||||
|
|
||||||
Dashboards
|
Dashboards
|
||||||
""""""""""
|
""""""""""
|
||||||
|
|
||||||
.. automodule:: pretix.control.signals
|
.. automodule:: pretix.control.signals
|
||||||
:members: event_dashboard_widgets, user_dashboard_widgets, event_dashboard_top
|
:members: event_dashboard_widgets, user_dashboard_widgets
|
||||||
|
|
||||||
Ticket designs
|
Ticket designs
|
||||||
""""""""""""""
|
""""""""""""""
|
||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
.. automodule:: pretix.base.signals
|
||||||
:members: layout_text_variables
|
:members: layout_text_variables
|
||||||
|
|
||||||
.. automodule:: pretix.plugins.ticketoutputpdf.signals
|
|
||||||
:members: override_layout
|
|
||||||
|
|
||||||
API
|
|
||||||
---
|
|
||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
|
||||||
:members: validate_event_settings, api_event_settings_fields
|
|
||||||
|
|||||||
@@ -1,112 +0,0 @@
|
|||||||
.. highlight:: python
|
|
||||||
:linenothreshold: 5
|
|
||||||
|
|
||||||
.. _`importcol`:
|
|
||||||
|
|
||||||
Extending the order import process
|
|
||||||
==================================
|
|
||||||
|
|
||||||
It's possible through the backend to import orders into pretix, for example from a legacy ticketing system. If your
|
|
||||||
plugins defines additional data structures around orders, it might be useful to make it possible to import them as well.
|
|
||||||
|
|
||||||
Import process
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Here's a short description of pretix' import process to show you where the system will need to interact with your plugin.
|
|
||||||
You can find more detailed descriptions of the attributes and methods further below.
|
|
||||||
|
|
||||||
1. The user uploads a CSV file. The system tries to parse the CSV file and understand its column headers.
|
|
||||||
|
|
||||||
2. A preview of the file is shown to the user and the user is asked to assign the various different input parameters to
|
|
||||||
columns of the file or static values. For example, the user either needs to manually select a product or specify a
|
|
||||||
column that contains a product. For this purpose, a select field is rendered for every possible input column,
|
|
||||||
allowing the user to choose between a default/empty value (defined by your ``default_value``/``default_label``)
|
|
||||||
attributes, the columns of the uploaded file, or a static value (defined by your ``static_choices`` method).
|
|
||||||
|
|
||||||
3. The user submits its assignment and the system uses the ``resolve`` method of all columns to get the raw value for
|
|
||||||
all columns.
|
|
||||||
|
|
||||||
4. The system uses the ``clean`` method of all columns to verify that all input fields are valid and transformed to the
|
|
||||||
correct data type.
|
|
||||||
|
|
||||||
5. The system prepares internal model objects (``Order`` etc) and uses the ``assign`` method of all columns to assign
|
|
||||||
these objects with actual values.
|
|
||||||
|
|
||||||
6. The system saves all of these model objects to the database in a database transaction. Plugins can create additional
|
|
||||||
objects in this stage through their ``save`` method.
|
|
||||||
|
|
||||||
Column registration
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
The import API does not make a lot of usage from signals, however, it
|
|
||||||
does use a signal to get a list of all available import columns. Your plugin
|
|
||||||
should listen for this signal and return the subclass of ``pretix.base.orderimport.ImportColumn``
|
|
||||||
that we'll provide in this plugin:
|
|
||||||
|
|
||||||
.. sourcecode:: python
|
|
||||||
|
|
||||||
from django.dispatch import receiver
|
|
||||||
|
|
||||||
from pretix.base.signals import order_import_columns
|
|
||||||
|
|
||||||
|
|
||||||
@receiver(order_import_columns, dispatch_uid="custom_columns")
|
|
||||||
def register_column(sender, **kwargs):
|
|
||||||
return [
|
|
||||||
EmailColumn(sender),
|
|
||||||
]
|
|
||||||
|
|
||||||
The column class API
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
.. class:: pretix.base.orderimport.ImportColumn
|
|
||||||
|
|
||||||
The central object of each import extension is the subclass of ``ImportColumn``.
|
|
||||||
|
|
||||||
.. py:attribute:: ImportColumn.event
|
|
||||||
|
|
||||||
The default constructor sets this property to the event we are currently
|
|
||||||
working for.
|
|
||||||
|
|
||||||
.. autoattribute:: identifier
|
|
||||||
|
|
||||||
This is an abstract attribute, you **must** override this!
|
|
||||||
|
|
||||||
.. autoattribute:: verbose_name
|
|
||||||
|
|
||||||
This is an abstract attribute, you **must** override this!
|
|
||||||
|
|
||||||
.. autoattribute:: default_value
|
|
||||||
|
|
||||||
.. autoattribute:: default_label
|
|
||||||
|
|
||||||
.. autoattribute:: initial
|
|
||||||
|
|
||||||
.. automethod:: static_choices
|
|
||||||
|
|
||||||
.. automethod:: resolve
|
|
||||||
|
|
||||||
.. automethod:: clean
|
|
||||||
|
|
||||||
.. automethod:: assign
|
|
||||||
|
|
||||||
.. automethod:: save
|
|
||||||
|
|
||||||
Example
|
|
||||||
-------
|
|
||||||
|
|
||||||
For example, the import column responsible for assigning email addresses looks like this:
|
|
||||||
|
|
||||||
.. sourcecode:: python
|
|
||||||
|
|
||||||
class EmailColumn(ImportColumn):
|
|
||||||
identifier = 'email'
|
|
||||||
verbose_name = _('E-mail address')
|
|
||||||
|
|
||||||
def clean(self, value, previous_values):
|
|
||||||
if value:
|
|
||||||
EmailValidator()(value)
|
|
||||||
return value
|
|
||||||
|
|
||||||
def assign(self, value, order, position, invoice_address, **kwargs):
|
|
||||||
order.email = value
|
|
||||||
@@ -12,11 +12,8 @@ Contents:
|
|||||||
payment
|
payment
|
||||||
payment_2.0
|
payment_2.0
|
||||||
email
|
email
|
||||||
placeholder
|
|
||||||
invoice
|
invoice
|
||||||
shredder
|
shredder
|
||||||
import
|
|
||||||
customview
|
customview
|
||||||
auth
|
|
||||||
general
|
general
|
||||||
quality
|
quality
|
||||||
|
|||||||
@@ -62,8 +62,6 @@ The provider class
|
|||||||
|
|
||||||
.. autoattribute:: is_enabled
|
.. autoattribute:: is_enabled
|
||||||
|
|
||||||
.. autoattribute:: priority
|
|
||||||
|
|
||||||
.. autoattribute:: settings_form_fields
|
.. autoattribute:: settings_form_fields
|
||||||
|
|
||||||
.. automethod:: settings_form_clean
|
.. automethod:: settings_form_clean
|
||||||
@@ -110,24 +108,14 @@ The provider class
|
|||||||
|
|
||||||
.. automethod:: execute_refund
|
.. automethod:: execute_refund
|
||||||
|
|
||||||
.. automethod:: refund_control_render
|
|
||||||
|
|
||||||
.. automethod:: api_payment_details
|
|
||||||
|
|
||||||
.. automethod:: matching_id
|
|
||||||
|
|
||||||
.. automethod:: shred_payment_info
|
.. automethod:: shred_payment_info
|
||||||
|
|
||||||
.. automethod:: cancel_payment
|
|
||||||
|
|
||||||
.. autoattribute:: is_implicit
|
.. autoattribute:: is_implicit
|
||||||
|
|
||||||
.. autoattribute:: is_meta
|
.. autoattribute:: is_meta
|
||||||
|
|
||||||
.. autoattribute:: test_mode_message
|
.. autoattribute:: test_mode_message
|
||||||
|
|
||||||
.. autoattribute:: requires_invoice_immediately
|
|
||||||
|
|
||||||
|
|
||||||
Additional views
|
Additional views
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
.. highlight:: python
|
|
||||||
:linenothreshold: 5
|
|
||||||
|
|
||||||
Writing an e-mail placeholder plugin
|
|
||||||
====================================
|
|
||||||
|
|
||||||
An email placeholder is a dynamic value that pretix users can use in their email templates.
|
|
||||||
|
|
||||||
Please read :ref:`Creating a plugin <pluginsetup>` first, if you haven't already.
|
|
||||||
|
|
||||||
Placeholder registration
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
The placeholder API does not make a lot of usage from signals, however, it
|
|
||||||
does use a signal to get a list of all available email placeholders. Your plugin
|
|
||||||
should listen for this signal and return an instance of a subclass of ``pretix.base.email.BaseMailTextPlaceholder``::
|
|
||||||
|
|
||||||
from django.dispatch import receiver
|
|
||||||
|
|
||||||
from pretix.base.signals import register_mail_placeholders
|
|
||||||
|
|
||||||
|
|
||||||
@receiver(register_mail_placeholders, dispatch_uid="placeholder_custom")
|
|
||||||
def register_mail_renderers(sender, **kwargs):
|
|
||||||
from .email import MyPlaceholderClass
|
|
||||||
return MyPlaceholder()
|
|
||||||
|
|
||||||
|
|
||||||
Context mechanism
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Emails are sent in different "contexts" within pretix. For example, many emails are sent in the
|
|
||||||
the context of an order, but some are not, such as the notification of a waiting list voucher.
|
|
||||||
|
|
||||||
Not all placeholders make sense in every email, and placeholders usually depend some parameters
|
|
||||||
themselves, such as the ``Order`` object. Therefore, placeholders are expected to explicitly declare
|
|
||||||
what values they depend on and they will only be available in an email if all those dependencies are
|
|
||||||
met. Currently, placeholders can depend on the following context parameters:
|
|
||||||
|
|
||||||
* ``event``
|
|
||||||
* ``order``
|
|
||||||
* ``position``
|
|
||||||
* ``waiting_list_entry``
|
|
||||||
* ``invoice_address``
|
|
||||||
* ``payment``
|
|
||||||
|
|
||||||
There are a few more that are only to be used internally but not by plugins.
|
|
||||||
|
|
||||||
The placeholder class
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
.. class:: pretix.base.email.BaseMailTextPlaceholder
|
|
||||||
|
|
||||||
.. autoattribute:: identifier
|
|
||||||
|
|
||||||
This is an abstract attribute, you **must** override this!
|
|
||||||
|
|
||||||
.. autoattribute:: required_context
|
|
||||||
|
|
||||||
This is an abstract attribute, you **must** override this!
|
|
||||||
|
|
||||||
.. automethod:: render
|
|
||||||
|
|
||||||
This is an abstract method, you **must** implement this!
|
|
||||||
|
|
||||||
.. automethod:: render_sample
|
|
||||||
|
|
||||||
This is an abstract method, you **must** implement this!
|
|
||||||
|
|
||||||
Helper class for simple placeholders
|
|
||||||
------------------------------------
|
|
||||||
|
|
||||||
pretix ships with a helper class that makes it easy to provide placeholders based on simple
|
|
||||||
functions::
|
|
||||||
|
|
||||||
placeholder = SimpleFunctionalMailTextPlaceholder(
|
|
||||||
'code', ['order'], lambda order: order.code, sample='F8VVL'
|
|
||||||
)
|
|
||||||
|
|
||||||
@@ -46,9 +46,6 @@ name string The human-readable name of your plugin
|
|||||||
author string Your name
|
author string Your name
|
||||||
version string A human-readable version code of your plugin
|
version string A human-readable version code of your plugin
|
||||||
description string A more verbose description of what your plugin does.
|
description string A more verbose description of what your plugin does.
|
||||||
category string Category of a plugin. Either one of ``"FEATURE"``, ``"PAYMENT"``,
|
|
||||||
``"INTEGRATION"``, ``"CUSTOMIZATION"``, ``"FORMAT"``, or ``"API"``,
|
|
||||||
or any other string.
|
|
||||||
visible boolean (optional) ``True`` by default, can hide a plugin so it cannot be normally activated.
|
visible boolean (optional) ``True`` by default, can hide a plugin so it cannot be normally activated.
|
||||||
restricted boolean (optional) ``False`` by default, restricts a plugin such that it can only be enabled
|
restricted boolean (optional) ``False`` by default, restricts a plugin such that it can only be enabled
|
||||||
for an event by system administrators / superusers.
|
for an event by system administrators / superusers.
|
||||||
@@ -61,7 +58,7 @@ A working example would be::
|
|||||||
from pretix.base.plugins import PluginConfig
|
from pretix.base.plugins import PluginConfig
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
|
raise RuntimeError("Please use pretix 2.7 or above to run this plugin!")
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class PaypalApp(PluginConfig):
|
class PaypalApp(PluginConfig):
|
||||||
@@ -72,7 +69,6 @@ A working example would be::
|
|||||||
name = _("PayPal")
|
name = _("PayPal")
|
||||||
author = _("the pretix team")
|
author = _("the pretix team")
|
||||||
version = '1.0.0'
|
version = '1.0.0'
|
||||||
category = 'PAYMENT
|
|
||||||
visible = True
|
visible = True
|
||||||
restricted = False
|
restricted = False
|
||||||
description = _("This plugin allows you to receive payments via PayPal")
|
description = _("This plugin allows you to receive payments via PayPal")
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ The shredder class
|
|||||||
|
|
||||||
.. class:: pretix.base.shredder.BaseDataShredder
|
.. class:: pretix.base.shredder.BaseDataShredder
|
||||||
|
|
||||||
The central object of each data shredder is the subclass of ``BaseDataShredder``.
|
The central object of each invoice renderer is the subclass of ``BaseInvoiceRenderer``.
|
||||||
|
|
||||||
.. py:attribute:: BaseDataShredder.event
|
.. py:attribute:: BaseInvoiceRenderer.event
|
||||||
|
|
||||||
The default constructor sets this property to the event we are currently
|
The default constructor sets this property to the event we are currently
|
||||||
working for.
|
working for.
|
||||||
|
|||||||
@@ -69,13 +69,3 @@ The output class
|
|||||||
.. automethod:: generate_order
|
.. automethod:: generate_order
|
||||||
|
|
||||||
.. autoattribute:: download_button_text
|
.. autoattribute:: download_button_text
|
||||||
|
|
||||||
.. autoattribute:: download_button_icon
|
|
||||||
|
|
||||||
.. autoattribute:: multi_download_button_text
|
|
||||||
|
|
||||||
.. autoattribute:: long_download_button_text
|
|
||||||
|
|
||||||
.. autoattribute:: preview_allowed
|
|
||||||
|
|
||||||
.. autoattribute:: javascript_required
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Coding style and quality
|
|||||||
for more information. Use four spaces for indentation.
|
for more information. Use four spaces for indentation.
|
||||||
|
|
||||||
* We sort our imports by a certain schema, but you don't have to do this by hand. Again, ``setup.cfg`` contains
|
* We sort our imports by a certain schema, but you don't have to do this by hand. Again, ``setup.cfg`` contains
|
||||||
some definitions that allow the command ``isort <directory>`` to automatically sort the imports in your source
|
some definitions that allow the command ``isort -rc <directory>`` to automatically sort the imports in your source
|
||||||
files.
|
files.
|
||||||
|
|
||||||
* For templates and models, please take a look at the `Django Coding Style`_. We like Django's `class-based views`_ and
|
* For templates and models, please take a look at the `Django Coding Style`_. We like Django's `class-based views`_ and
|
||||||
@@ -18,7 +18,7 @@ Coding style and quality
|
|||||||
* We expect all new code to come with proper tests. When writing new tests, please write them using `pytest-style`_
|
* We expect all new code to come with proper tests. When writing new tests, please write them using `pytest-style`_
|
||||||
test functions and raw ``assert`` statements. Use `fixtures`_ to prevent repetitive code. Some old parts of pretix'
|
test functions and raw ``assert`` statements. Use `fixtures`_ to prevent repetitive code. Some old parts of pretix'
|
||||||
test suite are in the style of Python's unit test module. If you extend those files, you might continue in this style,
|
test suite are in the style of Python's unit test module. If you extend those files, you might continue in this style,
|
||||||
but please use ``pytest`` style for any new test files.
|
but please use pytest style for any new test files.
|
||||||
|
|
||||||
* Please keep the first line of your commit messages short. When referencing an issue, please phrase it like
|
* Please keep the first line of your commit messages short. When referencing an issue, please phrase it like
|
||||||
``Fix #123 -- Problems with order creation`` or ``Refs #123 -- Fix this part of that bug``.
|
``Fix #123 -- Problems with order creation`` or ``Refs #123 -- Fix this part of that bug``.
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ We now need a way to translate the action codes like ``pretix.event.changed`` in
|
|||||||
strings. The :py:attr:`pretix.base.signals.logentry_display` signals allows you to do so. A simple
|
strings. The :py:attr:`pretix.base.signals.logentry_display` signals allows you to do so. A simple
|
||||||
implementation could look like::
|
implementation could look like::
|
||||||
|
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from pretix.base.signals import logentry_display
|
from pretix.base.signals import logentry_display
|
||||||
|
|
||||||
@receiver(signal=logentry_display)
|
@receiver(signal=logentry_display)
|
||||||
|
|||||||
@@ -21,12 +21,10 @@ Your should install the following on your system:
|
|||||||
* Python 3.5 or newer
|
* Python 3.5 or newer
|
||||||
* ``pip`` for Python 3 (Debian package: ``python3-pip``)
|
* ``pip`` for Python 3 (Debian package: ``python3-pip``)
|
||||||
* ``python-dev`` for Python 3 (Debian package: ``python3-dev``)
|
* ``python-dev`` for Python 3 (Debian package: ``python3-dev``)
|
||||||
* On Debian/Ubuntu: ``python-venv`` for Python 3 (Debian package: ``python3-venv``)
|
|
||||||
* ``libffi`` (Debian package: ``libffi-dev``)
|
* ``libffi`` (Debian package: ``libffi-dev``)
|
||||||
* ``libssl`` (Debian package: ``libssl-dev``)
|
* ``libssl`` (Debian package: ``libssl-dev``)
|
||||||
* ``libxml2`` (Debian package ``libxml2-dev``)
|
* ``libxml2`` (Debian package ``libxml2-dev``)
|
||||||
* ``libxslt`` (Debian package ``libxslt1-dev``)
|
* ``libxslt`` (Debian package ``libxslt1-dev``)
|
||||||
* ``libenchant1c2a`` (Debian package ``libenchant1c2a``)
|
|
||||||
* ``msgfmt`` (Debian package ``gettext``)
|
* ``msgfmt`` (Debian package ``gettext``)
|
||||||
* ``git``
|
* ``git``
|
||||||
|
|
||||||
@@ -65,7 +63,9 @@ Then, create the local database::
|
|||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
|
|
||||||
A first user with username ``admin@localhost`` and password ``admin`` will be automatically
|
A first user with username ``admin@localhost`` and password ``admin`` will be automatically
|
||||||
created.
|
created. If you want to generate more test data, run::
|
||||||
|
|
||||||
|
python make_testdata.py
|
||||||
|
|
||||||
If you want to see pretix in a different language than English, you have to compile our language
|
If you want to see pretix in a different language than English, you have to compile our language
|
||||||
files::
|
files::
|
||||||
@@ -81,7 +81,8 @@ To run the local development webserver, execute::
|
|||||||
and head to http://localhost:8000/
|
and head to http://localhost:8000/
|
||||||
|
|
||||||
As we did not implement an overall front page yet, you need to go directly to
|
As we did not implement an overall front page yet, you need to go directly to
|
||||||
http://localhost:8000/control/ for the admin view.
|
http://localhost:8000/control/ for the admin view or, if you imported the test
|
||||||
|
data as suggested above, to the event page at http://localhost:8000/bigevents/2019/
|
||||||
|
|
||||||
.. note:: If you want the development server to listen on a different interface or
|
.. note:: If you want the development server to listen on a different interface or
|
||||||
port (for example because you develop on `pretixdroid`_), you can check
|
port (for example because you develop on `pretixdroid`_), you can check
|
||||||
@@ -98,7 +99,7 @@ pull request nevertheless and ask us for help, we are happy to assist you.
|
|||||||
Execute the following commands to check for code style errors::
|
Execute the following commands to check for code style errors::
|
||||||
|
|
||||||
flake8 .
|
flake8 .
|
||||||
isort -c .
|
isort -c -rc .
|
||||||
python manage.py check
|
python manage.py check
|
||||||
|
|
||||||
Execute the following command to run pretix' test suite (might take a couple of minutes)::
|
Execute the following command to run pretix' test suite (might take a couple of minutes)::
|
||||||
@@ -121,7 +122,7 @@ for example, to check for any errors in any staged files when committing::
|
|||||||
do
|
do
|
||||||
echo $file
|
echo $file
|
||||||
git show ":$file" | flake8 - --stdin-display-name="$file" || exit 1 # we only want to lint the staged changes, not any un-staged changes
|
git show ":$file" | flake8 - --stdin-display-name="$file" || exit 1 # we only want to lint the staged changes, not any un-staged changes
|
||||||
git show ":$file" | isort -c - | grep ERROR && exit 1 || true
|
git show ":$file" | isort -df --check-only - | grep ERROR && exit 1 || true
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
.. include:: contents.rst
|
|
||||||
@@ -1,224 +0,0 @@
|
|||||||
Campaigns
|
|
||||||
=========
|
|
||||||
|
|
||||||
The campaigns plugin provides a HTTP API that allows you to create new campaigns.
|
|
||||||
|
|
||||||
Resource description
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The campaign resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal campaign ID
|
|
||||||
code string The URL component of the campaign, e.g. with code ``BAR``
|
|
||||||
the campaign URL would to be ``https://<server>/<organizer>/<event>/c/BAR/``.
|
|
||||||
This value needs to be *globally unique* and we do not
|
|
||||||
recommend setting it manually. If you omit it, a random
|
|
||||||
value will be chosen.
|
|
||||||
description string An internal, human-readable name of the campaign.
|
|
||||||
external_target string An URL to redirect to from the tracking link. To redirect to
|
|
||||||
the ticket shop, use an empty string.
|
|
||||||
order_count integer Number of orders tracked on this campaign (read-only)
|
|
||||||
click_count integer Number of clicks tracked on this campaign (read-only)
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
Endpoints
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/campaigns/
|
|
||||||
|
|
||||||
Returns a list of all campaigns configured for an event.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/events/sampleconf/campaigns/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"code": "wZnL11fjq",
|
|
||||||
"description": "Facebook",
|
|
||||||
"external_target": "",
|
|
||||||
"order_count:" 0,
|
|
||||||
"click_count:" 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of a valid organizer
|
|
||||||
:param event: The ``slug`` field of the event to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer or event does not exist **or** you have no permission to view it.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/campaigns/(id)/
|
|
||||||
|
|
||||||
Returns information on one campaign, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/events/sampleconf/campaigns/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"code": "wZnL11fjq",
|
|
||||||
"description": "Facebook",
|
|
||||||
"external_target": "",
|
|
||||||
"order_count:" 0,
|
|
||||||
"click_count:" 0
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param event: The ``slug`` field of the event to fetch
|
|
||||||
:param id: The ``id`` field of the campaign to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event/campaign does not exist **or** you have no permission to view it.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/campaigns/
|
|
||||||
|
|
||||||
Create a new campaign.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/events/sampleconf/campaigns/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 166
|
|
||||||
|
|
||||||
{
|
|
||||||
"description": "Twitter"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"code": "IfVJQzSBL",
|
|
||||||
"description": "Twitter",
|
|
||||||
"external_target": "",
|
|
||||||
"order_count:" 0,
|
|
||||||
"click_count:" 0
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to create a campaign for
|
|
||||||
:param event: The ``slug`` field of the event to create a campaign for
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 400: The campaign could not be created due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to create campaigns.
|
|
||||||
|
|
||||||
|
|
||||||
.. http:patch:: /api/v1/organizers/(organizer)/events/(event)/campaigns/(id)/
|
|
||||||
|
|
||||||
Update a campaign. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of
|
|
||||||
the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you
|
|
||||||
want to change.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/events/sampleconf/campaigns/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 34
|
|
||||||
|
|
||||||
{
|
|
||||||
"external_target": "https://mywebsite.com"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: text/javascript
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"code": "IfVJQzSBL",
|
|
||||||
"description": "Twitter",
|
|
||||||
"external_target": "https://mywebsite.com",
|
|
||||||
"order_count:" 0,
|
|
||||||
"click_count:" 0
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param event: The ``slug`` field of the event to modify
|
|
||||||
:param id: The ``id`` field of the campaign to modify
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The campaign could not be modified due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event/campaign does not exist **or** you have no permission to change it.
|
|
||||||
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/events/(event)/campaigns/(id)/
|
|
||||||
|
|
||||||
Delete a campaign and all associated data.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/events/sampleconf/campaigns/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 204 No Content
|
|
||||||
Vary: Accept
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param event: The ``slug`` field of the event to modify
|
|
||||||
:param id: The ``id`` field of the campaign to delete
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event/campaign does not exist **or** you have no permission to change it
|
|
||||||
@@ -1,356 +0,0 @@
|
|||||||
Digital content
|
|
||||||
===============
|
|
||||||
|
|
||||||
URL interpolation and JWT authentication
|
|
||||||
----------------------------------------
|
|
||||||
|
|
||||||
In the simplest case, you can use the digital content module to point users to a specific piece of content on some
|
|
||||||
platform after their ticket purchase, or show them an embedded video or live stream. However, the full power of the
|
|
||||||
module can be utilized by passing additional information to the target system to automatically authenticate the user
|
|
||||||
or pre-fill some fields with their data. For example, you could use an URL like this::
|
|
||||||
|
|
||||||
https://webinars.example.com/join?as={attendee_name}&userid={order_code}-{positionid}
|
|
||||||
|
|
||||||
While this is already useful, it does not provide much security – anyone could guess a valid combination for that URL.
|
|
||||||
Therefore, the module allows you to pass information as a `JSON Web Token`_, which isn't encrypted, but signed with a
|
|
||||||
shared secret such that nobody can create their own tokens or modify the contents. To use a token, set up a URL like this::
|
|
||||||
|
|
||||||
https://webinars.example.com/join?with_token={token}
|
|
||||||
|
|
||||||
Additionally, you will need to set a JWT secret and a token template, either through the pretix interface or through the
|
|
||||||
API (see below). pretix currently only supports tokens signed with ``HMAC-SHA256`` (``HS256``). Your token template can contain
|
|
||||||
whatever JSON you'd like to pass on based on the same variables, for example::
|
|
||||||
|
|
||||||
{
|
|
||||||
"iss": "pretix.eu",
|
|
||||||
"aud": "webinars.example.com",
|
|
||||||
"user": {
|
|
||||||
"id": "{order_code}-{positionid}",
|
|
||||||
"product": "{product_id}",
|
|
||||||
"variation": "{variation_id}",
|
|
||||||
"name": "{attendee_name}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Variables can only be used in strings inside the JSON structure.
|
|
||||||
pretix will automatically add an ``iat`` claim with the current timestamp and an ``exp`` claim with an expiration timestamp
|
|
||||||
based on your configuration.
|
|
||||||
|
|
||||||
|
|
||||||
List of variables
|
|
||||||
"""""""""""""""""
|
|
||||||
|
|
||||||
The following variables are currently supported:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
=================================== ====================================================================
|
|
||||||
Variable Description
|
|
||||||
=================================== ====================================================================
|
|
||||||
``order_code`` Order code (alphanumerical, unique per order, not per ticket)
|
|
||||||
``positionid`` ID of the ticket within the order (integer, starting at 1)
|
|
||||||
``order_email`` E-mail address of the ticket purchaser
|
|
||||||
``product_id`` Internal ID of the purchased product
|
|
||||||
``product_variation`` Internal ID of the purchased product variation (or empty)
|
|
||||||
``attendee_name`` Full name of the ticket holder (or empty)
|
|
||||||
``attendee_name_*`` Name parts of the ticket holder, depending on configuration, e.g. ``attendee_name_given_name`` or ``attendee_name_family_name``
|
|
||||||
``attendee_email`` E-mail address of the ticket holder (or empty)
|
|
||||||
``attendee_company`` Company of the ticket holder (or empty)
|
|
||||||
``attendee_street`` Street of the ticket holder's address (or empty)
|
|
||||||
``attendee_zipcode`` ZIP code of the ticket holder's address (or empty)
|
|
||||||
``attendee_city`` City of the ticket holder's address (or empty)
|
|
||||||
``attendee_country`` Country code of the ticket holder's address (or empty)
|
|
||||||
``attendee_state`` State of the ticket holder's address (or empty)
|
|
||||||
``answer[XYZ]`` Answer to the custom question with identifier ``XYZ``
|
|
||||||
``invoice_name`` Full name of the invoice address (or empty)
|
|
||||||
``invoice_name_*`` Name parts of the invoice address, depending on configuration, e.g. ``invoice_name_given_name`` or ``invoice_name_family_name``
|
|
||||||
``invoice_company`` Company of the invoice address (or empty)
|
|
||||||
``invoice_street`` Street of the invoice address (or empty)
|
|
||||||
``invoice_zipcode`` ZIP code of the invoice address (or empty)
|
|
||||||
``invoice_city`` City of the invoice address (or empty)
|
|
||||||
``invoice_country`` Country code of the invoice address (or empty)
|
|
||||||
``invoice_state`` State of the invoice address (or empty)
|
|
||||||
``meta_XYZ`` Value of the event's ``XYZ`` meta property
|
|
||||||
``token`` Signed JWT (only to be used in URLs, not in tokens)
|
|
||||||
=================================== ====================================================================
|
|
||||||
|
|
||||||
|
|
||||||
API Resource description
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
The digital content plugin provides a HTTP API that allows you to create new digital content for your ticket holders,
|
|
||||||
such as live streams, videos, or material downloads.
|
|
||||||
|
|
||||||
The digital content resource contains the following public fields:
|
|
||||||
|
|
||||||
.. rst-class:: rest-resource-table
|
|
||||||
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
Field Type Description
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
id integer Internal content ID
|
|
||||||
title multi-lingual string The content title (required)
|
|
||||||
content_type string The type of content, valid values are ``webinar``, ``video``, ``livestream``, ``link``, ``file``
|
|
||||||
url string The location of the digital content
|
|
||||||
description multi-lingual string A public description of the item. May contain Markdown
|
|
||||||
syntax and is not required.
|
|
||||||
available_from datetime The first date time at which this content will be shown
|
|
||||||
(or ``null``).
|
|
||||||
available_until datetime The last date time at which this content will b e shown
|
|
||||||
(or ``null``).
|
|
||||||
all_products boolean If ``true``, the content is available to all buyers of tickets for this event. The ``limit_products`` field is ignored in this case.
|
|
||||||
limit_products list of integers List of product/item IDs. This content is only shown to buyers of these ticket types.
|
|
||||||
position integer An integer, used for sorting
|
|
||||||
subevent integer Date in an event series this content should be shown for. Should be ``null`` if this is not an event series or if this should be shown to all customers.
|
|
||||||
jwt_template string Template for JWT token generation
|
|
||||||
jwt_secret string Secret for JWT token generation
|
|
||||||
jwt_validity integer JWT validity in days
|
|
||||||
===================================== ========================== =======================================================
|
|
||||||
|
|
||||||
API Endpoints
|
|
||||||
-------------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/digitalcontents/
|
|
||||||
|
|
||||||
Returns a list of all digital content configured for an event.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/events/sampleconf/digitalcontents/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"count": 1,
|
|
||||||
"next": null,
|
|
||||||
"previous": null,
|
|
||||||
"results": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"subevent": null,
|
|
||||||
"title": {
|
|
||||||
"en": "Concert livestream"
|
|
||||||
},
|
|
||||||
"content_type": "link",
|
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
||||||
"description": {
|
|
||||||
"en": "Watch our event live here on YouTube!"
|
|
||||||
},
|
|
||||||
"all_products": true,
|
|
||||||
"limit_products": [],
|
|
||||||
"available_from": "2020-03-22T23:00:00Z",
|
|
||||||
"available_until": null,
|
|
||||||
"position": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
:query page: The page number in case of a multi-page result set, default is 1
|
|
||||||
:param organizer: The ``slug`` field of a valid organizer
|
|
||||||
:param event: The ``slug`` field of the event to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer or event does not exist **or** you have no permission to view it.
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/digitalcontents/(id)/
|
|
||||||
|
|
||||||
Returns information on one content item, identified by its ID.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/events/sampleconf/digitalcontents/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"subevent": null,
|
|
||||||
"title": {
|
|
||||||
"en": "Concert livestream"
|
|
||||||
},
|
|
||||||
"content_type": "link",
|
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
||||||
"description": {
|
|
||||||
"en": "Watch our event live here on YouTube!"
|
|
||||||
},
|
|
||||||
"all_products": true,
|
|
||||||
"limit_products": [],
|
|
||||||
"available_from": "2020-03-22T23:00:00Z",
|
|
||||||
"available_until": null,
|
|
||||||
"position": 1
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to fetch
|
|
||||||
:param event: The ``slug`` field of the event to fetch
|
|
||||||
:param id: The ``id`` field of the content to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event/content does not exist **or** you have no permission to view it.
|
|
||||||
|
|
||||||
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/digitalcontents/
|
|
||||||
|
|
||||||
Create a new digital content.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
POST /api/v1/organizers/bigevents/events/sampleconf/digitalcontents/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 166
|
|
||||||
|
|
||||||
{
|
|
||||||
"subevent": null,
|
|
||||||
"title": {
|
|
||||||
"en": "Concert livestream"
|
|
||||||
},
|
|
||||||
"content_type": "link",
|
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
||||||
"description": {
|
|
||||||
"en": "Watch our event live here on YouTube!"
|
|
||||||
},
|
|
||||||
"all_products": true,
|
|
||||||
"limit_products": [],
|
|
||||||
"available_from": "2020-03-22T23:00:00Z",
|
|
||||||
"available_until": null,
|
|
||||||
"position": 1
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 201 Created
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"subevent": null,
|
|
||||||
"title": {
|
|
||||||
"en": "Concert livestream"
|
|
||||||
},
|
|
||||||
"content_type": "link",
|
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
|
|
||||||
"description": {
|
|
||||||
"en": "Watch our event live here on YouTube!"
|
|
||||||
},
|
|
||||||
"all_products": true,
|
|
||||||
"limit_products": [],
|
|
||||||
"available_from": "2020-03-22T23:00:00Z",
|
|
||||||
"available_until": null,
|
|
||||||
"position": 1
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to create new content for
|
|
||||||
:param event: The ``slug`` field of the event to create new content for
|
|
||||||
:statuscode 201: no error
|
|
||||||
:statuscode 400: The content could not be created due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to create digital contents.
|
|
||||||
|
|
||||||
|
|
||||||
.. http:patch:: /api/v1/organizers/(organizer)/events/(event)/digitalcontents/(id)/
|
|
||||||
|
|
||||||
Update a content. You can also use ``PUT`` instead of ``PATCH``. With ``PUT``, you have to provide all fields of
|
|
||||||
the resource, other fields will be reset to default. With ``PATCH``, you only need to provide the fields that you
|
|
||||||
want to change.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
PATCH /api/v1/organizers/bigevents/events/sampleconf/digitalcontents/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
Content-Type: application/json
|
|
||||||
Content-Length: 34
|
|
||||||
|
|
||||||
{
|
|
||||||
"url": "https://mywebsite.com"
|
|
||||||
}
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: text/javascript
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"subevent": null,
|
|
||||||
"title": {
|
|
||||||
"en": "Concert livestream"
|
|
||||||
},
|
|
||||||
"content_type": "link",
|
|
||||||
"url": "https://mywebsite.com",
|
|
||||||
"description": {
|
|
||||||
"en": "Watch our event live here on YouTube!"
|
|
||||||
},
|
|
||||||
"all_products": true,
|
|
||||||
"limit_products": [],
|
|
||||||
"available_from": "2020-03-22T23:00:00Z",
|
|
||||||
"available_until": null,
|
|
||||||
"position": 1
|
|
||||||
}
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param event: The ``slug`` field of the event to modify
|
|
||||||
:param id: The ``id`` field of the content to modify
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 400: The content could not be modified due to invalid submitted data.
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event/content does not exist **or** you have no permission to change it.
|
|
||||||
|
|
||||||
|
|
||||||
.. http:delete:: /api/v1/organizers/(organizer)/events/(event)/digitalcontents/(id)/
|
|
||||||
|
|
||||||
Delete a digital content.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
DELETE /api/v1/organizers/bigevents/events/sampleconf/digitalcontents/1/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 204 No Content
|
|
||||||
Vary: Accept
|
|
||||||
|
|
||||||
:param organizer: The ``slug`` field of the organizer to modify
|
|
||||||
:param event: The ``slug`` field of the event to modify
|
|
||||||
:param id: The ``id`` field of the content to delete
|
|
||||||
:statuscode 204: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer/event/content does not exist **or** you have no permission to change it
|
|
||||||
|
|
||||||
.. _JSON Web Token: https://en.wikipedia.org/wiki/JSON_Web_Token
|
|
||||||
@@ -14,6 +14,3 @@ If you want to **create** a plugin, please go to the
|
|||||||
banktransfer
|
banktransfer
|
||||||
ticketoutputpdf
|
ticketoutputpdf
|
||||||
badges
|
badges
|
||||||
campaigns
|
|
||||||
digital
|
|
||||||
webinar
|
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
pretix Webinar
|
|
||||||
==============
|
|
||||||
|
|
||||||
Fetch host URLs
|
|
||||||
---------------
|
|
||||||
|
|
||||||
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/webinars/
|
|
||||||
|
|
||||||
Returns a list of all currently available webinar calls configured for an event.
|
|
||||||
|
|
||||||
**Example request**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
GET /api/v1/organizers/bigevents/events/sampleconf/webinars/ HTTP/1.1
|
|
||||||
Host: pretix.eu
|
|
||||||
Accept: application/json, text/javascript
|
|
||||||
|
|
||||||
**Example response**:
|
|
||||||
|
|
||||||
.. sourcecode:: http
|
|
||||||
|
|
||||||
HTTP/1.1 200 OK
|
|
||||||
Vary: Accept
|
|
||||||
Content-Type: application/json
|
|
||||||
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name": "Webinar B – Sept. 8th, 2020",
|
|
||||||
"hosturl": "http://pretix.eu/demo/museum/webinar/host/a9aded3d7bd4df60/30611a34f9fee5d3/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Webinar A – Sept. 8, 2020",
|
|
||||||
"hosturl": "http://pretix.eu/demo/museum/webinar/host/e714x7d4a4a36a04/b9cc444665xxx757/"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
:query subevent: Limit the result to the webinar(s) for a specific subevent.
|
|
||||||
:param organizer: The ``slug`` field of a valid organizer
|
|
||||||
:param event: The ``slug`` field of the event to fetch
|
|
||||||
:statuscode 200: no error
|
|
||||||
:statuscode 401: Authentication failure
|
|
||||||
:statuscode 403: The requested organizer or event does not exist **or** you have no permission to view it.
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
-r ../src/requirements.txt
|
-r ../src/requirements.txt
|
||||||
sphinx==2.3.*
|
sphinx==1.6.*
|
||||||
sphinx-rtd-theme
|
sphinx-rtd-theme
|
||||||
sphinxcontrib-httpdomain
|
sphinxcontrib-httpdomain
|
||||||
sphinxcontrib-images
|
sphinxcontrib-images
|
||||||
sphinxcontrib-spelling
|
sphinxcontrib-spelling
|
||||||
pygments-markdown-lexer
|
|
||||||
# See https://github.com/rfk/pyenchant/pull/130
|
# See https://github.com/rfk/pyenchant/pull/130
|
||||||
git+https://github.com/raphaelm/pyenchant.git@patch-1#egg=pyenchant
|
git+https://github.com/raphaelm/pyenchant.git@patch-1#egg=pyenchant
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 74 KiB |