Your first API request
By the end of this guide you will have authenticated against the ExpertHub API, fetched the activity catalog, and know the path from catalog to confirmed sale.
-
Set up your headers
Every request to the API requires these three HTTP headers:
Header Value Acceptapplication/jsonContent-Typeapplication/jsonAuthorizationApiKey YOUR_API_KEYReplace
YOUR_API_KEYwith the key provided by the Experticket support team. Without it, every call will return an authentication error. -
Fetch the activity catalog
The catalog is your source of truth for the identifiers you will need in every subsequent call. Fetch it once and store it locally — polling it on every sale is a misuse of the API.
POST /activity/CatalogA minimal request body:
{}Key fields in the response to hold on to:
ProviderId— identifies the activity providerProductId— the product you will add to the cartTicketId— the specific ticket typeTicketsQuestionsProfileId— if present, this ticket requires question answers before the sale
See Activities catalog for the full field reference and filtering options.
-
Build and complete a sale
A sale follows four calls in sequence:
Step Endpoint What it does 1. Create cart POST /ShoppingCart/CreateOpens a new cart, returns a ShoppingCartId2. Add items POST /ShoppingCart/AddAdds activities, packages, or accommodations 3. Reserve POST /ShoppingCart/ConfirmBlocks stock — items reserved, not yet charged 4. Complete POST /ShoppingCart/SaleCharges the customer and issues the tickets -
Check the response
The API always returns HTTP 200 — even when something goes wrong. Always inspect the
Successfield.How the error is reported depends on the endpoint family. The catalog call above is a read, so a failure looks like this:
{ "Success": false, "ErrorMessage": "...", "ErrorCodes": [123] }The cart and sale calls are transactional, and report one error per line:
{ "Success": false, "Errors": [{ "ErrorMessage": "...", "ErrorCode": 123 }] }A
Success: falsewith no errors reported means the request was valid but produced no results (for example, a catalog query with no matching products). See response envelopes for both formats and error codes for the full list of codes.
Try it without writing any code
Section titled “Try it without writing any code”The API reference can run these calls against your own instance straight from the browser, which is the fastest way to see a real response before you write a line of code.
-
Point it at your instance
Type your API base URL in the API base URL field at the top of the reference and press Apply. Each client has its own ExpertHub instance, so until you do this the examples point at a placeholder host that does not resolve.
You can type just the host, without
https://— the scheme is added for you. -
Enter your API key
Open the authentication section and paste your key including the
ApiKeyprefix:ApiKey YOUR_API_KEYThe value is sent verbatim as the
Authorizationheader, so pasting the key on its own results in an authentication error. -
Send the request
Pick an endpoint and send it. The cURL example shown alongside it uses the base URL you set, so you can copy it straight into a terminal.