---
description: "Understand service origins, v2 routes, JSON resources, and response conventions."
group: "Get started"
order: 3
---

# API basics

Understand service origins, v2 routes, JSON resources, and response conventions.

Paydro exposes an existing v2 event endpoint and authenticated JSON resources used for organizer data. Their paths and response envelopes differ. The OpenAPI document describes them together while preserving their existing formats.

## Choose an API origin {#choose-an-api-origin}

Use your organization’s Paydro hostname or `https://shop.paydro.com`. For local development, use the organizer hostname configured in your development environment. Set `PAYDRO_ORIGIN` without a trailing slash so paths can be appended consistently.

The documentation and [OpenAPI contract](/openapi/v2.json) are available on this site's current hostname. Send API requests to your configured organizer origin. Dedicated developer hosts serve documentation and return a documentation 404 for organizer requests.

## Paths and methods {#paths-and-methods}

The event detail path is `/api/v2/events/{event_id}`. Other resources use event UUIDs at the start of the path and a `.json` suffix, such as `/{event_id}/products/index.json`. Use the method in the reference and `Accept: application/json`. Use the single documented write method (PUT when supported, otherwise POST) with `Content-Type: application/json`; uploads use multipart and exports return files.

The presence of generic v2 routing does not establish another working endpoint. In particular, use `/{event_id}/products/add/{type}.json` to create products; do not infer a v2 product route.

## Response envelopes {#response-envelopes}

-   Event detail: `{"Event": {...}}`.
-   Ticket products: a JSON array of product objects.
-   Order lists: an array of records with an `Order` property.
-   Attendee lists: an array of records with an `OrderLine` property.
-   Bulk resources: event keyed maps with compact field names.

Always read the operation schema before parsing a response. Preserve identifiers as strings and allow additional fields to appear.

## Compatibility {#compatibility}

The reference covers existing reads, organizer writes and file responses. Its document version does not add new server endpoints. Read [writing data](/en-us/docs/writing-data.md) for request envelopes, success fields and retries. HTML/session-dependent workflows, internal callbacks and retired scanner routes remain outside the standard JSON contract.

## Choose a workflow {#choose-a-workflow}

Read [API coverage and workflow limits](/en-us/docs/api-coverage.md) before automating company promo codes, CSV imports, refunds or checkout. [Integration recipes](/en-us/docs/integration-recipes.md) connect the supported resources, and [stage state](/en-us/docs/stages.md) documents the public display/SSE exception.
