Skip to Content
BackendAPINew Skeleton Endpoint

New Skeleton Endpoint

Overview

A new endpoint has been added to retrieve a skeleton object for creating a new entity with it’s default value.

Endpoint

GET /{moduleName}/{objectName}/skeleton/new

This endpoint returns a new entity populated with the same default values.

Benefits

  • Returns the same default values as the legacy frontend.
  • Supports tenant-specific defaults.
  • Provides a complete object skeleton ready for creation.

Authorization

Access to this endpoint requires the same permission as creating the corresponding entity.

If a user does not have permission to add the entity, they cannot access its skeleton.

E.g. : for notes, the associated role should be ROLE_MOD_NOTE_ADD

Usage

For now, the endpoint is accessed using the entity’s:

  • moduleName
  • objectName

Example:

GET /products/product/new/skeleton

Future Improvements

This endpoint is currently discovered using moduleName and objectName.

In a future update, the skeleton endpoint will also be exposed directly through the metadata API, making it easier for clients to discover automatically.

Reference issue: https://github.com/PHPCreation/phpr_erp/issues/49831 

Last updated on