Restaurant - Subscription
Get all subscriptions with pagination and filtering
const url = 'https://api.inspow.tech/api/v1/restaurant/subscriptions?limit=10&offset=0&sortBy=createdAt&sortOrder=asc&sort=%7B%22lastName%22%3A%20-1%2C%20%22email%22%3A%201%7D';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.inspow.tech/api/v1/restaurant/subscriptions?limit=10&offset=0&sortBy=createdAt&sortOrder=asc&sort=%7B%22lastName%22%3A%20-1%2C%20%22email%22%3A%201%7D'Parameters
Sección titulada « Parameters »Query Parameters
Sección titulada «Query Parameters »Example
10Number of items to return
Example
0Number of items to skip
Example
createdAtField to sort the results (Deprecated, use sort instead)
Example
ascSort direction, either asc or desc (Deprecated, use sort instead)
Query search to filter items
Query to filter items in MongoDB query format
Example
{"lastName": -1, "email": 1}JSON string specifying sorting fields and order (e.g. { “lastName”: -1, “email”: 1 })
Responses
Sección titulada « Responses »object
The ID of the user who pays and receives notifications.
The ID of the beneficiary (hijo). Omitir para suscripción individual.
object
The ID of the plan contratado.
object
Current status of the subscription.
Subscription start date.
Subscription end date.
If true, la suscripción se renueva automáticamente.
If true, se requiere confirmación parental antes de activar la suscripción.
The ID of the user who created this record.
The ID of the user who last updated this record.
The timestamp when the attendance record was created.
The timestamp when the attendance record was last updated.
Example
{ "user": "645cc3d3f8a9c9a2b88a22c4", "beneficiary": "645cc3d3f8a9c9a2b88a22d7", "plan": "645cc3d3f8a9c9a2b88a22e3", "status": "draft", "startDate": "2025-05-01T00:00:00.000Z", "endDate": "2025-05-31T23:59:59.999Z", "autoRenew": true, "requireParentConfirm": false, "createdBy": "645cc3d3f8a9c9a2b88a22c4", "updatedBy": "645cc3d3f8a9c9a2b88a22c5", "createdAt": "2023-11-25T00:00:00.000Z", "updatedAt": "2023-11-26T00:00:00.000Z"}