Skip to main content

Supplier API Testing Tool

CLI tool screenshot

Requirements

Python 3.7+

Installation

pip install supplier-api-tester

Usage

The CLI Testing Tool supports both API v1.x and v2.x. By default, the CLI runs all the tests for API v2.x.

If you wish to test your API implementation based on the v1 specification then you can pass the argument --version (or -v) in the CLI to enable v1 testing.

For more details on how to test your v1-complaint implementation please refer to the API docs for V1.

For example, the following command will test your API implementation according to the v1 specification:

supplier_products -u 'http://localhost:8000' -k 'secret' -v 1

Listing the products catalog:

supplier_products -u 'http://localhost:8000' -k 'secret' -v 2

A300-FX
ID: A300-FX
Timeslots: yes
Refundable: yes
Cutoff time: 24
Provides Pricing: yes

A400-FX
ID: A400-FX
Timeslots: yes
Refundable: no
Cutoff time: 0
Required Additional Order Data: pickup_location, passport_id
Required Additional Visitors Data: full_name, phone
Provides Pricing: no

A500-FX
ID: A500-FX
Timeslots: no
Refundable: yes
Cutoff time: 0
Required Additional Order Data: pickup_location, passport_id, flight_number
Provides Pricing: yes

A550-FX
ID: A550-FX
Timeslots: no
Refundable: yes
Cutoff time: 10
Required Additional Visitors Data: email, date_of_birth
Provides Pricing: no

A600-FX
ID: A600-FX
Timeslots: no
Refundable: no
Cutoff time: 0
Required Additional Order Data: nationality
Provides Pricing: no

Products found: 5

Testing tool usage:

supplier_tester --help
Usage: supplier_tester [OPTIONS]

  Test your Supplier API implementation

Options:
  -u, --url TEXT         [required]
  -k, --api-key TEXT     [required]
  -p, --product-id TEXT  Product ID to call tests on. Required with -a and -t flags
  -t, --timeslots        Use timeslots
  -a, --availability     Run availability tests
  -r, --reservation      Run reservation tests
  -b, --booking          Run booking tests
  -c, --catalog          Run product catalog tests
  -nc, --no-colors       Not using colors on output
  -v, --version          Choosing the API version
  --help                 Show this message and exit

Running all tests:

supplier_tester -u 'http://localhost:8000' -k 'secret' -p 'A500-FX' -v 2

Running only availability tests:

supplier_tester -u 'http://localhost:8000' -k 'secret' -p 'A500-FX' -a -v 2

Test example:

supplier_tester -u 'http://localhost:8000' -k 'secret' -p 'A500-FX' -v 2

──────────────────
AVAILABILITY TESTS
──────────────────

█  # 1 [ 12ms] Checking availability for the next 30 days
█  # 2 [  4ms] Request without API-Key
█  # 3 [  3ms] Request with incorrect API-Key
█  # 4 [  9ms] Testing missing argument errors
█  # 5 [  3ms] Testing availability for non existing product
█  # 6 [  7ms] Checking incorrect date format
█  # 7 [  3ms] Checking incorrect range error
█  # 8 [  3ms] Checking past date
█  # 9 [128ms] Checking huge date range
█  #10 [ 10ms] Testing optional price attribute in availability

─────────────────
RESERVATION TESTS
─────────────────

█  # 1 [  5ms] Request without API-Key
█  # 2 [  4ms] Request with incorrect API-Key
█  # 3 [ 20ms] Testing missing argument errors
█  # 4 [ 17ms] Reserving tickets for at least 1 variant
█  # 5 [ 13ms] Testing reservation for non-existing product
█  # 6 [ 15ms] Testing reservation with incorrect date format
█  # 7 [ 15ms] Testing reservation with past date
█  # 8 [ 16ms] Testing reservation for product with provide_pricing=True

─────────────
BOOKING TESTS
─────────────

█  # 1 [  3ms] Booking without the reservation ID
█  # 2 [  2ms] Booking without the API key
█  # 3 [  3ms] Booking with incorrect API-Key
█  # 4 [  2ms] Booking with incorrect reservation ID.
█  # 5 [ 19ms] Booking tickets for at least 1 variant
█  # 6 [ 30ms] Perform booking that will be cancelled

───────────────
PRODUCT CATALOG
───────────────

█  # 1 [  3ms] Get product catalog
┃  Note that Tiqets will send the main booker’s name, email address and phone number with each reservation. Requiring ADDITIONAL customer data either at the order level (required_order_data ) and/or for each individual travel group member (required_visitor_data) should be done only if this is a hard requirement for the fulfillment or visitor entrance process.

Metadata

Release files for Supplier-API-tester 2.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Supplier-API-tester 2.2.11
File Size Uploaded
supplier_api_tester-2.2.11.tar.gz 27.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Supplier-API-tester 2.2.11
File Interpreter ABI Platform
supplier_api_tester-2.2.11-py3-none-any.whl Python 3 none any Details

Total release size: 73.7 kB

Release files / supplier_api_tester-2.2.11.tar.gz

Download URL supplier_api_tester-2.2.11.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a282ce7390cca6fc4ea77eec7b7cfc9156f96666ec47d6435391fd998c056fdf
BLAKE2b-256 checksum
How to use checksums
18bf87e44803ed09ec580347913cca80706df6aa21f10cca0d3de0ed43e5853f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / supplier_api_tester-2.2.11-py3-none-any.whl

Download URL supplier_api_tester-2.2.11-py3-none-any.whl
Size 46.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55803b86e81845c028bc759c4613906b1cbedb2e90362fca674e11847c6fc557
BLAKE2b-256 checksum
How to use checksums
6e3d6e69e2c3e7c20187b22c160b1a71f43b825a29ebaf9010ec19433efa51cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

2.2.11 This release

2 release files

2.2.10

2 release files

2.2.9

1 release file

2.2.8

1 release file

2.2.7

1 release file

2.2.6

1 release file

2.2.5

1 release file

2.2.4

1 release file

2.2.3

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

1 release file

1.5.0

1 release file

1.4.10

1 release file

1.4.9

1 release file

1.4.7

1 release file

1.4.6

1 release file

1.4.5

1 release file

1.4.4

1 release file

1.4.3

1 release file

1.4.2

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.8

1 release file

1.3.7

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

3 release files

1.3.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page