Skip to main content
POST
/
api
/
clients
/
sample_entities
Creates a new sample entity using the provided payload.
curl --request POST \
  --url https://api.example.com/api/clients/sample_entities \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "isSuccess": true,
  "isFailure": false,
  "error": null,
  "value": {
    "id": 42,
    "name": "Example"
  }
}

Query Parameters

api-version
string | null

Body

application/json

Payload containing the code, type, and activation status for the entity.

Describes the payload required to create a new sample entity.

code
string

Unique business code associated with the sample entity.

Example:

"SAMPLE-001"

type
enum<string>

Type of the sample entity being created.

Available options:
FirstType,
SecondType
Example:

"FirstType"

isEnabled
boolean

Indicates whether the sample entity should be enabled upon creation.

Example:

true

Response

200 - application/json

Returned when the entity is created successfully.

Wrapper for API operation results containing success status, error information, and return value.

isSuccess
boolean

True if the operation completed successfully, false otherwise.

Example:

true

isFailure
boolean

True if the operation failed, false otherwise.

Example:

false

error
object

Error information returned when the operation fails.

Example:
{
"code": "ValidationError",
"message": "The request parameters failed validation.",
"info": [
"The Name field is required.",
"The Id field must be greater than 0."
]
}
value
object

The result value returned when the operation is successful.