# Tiendup Public API API p煤blica para integrar Tiendup 馃攽 Para obtener una API Key, sigue los pasos de la documentaci贸n: [驴C贸mo obtener tu API Key de Tiendup?](https://intercom.help/tiendup/es/articles/13832665-api-de-tiendup) Version: 1.0.0 ## Servers ``` https://{business_slug}.public-api.tiendup.com ``` Variables: - `business_slug`: Slug del negocio (subdominio) Default: "demo" ## Security ### ApiKeyAuth Autenticaci贸n mediante API Key. 馃攽 Para obtener una API Key, sigue los pasos de la documentaci贸n: [驴C贸mo obtener tu API Key de Tiendup?](https://intercom.help/tiendup/es/articles/13832665-api-de-tiendup) 鈿狅笍 **Manejo de errores** - Todos los errores funcionales o de negocio retornan **HTTP 400** - Los errores de autenticaci贸n retornan **HTTP 401 o 403** - El cuerpo de error siempre tiene `status: "ERROR"` Type: apiKey In: header Name: X-API-Key ## Download OpenAPI description [Tiendup Public API](https://tiendup.redocly.app/_bundle/openapi.yaml) ## Orders ### Listado de compras - [GET /orders](https://tiendup.redocly.app/openapi/orders/paths/~1orders/get.md): Retorna el listado de compras realizadas en el negocio. Por defecto se retornan ordenadas por fecha de creaci贸n de forma descendente. Si no hay compras, data viene como []. ### Detalles de una compra - [GET /orders/{order_id}](https://tiendup.redocly.app/openapi/orders/paths/~1orders~1%7Border_id%7D/get.md) ## Customers ### Listado de clientes - [GET /customers](https://tiendup.redocly.app/openapi/customers/paths/~1customers/get.md): Retorna el listado de clientes del negocio. Paginaci贸n por query string (page y limit). ### Obtener cliente - [GET /customers/{customer_id}](https://tiendup.redocly.app/openapi/customers/paths/~1customers~1%7Bcustomer_id%7D/get.md): Devuelve la informaci贸n de un cliente y datos relacionados (contacts, addresses, orders, etc.). ## Physical Products ### Listar productos f铆sicos - [GET /products](https://tiendup.redocly.app/openapi/physical-products/paths/~1products/get.md): Lista productos f铆sicos (ecommerce_type=retail). Para usar este endpoint, el negocio debe tener habilitada la soluci贸n de Productos F铆sicos. ### Traer un producto f铆sico por ID - [GET /products/{product_id}](https://tiendup.redocly.app/openapi/physical-products/paths/~1products~1%7Bproduct_id%7D/get.md): Devuelve el detalle de un producto f铆sico (ecommerce_type=retail). Requiere que el negocio tenga habilitada la soluci贸n de Productos F铆sicos. ## Courses ### Listar cursos online - [GET /learning/courses](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1courses/get.md): Devuelve el listado de cursos online del negocio. Paginado por query string: limit (default 25) y page. ### Traer un curso online - [GET /learning/courses/{course_id}](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1courses~1%7Bcourse_id%7D/get.md) ### Listado de inscriptos a un curso - [GET /learning/courses/{course_id}/enrolled](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1courses~1%7Bcourse_id%7D~1enrolled/get.md) ### Cursos en los que est谩 inscripto un cliente - [GET /learning/customers/{customer_id}/courses](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1customers~1%7Bcustomer_id%7D~1courses/get.md) ### Enroll customer in course by id - [PUT /learning/courses/{course_id}/enrolled/{customer_id}](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1courses~1%7Bcourse_id%7D~1enrolled~1%7Bcustomer_id%7D/put.md): Inscribe a un cliente en un curso online. El curso y el cliente deben existir. ### Enroll customer in course by email - [POST /learning/courses/{course_id}/enroll](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1courses~1%7Bcourse_id%7D~1enroll/post.md): Inscribe a un cliente en un curso usando su email. Si el cliente no existe, se crea con los datos provistos. ### Get customer enrollment in course - [GET /learning/customers/{customer_id}/courses/{course_id}/enrollment](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1customers~1%7Bcustomer_id%7D~1courses~1%7Bcourse_id%7D~1enrollment/get.md): Obtiene la inscripci贸n de un cliente en un curso espec铆fico. ### Revoke customer enrollment in course - [DELETE /learning/customers/{customer_id}/courses/{course_id}/enrollment](https://tiendup.redocly.app/openapi/courses/paths/~1learning~1customers~1%7Bcustomer_id%7D~1courses~1%7Bcourse_id%7D~1enrollment/delete.md): Revoca el acceso de un cliente a un curso espec铆fico. ## Downloadables ### List downloadables - [GET /downloadables](https://tiendup.redocly.app/openapi/downloadables/paths/~1downloadables/get.md): Retorna el listado paginado de descargables del negocio. ### Grant downloadable access to customer - [PUT /downloadables/{product_id}/customers/{customer_id}/access/{access_type}](https://tiendup.redocly.app/openapi/downloadables/paths/~1downloadables~1%7Bproduct_id%7D~1customers~1%7Bcustomer_id%7D~1access~1%7Baccess_type%7D/put.md): Otorga acceso a un descargable a un cliente existente, indicando si el acceso es free o paid. ### Grant downloadable access by email - [POST /downloadables/{product_id}/access](https://tiendup.redocly.app/openapi/downloadables/paths/~1downloadables~1%7Bproduct_id%7D~1access/post.md): Otorga acceso a un descargable creando/vinculando el cliente por email. El tipo de acceso se define en el body (free|paid). ### Revoke downloadable access by customer id - [PUT /downloadables/{product_id}/customers/{customer_id}/access/revoke](https://tiendup.redocly.app/openapi/downloadables/paths/~1downloadables~1%7Bproduct_id%7D~1customers~1%7Bcustomer_id%7D~1access~1revoke/put.md): Revoca el acceso de un cliente a un descargable. ### List downloadable acquisitions - [GET /downloadables/{product_id}/acquisitions](https://tiendup.redocly.app/openapi/downloadables/paths/~1downloadables~1%7Bproduct_id%7D~1acquisitions/get.md): Retorna el listado paginado de clientes que adquirieron el descargable. ### Get downloadable acquisition - [GET /downloadables/acquisitions/{access_id}](https://tiendup.redocly.app/openapi/downloadables/paths/~1downloadables~1acquisitions~1%7Baccess_id%7D/get.md): Obtiene el detalle de una adquisici贸n individual. ## Sessions ### List sessions - [GET /sessions](https://tiendup.redocly.app/openapi/sessions/paths/~1sessions/get.md): Lista de productos del tipo sesi贸n (requires soluci贸n de sesiones habilitada en el negocio). ## Subscriptions ### List subscriptions - [GET /subscriptions](https://tiendup.redocly.app/openapi/subscriptions/paths/~1subscriptions/get.md): Lista productos del tipo suscripci贸n. ### List subscription subscribers - [GET /subscriptions/{product_id}/subscribers](https://tiendup.redocly.app/openapi/subscriptions/paths/~1subscriptions~1%7Bproduct_id%7D~1subscribers/get.md): Lista los suscriptores de un producto de suscripci贸n (paginado). ### Get subscription status - [GET /subscriptions/{subscription_id}](https://tiendup.redocly.app/openapi/subscriptions/paths/~1subscriptions~1%7Bsubscription_id%7D/get.md): Obtiene el estado completo de una suscripci贸n espec铆fica. ## Events ### List events - [GET /events](https://tiendup.redocly.app/openapi/events/paths/~1events/get.md): Retorna el listado paginado de eventos del negocio. ### Get event - [GET /events/{event_id}](https://tiendup.redocly.app/openapi/events/paths/~1events~1%7Bevent_id%7D/get.md): Obtiene un evento por id o hash. ### List event editions - [GET /events/{event_id}/variants](https://tiendup.redocly.app/openapi/events/paths/~1events~1%7Bevent_id%7D~1variants/get.md): Retorna las ediciones (variants) de un evento. ### Enroll customer in event - [PUT /events/{event_id}/enrolled/{customer_id}](https://tiendup.redocly.app/openapi/events/paths/~1events~1%7Bevent_id%7D~1enrolled~1%7Bcustomer_id%7D/put.md): Inscribe un cliente a un evento. - Si event_id corresponde al ID del evento principal, se inscribir谩 en la primera edici贸n disponible. - Si event_id corresponde al ID de una edici贸n (variant), se inscribir谩 en esa edici贸n espec铆fica. ### Enroll customer in event by email - [POST /events/{event_id}/enroll](https://tiendup.redocly.app/openapi/events/paths/~1events~1%7Bevent_id%7D~1enroll/post.md): Inscribe una persona a un evento utilizando su email. - Si event_id corresponde al ID del evento principal, se inscribir谩 en la primera edici贸n disponible. - Si event_id corresponde al ID de una edici贸n (variant), se inscribir谩 en esa edici贸n espec铆fica. ### List event tickets - [GET /events/{event_id}/tickets](https://tiendup.redocly.app/openapi/events/paths/~1events~1%7Bevent_id%7D~1tickets/get.md): Retorna el listado de personas inscriptas (tickets) a un evento. - Si event_id corresponde al ID del evento principal, devuelve tickets de la primera edici贸n disponible (seg煤n l贸gica interna). - Si event_id corresponde al ID de una edici贸n (variant), devuelve tickets de esa edici贸n. ### Get event ticket - [GET /events/tickets/{ticket_id}](https://tiendup.redocly.app/openapi/events/paths/~1events~1tickets~1%7Bticket_id%7D/get.md): Retorna un ticket (inscripci贸n) individual por ticket_id. ### Revoke event enrollment - [PUT /events/enrollments/{enrollment_id}/revoke](https://tiendup.redocly.app/openapi/events/paths/~1events~1enrollments~1%7Benrollment_id%7D~1revoke/put.md): Revoca (cancela) la inscripci贸n a un evento a partir del enrollment_id. El ticket pasar谩 a estado unenrolled seg煤n la l贸gica interna.