> For the complete documentation index, see [llms.txt](https://docs.yoplanning.support/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yoplanning.support/en/developpeur/tutoriel-dacces-au-catalogue.md).

# Tutoriel d'accès au catalogue

### Introduction

This documentation aims to guide developers in integrating the sales catalog and order placement, with or without payment, using the Yoplanning.pro API. The goal is to enable the sale of Yoplanning activities within your system. We assume you have already reviewed the API documentation and possess your API token.

## Integration Workflow Steps

### 1. Retrieving your Team's Data

* **Endpoint**: `/api/v3.1/teams/`
* **Essential Information**: `team_id` and `vendor_id`
* **Usage**: The `team_id` is required for almost all API requests. The `vendor_id` is required if you want to use the Payment Manager.

### 2. Obtaining the Product List

* **Endpoint**: `/api/v3.1/teams/[teamId]/online-products/`
* **Function**: Retrieves the list of products that can be sold online.
* **Additional parameters**:
  * **lang**: (string) Indicates the language of translatable fields (such as title, description, etc.). Use an ISO2 code. Default: `en` (English). Possible options: `fr` (French), `de` (German).
  * **start\_date**: (date) Filters the results to return only those with availability after this date. Date format: `YYYY-MM-DD`.
  * **end\_date**: (date) Filters results to return only those with availability before this date. Date format: `YYYY-MM-DD`.
  * **category**: (string) Filters products by specific category.

### 3. Retrieving Product Availability

* **Endpoint**: `/api/v3.1/teams/[teamId]/online-products/[productId]/availabilities/`
* **Function**: Displays the sessions available for a specific product.
* **Filtering**: Date, price, number of tickets, staff (instructor), etc.

### 4. (Optional) Retrieving Available Options (Equipment)

* **Endpoint**: `/api/v3.1/teams/[teamId]/availability-details/[pk]/`
* **Function**: Retrieves details of the options available for a specific session.

### 5. (Optional) Availability Check

* **Endpoint**: `/api/v3.1/teams/[teamId]/order-validation`
* **Function**: Allows you to check if the contents of the cart are still available before finalizing the order.
* [See more details, click here](/en/developpeur/tutoriel-dacces-au-catalogue/verification-de-la-disponibilite-via-lapi-yoplanning.md)

### 6. (Optional) Creating a Payment via the Payment Manager

* **Endpoint**: `https://payment.yoplanning.pro/api/create-payment`
* **Function**: Creates a payment and retrieves the payment link.
* **IPN Management**: Management of Instant Payment Notification on the provided callback URL.

{% content-ref url="/pages/PJm6A8eQ4TJVVh43EKH5" %}
[YoPlanning Payment Manager — API Documentation](/en/developpeur/tutoriel-dacces-au-catalogue/yoplanning-payment-manager-api-documentation.md)
{% endcontent-ref %}

### 7. Placing the Order

* **Endpoint**: `/api/v3.1/teams/[teamId]/orders/`
* **Function**: Registers the order in Yoplanning, updates the schedule, displays the order and participants in Yoplanning, notifies staff and updates availability.
* **Option**: You can ask the YoPlanning system not to send the confirmation by email if you want to manage it yourself:

  ```
  /api/v3.1/teams/{teamId}/orders/?send_email=0
  ```

## Example of Use with cURL

* **Product Recovery**:

  <pre data-full-width="false"><code>
  </code></pre>

```bash
curl https://yoplanning.pro/api/v3.1/teams/5a90332e-568f-4980-9859-88a984844a4d/online-products -H 'Authorization: Token 4504c2cb0d87a93106d4de029f407c86149f2ada'
```

\\\* \*\*Retrieving Product Availability\*\*: \`\`\`bash curl <https://yoplanning.pro/api/v3.1/teams/5a90332e-568f-4980-9859-88a984844a4d/online-products/f16ed6c6-e972-4232-b452-ecd393e61642/availabilities> -H 'Authorization: Token 4504c2cb0d87a93106d4de029f407c86149f2ada' \`\`\` \* \*\*Place the Order\*\*: \`\`\`bash curl -H "Content-Type: application/json" -X POST -d '{"external\_reference" : "956", "items" : \[{"session\_group" : "4f655815-58d9-4c7c-b1c9-2ea152073371", "price" : {"amount" : 51.25}, "client" : {"id" : "71ea849f-226c-4302-a433-528179634aa7", "first\_name" : "John", "last\_name" : "Doe", "email" : "<john.doe@gmail.com>"}}], "payments" : \[{"amount" : 51.25, "client" : {"first\_name" : "Framold", "last\_name" : "Doe", "email" : "<john.doe@gmail.com>"}}]}' <https://yoplanning.pro/api/v3.1/teams/5a90332e-568f-4980-9859-88a984844a4d/orders> -H 'Authorization: Token 4504c2cb0d87a93106d4de029f407c86149f2ada' \`\`\`

Make sure to replace the IDs and tokens with those of your Team for all requests.

***

**Note:** This documentation is a basic integration example. For more specific details and advanced use cases, please refer to the official Yoplanning.pro API documentation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yoplanning.support/en/developpeur/tutoriel-dacces-au-catalogue.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
