By pausing your plan you agree to...
" } ``` ## Usage in Portal Fetched at the start of the pause flow to determine UI state and options presented to the customer. * File: `src/views/user/plans/useContractPauseMeta.ts` * Used by: `src/views/user/plans/components/PauseContractModal.tsx` ### Typical integration pattern ```ts theme={null} // From src/api/endpoints.ts // endpoints.billing.contracts.pauseMmeta = (contractId: number) => ({ // url: `/api/public/billing/coworkerContracts/${contractId}/pause/meta`, // type: null as unknown as PauseContractMeta, // }) // Usage in React const endpoint = endpoints.billing.contracts.pauseMmeta(contractId) const { resource: pauseMeta } = useDataJoin us every Monday for a 45-minute yoga session led by certified instructor Sarah Chen...
", "HostFullName": "Sarah Chen", "Location": "Studio Room B", "VenueAddress": null, "StartDate": "2026-03-23T07:30:00", "EndDate": "2026-03-23T08:15:00", "StartDateUtc": "2026-03-23T07:30:00Z", "EndDateUtc": "2026-03-23T08:15:00Z", "MultipleDays": false, "HasTickets": true, "SoldOut": false, "ChepeastPrice": 0, "MostExpensivePrice": 12.0, "Allocation": 20, "Sales": 7, "EnableWaitList": false, "AllowComments": true, "HasLargeImage": true, "HasSmallImage": true, "HasAddress": true, "HasResource": false, "Resource": null, "EventProducts": [ { "Id": 88, "Name": "Free Entry", "Description": "Community member free pass", "Price": 0, "PriceCurrencyCode": "GBP", "PriceFormatted": "£0.00", "TicketsLeft": 13, "SoldOut": false, "IsAvailableNow": true, "MaxTicketsPerAttendee": null, "LastFew": false, "Future": false, "Expired": false, "DisplayOrder": 1, "StartDate": "2026-01-01T00:00:00", "EndDate": "2026-03-23T08:15:00", "Quantity": 1 } ], "EventCategories": [{ "Id": 3, "Title": "Workshops" }], "Business": { "Id": 5, "Name": "Downtown Coworking Hub", "WebAddress": "https://downtown.example.com" }, "Comments": [ { "Id": 77, "Text": "Fantastic session, highly recommend!", "Rating": 5, "Published": true, "PostedBy": { "Id": 201, "FullName": "Maria Garcia" }, "CreatedOn": "2026-02-10T09:15:00", "CreatedOnUtc": "2026-02-10T09:15:00Z" } ], "UniqueId": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "IdString": "412", "CreatedOn": "2025-11-01T09:00:00", "UpdatedOn": "2026-03-01T12:00:00", "CreatedOnUtc": "2025-11-01T09:00:00Z", "UpdatedOnUtc": "2026-03-01T12:00:00Z", "IsNull": false } } ``` ### Fetch event with a minimal field set ```http theme={null} GET /api/public/events/412?_shape=Event.Id,Event.Name,Event.StartDateUtc,Event.EventProducts.Id,Event.EventProducts.Price,Event.EventProducts.TicketsLeft,RelatedEvents.Id,RelatedEvents.Name ``` ```json theme={null} { "Event": { "Id": 412, "Name": "Morning Yoga & Mindfulness", "StartDateUtc": "2026-03-23T07:30:00Z", "EventProducts": [{ "Id": 88, "Price": 0, "TicketsLeft": 13 }] }, "RelatedEvents": [{ "Id": 415, "Name": "Afternoon Pilates" }] } ``` ## TypeScript Integration ```typescript theme={null} import endpoints from '@/api/endpoints' import { EventDetails } from '@/types/endpoints/EventDetails' import { createShape } from '@/helpers/shape-helper' import { useData } from '@/api/fetchData' const endpoint = endpoints.events.details(412) const shape = createShapeJoin us every Monday for a 45-minute yoga session...
", "HostFullName": "Sarah Chen", "Location": "Studio Room B", "VenueAddress": null, "StartDate": "2026-03-23T07:30:00", "EndDate": "2026-03-23T08:15:00", "StartDateUtc": "2026-03-23T07:30:00Z", "EndDateUtc": "2026-03-23T08:15:00Z", "MultipleDays": false, "HasTickets": true, "SoldOut": false, "ChepeastPrice": 0, "MostExpensivePrice": 12.0, "HasCustomTicketsPage": false, "TicketsPage": null, "Allocation": 20, "Sales": 7, "EnableWaitList": false, "AllowComments": true, "ShowInHomePage": true, "ShowInHomeBanner": false, "HasSmallImage": true, "HasLargeImage": true, "HasAddress": true, "HasResource": false, "Resource": null, "EventCategories": [{ "Id": 3, "Title": "Workshops" }], "EventProducts": [{ "Id": 88, "Name": "Free Entry", "Price": 0, "TicketsLeft": 13, "SoldOut": false, "IsAvailableNow": true }], "Business": { "Id": 5, "Name": "Downtown Coworking Hub" }, "Comments": [], "UniqueId": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "IdString": "412", "CreatedOn": "2025-11-01T09:00:00", "UpdatedOn": "2026-03-01T12:00:00", "CreatedOnUtc": "2025-11-01T09:00:00Z", "UpdatedOnUtc": "2026-03-01T12:00:00Z", "IsNull": false } ], "CurrentPage": 1, "CurrentPageSize": 9, "TotalItems": 1, "TotalPages": 1, "HasNextPage": false, "HasPreviousPage": false } } ``` ### Fetch events with a minimal field set Use `_shape` to return only the data your UI needs, reducing payload size. ```http theme={null} GET /api/public/events?pastEvents=false&page=1&top=9&_shape=CalendarEvents.Records.Id,CalendarEvents.Records.Name,CalendarEvents.Records.StartDateUtc,CalendarEvents.Records.HasLargeImage ``` ```json theme={null} { "CalendarEvents": { "Records": [{ "Id": 412, "Name": "Morning Yoga & Mindfulness", "StartDateUtc": "2026-03-23T07:30:00Z", "HasLargeImage": true }], "CurrentPage": 1, "CurrentPageSize": 9, "TotalItems": 1, "TotalPages": 1, "HasNextPage": false, "HasPreviousPage": false } } ``` ## TypeScript Integration ```typescript theme={null} import endpoints from '@/api/endpoints' import { EventList } from '@/types/endpoints/EventList' import { useData } from '@/api/fetchData' const endpoint = endpoints.events.events({ pastEvents: false, page: 1, top: 9, categoryId: undefined, search: undefined, featured: false, }) const { resource: eventList } = useDataShow your member badge at Corner Café for 15% off any order.
", "SummaryText": "15% off any order" } ] } ``` ## TypeScript Integration ```typescript theme={null} import endpoints from '@/api/endpoints' const { resource: perks } = useTypedData(httpClient, endpoints.perks.list()) // perks.Groups, perks.Perks ``` # Cancel Plan Source: https://learn.nexudus.com/api/endpoints/plans/cancel-plan POST /api/public/plans/cancel Submits a cancellation request for an active plan. # Cancel Plan Submits a cancellation request for the authenticated customer's active plan. Depending on operator configuration, cancellation may take effect immediately or at the end of the current billing period. ## Authentication Requires a valid customer bearer token. ## Request Body The request body contains the contract/plan details for the cancellation.By using this portal you agree to our terms.
", "ContractTerms": [ { "Id": 101, "StartDate": "2026-04-01T00:00:00Z", "TariffName": "Hot Desk Monthly", "TermsAndConditions": "These terms govern your Hot Desk Monthly membership...
" } ] } ``` ## TypeScript Integration ```typescript theme={null} import endpoints from '@/api/endpoints' import { useTypedData } from '@/api/fetchData' const endpoint = endpoints.system.legal_status() const { resource: legalStatus } = useTypedData(httpClient, endpoint) if (legalStatus?.MustAgreeToTerms) { // Show the legal terms modal } ``` ## Usage in Portal | Context | Source file | | ------------------------------------ | ----------------------------- | | Session bootstrap — legal terms gate | `src/App.tsx` or auth context | | Legal terms acceptance modal | `src/components/LegalTerms/` | ## Error ResponsesFull HTML description
", "InstallUrl": "https://myapp.com/install", "Published": false, "RequiredRoles": [1, 2] } ``` For the full API reference, see [Create Application](/rest-api/apps/post-applications).{JSON.stringify(resource, null, 2)}
}
```
### POST with payload
```tsx theme={null}
const { resource } = useData<{ Success: boolean }>(httpClient, '/api/public/helpdesk/messages', {
method: 'post',
data: { subject: 'Printer', message: 'Paper jam on Floor 2' },
})
```
### Editor/mock data
```tsx theme={null}
const { resource } = useData(httpClient, '/api/public/faqs', {
mockData: { FaqArticles: [{ Question: 'Q?', Answer: 'A!' }], OpenAiEnabled: false },
})
```
## Return values
* `resource` – The typed response or `undefined` while loading
* `isLoading` – React Query loading flag
* `hasError` – React Query error flag (boolean)
* `query` – The rest of the React Query result (methods, status) minus the basic fields
## Edge cases
* `url` is `null`/falsy → hook is disabled (`enabled: false`) and no request is made
* 401 Unauthorized → no retries (fast-fail to let auth state respond)
## See also
* [useTypedData](/developers/data/use-typed-data) – Strongly-typed wrapper around `useData`
* [createShape](/developers/data/create-shape) – Type-safe shape builder for `_shape` query
* [LocationContext](/developers/state/location-context) – Ensure you call with the correct `httpClient`
# usePageParams
Source: https://learn.nexudus.com/developers/data/use-page-params
Derive page and size from the URL query string with optional namespacing/prefix and share pagination field shapes.
# usePageParams
`usePageParams` reads `page` and `size` from the current URL (via React Router’s `useSearchParams`) and returns a small object you can pass directly into `useData`/`useTypedData` to populate `page` and `size` query parameters.
Source: `src/api/usePageParams.ts`
## Signature
```ts theme={null}
export const usePageParams: (props?: { prefix?: string; defaultSize?: number }) => {
paging: { page: number; size: number }
prefix?: string
paginationProperties: readonly (keyof ApiListResultContent