# Custom Property

**Summary:** Endpoints for Custom Property

- Role: [Developers](https://www.subrite.no/developers)
- Source: https://www.subrite.no/developers/custom-property
- Updated: 2026-10-13
- Markdown index: https://www.subrite.no/developers/llms.txt

<a id="get-api-v1-custom-properties"></a>
## Get all custom properties of the tenant paginated

`GET /api/v1/custom-properties`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `page` | query | `number` | Default: `1` · `minimum`: `1` |
| `take` | query | `number` | Default: `10` · `minimum`: `1`, `maximum`: `50` |
| `orderBy` | query | `string` | Allowed values: `"createdAt"`, `"id"`, `"updatedAt"` · Default: `"createdAt"` |
| `orderDirection` | query | `string` | Allowed values: `"asc"`, `"desc"` · Default: `"desc"` |

### Responses

#### 200

Content type: `application/json` · `CustomPropertyResponsePaginated`

| Name | Type | Description |
| --- | --- | --- |
| `items` (Required) | `array of CustomPropertyResponse` |   |
| `items[].name` (Required when parent is present) | `string` |   |
| `items[].displayName` (Required when parent is present) | `string` |   |
| `items[].entity` (Required when parent is present) | `string` | Allowed values: `"Member"`, `"MemberPackageProduct"`, `"MemberPackage"`, `"Order"`, `"OrderItem"`, `"CustomOrder"`, `"CustomOrderItem"` |
| `items[].dataType` (Required when parent is present) | `string` | Allowed values: `"string"`, `"numeric"`, `"boolean"`, `"date"`, `"text"` |
| `items[].fieldType` (Required when parent is present) | `string` | Allowed values: `"text"`, `"date"`, `"radio"`, `"checkbox"`, `"select"`, `"sequence"` |
| `items[].description` (Required when parent is present) | `string` |   |
| `items[].settings` (Required when parent is present) | `CustomPropertySettings` |   |
| `items[].settings.isRequired` (Required when parent is present) | `boolean` |   |
| `items[].settings.isUnique` (Required when parent is present) | `boolean` |   |
| `items[].settings.isSearchable` (Required when parent is present) | `boolean` |   |
| `items[].settings.options` (Required when parent is present) | `array of CustomPropertyOption` | Nested fields omitted: depth limit. |
| `items[].settings.maxLength` (Required when parent is present) | `number` |   |
| `items[].settings.minValue` (Required when parent is present) | `number` |   |
| `items[].settings.maxValue` (Required when parent is present) | `number` |   |
| `items[].settings.regex` (Required when parent is present) | `string` |   |
| `items[].settings.regexErrorMessageCode` (Required when parent is present) | `string` |   |
| `items[].settings.defaultValue` (Required when parent is present) | `string \| number \| boolean` |   |
| `items[].settings.sequenceStartNumber` (Required when parent is present) | `number` |   |
| `items[].settings.helpText` (Required when parent is present) | `Translation` | Nested fields omitted: depth limit. |
| `items[].permissions` (Required when parent is present) | `CustomPropertyPermissions` |   |
| `items[].permissions.readAccess` (Required when parent is present) | `AccessObject` | Nested fields omitted: depth limit. |
| `items[].permissions.editAccess` (Required when parent is present) | `AccessObject` | Nested fields omitted: depth limit. |
| `items[].order` (Required when parent is present) | `number` |   |
| `items[].tenantId` (Required when parent is present) | `number` |   |
| `items[].createdBy` (Required when parent is present) | `number` |   |
| `items[].updatedBy` (Required when parent is present) | `number` |   |
| `items[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `items[].id` (Required when parent is present) | `number` |   |
| `items[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].metaData` (Required when parent is present) | `object` |   |
| `meta` (Required) | `PageMeta` |   |
| `meta.page` (Required) | `number` |   |
| `meta.take` (Required) | `number` |   |
| `meta.count` (Required) | `number` |   |
| `meta.pageCount` (Required) | `number` |   |
| `meta.hasPreviousPage` (Required) | `boolean` |   |
| `meta.hasNextPage` (Required) | `boolean` |   |

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` |   |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

### Example request

```bash
curl https://api.subrite.no/api/v1/custom-properties \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "items": [
    {
      "metaData": {}
    }
  ],
  "meta": {
    "page": 0,
    "take": 0,
    "count": 0,
    "pageCount": 0,
    "hasPreviousPage": true,
    "hasNextPage": true
  }
}
```

<a id="post-api-v1-custom-properties"></a>
## Create a new custom property

`POST /api/v1/custom-properties`

**Authentication:** Bearer token (JWT)

### Request body

Content type: `application/json` · Required · `CreateCustomPropertyDto`

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` | `maxLength`: `63`, `pattern`: `/^[A-Za-z][A-Za-z0-9_]*$/` |
| `displayName` (Required) | `string` | `maxLength`: `255` |
| `entity` (Required) | `CUSTOM_PROPERTY_ENTITY` | Allowed values: `"Member"`, `"MemberPackageProduct"`, `"MemberPackage"`, `"Order"`, `"OrderItem"`, `"CustomOrder"`, `"CustomOrderItem"` |
| `dataType` (Required) | `CUSTOM_PROPERTY_DATA_TYPE` | Allowed values: `"string"`, `"numeric"`, `"boolean"`, `"date"`, `"text"` |
| `fieldType` (Required) | `CUSTOM_PROPERTY_FIELD_TYPE` | Allowed values: `"text"`, `"date"`, `"radio"`, `"checkbox"`, `"select"`, `"sequence"` |
| `description` | `string` | `maxLength`: `1000` |
| `settings` | `CustomPropertySettings` |   |
| `settings.isRequired` (Required when parent is present) | `boolean` |   |
| `settings.isUnique` (Required when parent is present) | `boolean` |   |
| `settings.isSearchable` (Required when parent is present) | `boolean` |   |
| `settings.options` (Required when parent is present) | `array of CustomPropertyOption` |   |
| `settings.options[].name` (Required when parent is present) | `string` |   |
| `settings.options[].value` (Required when parent is present) | `string \| number` |   |
| `settings.maxLength` (Required when parent is present) | `number` |   |
| `settings.minValue` (Required when parent is present) | `number` |   |
| `settings.maxValue` (Required when parent is present) | `number` |   |
| `settings.regex` (Required when parent is present) | `string` |   |
| `settings.regexErrorMessageCode` (Required when parent is present) | `string` |   |
| `settings.defaultValue` (Required when parent is present) | `string \| number \| boolean` |   |
| `settings.sequenceStartNumber` (Required when parent is present) | `number` |   |
| `settings.helpText` (Required when parent is present) | `Translation` |   |
| `settings.helpText.en` (Required when parent is present) | `string` |   |
| `settings.helpText.no` (Required when parent is present) | `string` |   |
| `settings.helpText.sv` | `string` |   |
| `settings.helpText.da` | `string` |   |
| `settings.helpText.key` | `string` |   |
| `permissions` | `CustomPropertyPermissions` |   |
| `permissions.readAccess` (Required when parent is present) | `AccessObject` |   |
| `permissions.readAccess.admin` (Required when parent is present) | `boolean` |   |
| `permissions.readAccess.member` (Required when parent is present) | `boolean` |   |
| `permissions.readAccess.api` (Required when parent is present) | `boolean` |   |
| `permissions.editAccess` (Required when parent is present) | `AccessObject` |   |
| `permissions.editAccess.admin` (Required when parent is present) | `boolean` |   |
| `permissions.editAccess.member` (Required when parent is present) | `boolean` |   |
| `permissions.editAccess.api` (Required when parent is present) | `boolean` |   |

**Example request body**

`application/json`

```json
{
  "name": "string",
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string"
}
```

### Responses

#### 201

Content type: `application/json` · `CustomPropertyResponse`

| Name | Type | Description |
| --- | --- | --- |
| `name` (Required) | `string` |   |
| `displayName` (Required) | `string` |   |
| `entity` (Required) | `string` | Allowed values: `"Member"`, `"MemberPackageProduct"`, `"MemberPackage"`, `"Order"`, `"OrderItem"`, `"CustomOrder"`, `"CustomOrderItem"` |
| `dataType` (Required) | `string` | Allowed values: `"string"`, `"numeric"`, `"boolean"`, `"date"`, `"text"` |
| `fieldType` (Required) | `string` | Allowed values: `"text"`, `"date"`, `"radio"`, `"checkbox"`, `"select"`, `"sequence"` |
| `description` (Required) | `string` |   |
| `settings` (Required) | `CustomPropertySettings` |   |
| `settings.isRequired` (Required) | `boolean` |   |
| `settings.isUnique` (Required) | `boolean` |   |
| `settings.isSearchable` (Required) | `boolean` |   |
| `settings.options` (Required) | `array of CustomPropertyOption` |   |
| `settings.options[].name` (Required when parent is present) | `string` |   |
| `settings.options[].value` (Required when parent is present) | `string \| number` |   |
| `settings.maxLength` (Required) | `number` |   |
| `settings.minValue` (Required) | `number` |   |
| `settings.maxValue` (Required) | `number` |   |
| `settings.regex` (Required) | `string` |   |
| `settings.regexErrorMessageCode` (Required) | `string` |   |
| `settings.defaultValue` (Required) | `string \| number \| boolean` |   |
| `settings.sequenceStartNumber` (Required) | `number` |   |
| `settings.helpText` (Required) | `Translation` |   |
| `settings.helpText.en` (Required) | `string` |   |
| `settings.helpText.no` (Required) | `string` |   |
| `settings.helpText.sv` | `string` |   |
| `settings.helpText.da` | `string` |   |
| `settings.helpText.key` | `string` |   |
| `permissions` (Required) | `CustomPropertyPermissions` |   |
| `permissions.readAccess` (Required) | `AccessObject` |   |
| `permissions.readAccess.admin` (Required) | `boolean` |   |
| `permissions.readAccess.member` (Required) | `boolean` |   |
| `permissions.readAccess.api` (Required) | `boolean` |   |
| `permissions.editAccess` (Required) | `AccessObject` |   |
| `permissions.editAccess.admin` (Required) | `boolean` |   |
| `permissions.editAccess.member` (Required) | `boolean` |   |
| `permissions.editAccess.api` (Required) | `boolean` |   |
| `order` (Required) | `number` |   |
| `tenantId` (Required) | `number` |   |
| `createdBy` (Required) | `number` |   |
| `updatedBy` (Required) | `number` |   |
| `tenant` (Required) | `Tenant` | Nested fields omitted: field limit. |
| `id` (Required) | `number` |   |
| `createdAt` (Required) | `string (date-time)` |   |
| `updatedAt` (Required) | `string (date-time)` |   |
| `deletedAt` (Required) | `string (date-time)` |   |
| `metaData` (Required) | `object` |   |

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

Same fields as [Get all custom properties of the tenant paginated (400)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError, unsupportedCustomPropertyDataType

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"internalServerError"`, `"unsupportedCustomPropertyDataType"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "internalServerError",
  "message": "string",
  "errors": [
    {}
  ]
}
```

### Example request

```bash
curl https://api.subrite.no/api/v1/custom-properties \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "string",
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string",
  "settings": {
    "isRequired": true,
    "isUnique": true,
    "isSearchable": true,
    "options": [],
    "maxLength": 0,
    "minValue": 0,
    "maxValue": 0,
    "regex": "string",
    "regexErrorMessageCode": "string",
    "defaultValue": "string",
    "sequenceStartNumber": 0,
    "helpText": {}
  },
  "permissions": {
    "readAccess": {},
    "editAccess": {}
  }
}'
```

### Example response

201 · `application/json`

```json
{
  "name": "string",
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string",
  "settings": {
    "isRequired": true,
    "isUnique": true,
    "isSearchable": true,
    "options": [],
    "maxLength": 0,
    "minValue": 0,
    "maxValue": 0,
    "regex": "string",
    "regexErrorMessageCode": "string",
    "defaultValue": "string",
    "sequenceStartNumber": 0,
    "helpText": {}
  },
  "permissions": {
    "readAccess": {},
    "editAccess": {}
  },
  "order": 0,
  "tenantId": 0,
  "createdBy": 0,
  "updatedBy": 0,
  "tenant": {
    "market": "NO",
    "productName": "enterprise",
    "additionalFeatures": [],
    "disabledFeatures": [],
    "name": "string",
    "isActive": true,
    "defaultLanguage": "en",
    "hostName": "string",
    "logo": "string",
    "favicon": "string",
    "authLogo": "string",
    "authLogoHeight": 0,
    "siteUrl": "string",
    "termsUrl": "string",
    "privacyUrl": "string",
    "gtm": "string",
    "taxRates": [],
    "smsOtp": true,
    "emailProvider": "brevo",
    "tenantContact": "string",
    "registeredBusinessNo": "string",
    "bankAccountNo": "string",
    "swiftCode": "string",
    "iban": "<iban>",
    "defaultLogoutURL": "string",
    "postalAddress": "<postalAddress>",
    "otpTemplateId": {},
    "smsSenderId": 0,
    "emailSenderId": 0,
    "smsSender": {
      "metaData": {}
    },
    "emailSender": {
      "metaData": {}
    },
    "products": [],
    "users": [],
    "members": [],
    "roles": [],
    "subscriptionPlans": [],
    "packages": [],
    "invoices": [],
    "orders": [],
    "paymentProviders": [],
    "newslettersProviderConfig": [],
    "paymentProviderConfigs": [],
    "oidcClients": [],
    "oauthProviders": [],
    "activityLogs": [],
    "m2m_api_clients": [],
    "customProperties": [],
    "consents": [],
    "preference": {
      "inputFieldConfig": [],
      "customFieldsOnMemberCard": [],
      "customFieldsOnInvoice": [],
      "visibleAdditionalFieldsOnMypage": [],
      "metaData": {}
    },
    "settings": {
      "aiResidency": {},
      "metaData": {}
    },
    "communicationTemplates": [],
    "additionalHostnames": [],
    "exportHistory": [],
    "arReportHistory": [],
    "mypageCardsSettings": [],
    "webhooks": [],
    "customOrders": [],
    "customOrderSources": [],
    "brandKits": [],
    "communicationReceivers": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {}
}
```

<a id="get-api-v1-custom-properties-all"></a>
## Get all custom properties of the tenant

`GET /api/v1/custom-properties/all`

**Authentication:** Bearer token (JWT)

### Responses

#### 200

Content type: `application/json` · `array of CustomPropertyViewResponse`

| Name | Type | Description |
| --- | --- | --- |
| `[].permissions` (Required when parent is present) | `CustomPropertyPermissions` |   |
| `[].permissions.readAccess` (Required when parent is present) | `AccessObject` |   |
| `[].permissions.readAccess.admin` (Required when parent is present) | `boolean` |   |
| `[].permissions.readAccess.member` (Required when parent is present) | `boolean` |   |
| `[].permissions.readAccess.api` (Required when parent is present) | `boolean` |   |
| `[].permissions.editAccess` (Required when parent is present) | `AccessObject` |   |
| `[].permissions.editAccess.admin` (Required when parent is present) | `boolean` |   |
| `[].permissions.editAccess.member` (Required when parent is present) | `boolean` |   |
| `[].permissions.editAccess.api` (Required when parent is present) | `boolean` |   |
| `[].helpText` | `Translation` |   |
| `[].helpText.en` (Required when parent is present) | `string` |   |
| `[].helpText.no` (Required when parent is present) | `string` |   |
| `[].helpText.sv` | `string` |   |
| `[].helpText.da` | `string` |   |
| `[].helpText.key` | `string` |   |
| `[].name` (Required when parent is present) | `string` |   |
| `[].displayName` (Required when parent is present) | `string` |   |
| `[].fieldType` (Required when parent is present) | `string` | Allowed values: `"text"`, `"date"`, `"radio"`, `"checkbox"`, `"select"`, `"sequence"` |
| `[].dataType` (Required when parent is present) | `string` | Allowed values: `"string"`, `"numeric"`, `"boolean"`, `"date"`, `"text"` |
| `[].order` (Required when parent is present) | `number` |   |
| `[].isRequired` (Required when parent is present) | `boolean` |   |
| `[].options` | `array of CustomPropertyOption` |   |
| `[].options[].name` (Required when parent is present) | `string` |   |
| `[].options[].value` (Required when parent is present) | `string \| number` |   |

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

### Example request

```bash
curl https://api.subrite.no/api/v1/custom-properties/all \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  {
    "permissions": {},
    "helpText": {},
    "name": "string",
    "displayName": "string",
    "fieldType": "text",
    "dataType": "string",
    "order": 0,
    "isRequired": true,
    "options": []
  }
]
```

<a id="get-api-v1-custom-properties-id"></a>
## Get a custom property by id

`GET /api/v1/custom-properties/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `number` |   |

### Responses

#### 200

Content type: `application/json` · `CustomPropertyResponse`

Same fields as [Create a new custom property (201)](https://www.subrite.no/developers/custom-property?md=true#post-api-v1-custom-properties).

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

Same fields as [Get all custom properties of the tenant paginated (400)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

customPropertyNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"customPropertyNotFound"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "customPropertyNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/custom-properties/{id}' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "name": "string",
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string",
  "settings": {
    "isRequired": true,
    "isUnique": true,
    "isSearchable": true,
    "options": [],
    "maxLength": 0,
    "minValue": 0,
    "maxValue": 0,
    "regex": "string",
    "regexErrorMessageCode": "string",
    "defaultValue": "string",
    "sequenceStartNumber": 0,
    "helpText": {}
  },
  "permissions": {
    "readAccess": {},
    "editAccess": {}
  },
  "order": 0,
  "tenantId": 0,
  "createdBy": 0,
  "updatedBy": 0,
  "tenant": {
    "market": "NO",
    "productName": "enterprise",
    "additionalFeatures": [],
    "disabledFeatures": [],
    "name": "string",
    "isActive": true,
    "defaultLanguage": "en",
    "hostName": "string",
    "logo": "string",
    "favicon": "string",
    "authLogo": "string",
    "authLogoHeight": 0,
    "siteUrl": "string",
    "termsUrl": "string",
    "privacyUrl": "string",
    "gtm": "string",
    "taxRates": [],
    "smsOtp": true,
    "emailProvider": "brevo",
    "tenantContact": "string",
    "registeredBusinessNo": "string",
    "bankAccountNo": "string",
    "swiftCode": "string",
    "iban": "<iban>",
    "defaultLogoutURL": "string",
    "postalAddress": "<postalAddress>",
    "otpTemplateId": {},
    "smsSenderId": 0,
    "emailSenderId": 0,
    "smsSender": {
      "metaData": {}
    },
    "emailSender": {
      "metaData": {}
    },
    "products": [],
    "users": [],
    "members": [],
    "roles": [],
    "subscriptionPlans": [],
    "packages": [],
    "invoices": [],
    "orders": [],
    "paymentProviders": [],
    "newslettersProviderConfig": [],
    "paymentProviderConfigs": [],
    "oidcClients": [],
    "oauthProviders": [],
    "activityLogs": [],
    "m2m_api_clients": [],
    "customProperties": [],
    "consents": [],
    "preference": {
      "inputFieldConfig": [],
      "customFieldsOnMemberCard": [],
      "customFieldsOnInvoice": [],
      "visibleAdditionalFieldsOnMypage": [],
      "metaData": {}
    },
    "settings": {
      "aiResidency": {},
      "metaData": {}
    },
    "communicationTemplates": [],
    "additionalHostnames": [],
    "exportHistory": [],
    "arReportHistory": [],
    "mypageCardsSettings": [],
    "webhooks": [],
    "customOrders": [],
    "customOrderSources": [],
    "brandKits": [],
    "communicationReceivers": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {}
}
```

<a id="delete-api-v1-custom-properties-id"></a>
## Delete a custom property

`DELETE /api/v1/custom-properties/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `number` |   |

### Responses

#### 200

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest, customPropertyHasValues

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"customPropertyHasValues"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

customPropertyNotFound

Same fields as [Get a custom property by id (404)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties-id).

**Example response**

`application/json`

```json
{
  "messageCode": "customPropertyNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/custom-properties/{id}' \
  --request DELETE \
  --header 'Authorization: Bearer <token>'
```

<a id="patch-api-v1-custom-properties-id"></a>
## Update a custom property

`PATCH /api/v1/custom-properties/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | path | `number` |   |

### Request body

Content type: `application/json` · Required · `UpdateCustomPropertyDto`

| Name | Type | Description |
| --- | --- | --- |
| `displayName` | `string` | `maxLength`: `255` |
| `entity` | `CUSTOM_PROPERTY_ENTITY` | Allowed values: `"Member"`, `"MemberPackageProduct"`, `"MemberPackage"`, `"Order"`, `"OrderItem"`, `"CustomOrder"`, `"CustomOrderItem"` |
| `dataType` | `CUSTOM_PROPERTY_DATA_TYPE` | Allowed values: `"string"`, `"numeric"`, `"boolean"`, `"date"`, `"text"` |
| `fieldType` | `CUSTOM_PROPERTY_FIELD_TYPE` | Allowed values: `"text"`, `"date"`, `"radio"`, `"checkbox"`, `"select"`, `"sequence"` |
| `description` | `string` | `maxLength`: `1000` |
| `settings` | `CustomPropertySettings` |   |
| `settings.isRequired` (Required when parent is present) | `boolean` |   |
| `settings.isUnique` (Required when parent is present) | `boolean` |   |
| `settings.isSearchable` (Required when parent is present) | `boolean` |   |
| `settings.options` (Required when parent is present) | `array of CustomPropertyOption` |   |
| `settings.options[].name` (Required when parent is present) | `string` |   |
| `settings.options[].value` (Required when parent is present) | `string \| number` |   |
| `settings.maxLength` (Required when parent is present) | `number` |   |
| `settings.minValue` (Required when parent is present) | `number` |   |
| `settings.maxValue` (Required when parent is present) | `number` |   |
| `settings.regex` (Required when parent is present) | `string` |   |
| `settings.regexErrorMessageCode` (Required when parent is present) | `string` |   |
| `settings.defaultValue` (Required when parent is present) | `string \| number \| boolean` |   |
| `settings.sequenceStartNumber` (Required when parent is present) | `number` |   |
| `settings.helpText` (Required when parent is present) | `Translation` |   |
| `settings.helpText.en` (Required when parent is present) | `string` |   |
| `settings.helpText.no` (Required when parent is present) | `string` |   |
| `settings.helpText.sv` | `string` |   |
| `settings.helpText.da` | `string` |   |
| `settings.helpText.key` | `string` |   |
| `permissions` | `CustomPropertyPermissions` |   |
| `permissions.readAccess` (Required when parent is present) | `AccessObject` |   |
| `permissions.readAccess.admin` (Required when parent is present) | `boolean` |   |
| `permissions.readAccess.member` (Required when parent is present) | `boolean` |   |
| `permissions.readAccess.api` (Required when parent is present) | `boolean` |   |
| `permissions.editAccess` (Required when parent is present) | `AccessObject` |   |
| `permissions.editAccess.admin` (Required when parent is present) | `boolean` |   |
| `permissions.editAccess.member` (Required when parent is present) | `boolean` |   |
| `permissions.editAccess.api` (Required when parent is present) | `boolean` |   |

**Example request body**

`application/json`

```json
{
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string"
}
```

### Responses

#### 200

Content type: `application/json` · `CustomPropertyResponse`

Same fields as [Create a new custom property (201)](https://www.subrite.no/developers/custom-property?md=true#post-api-v1-custom-properties).

#### 400

Content type: `application/json` · `ErrorResponse`

badRequest

Same fields as [Get all custom properties of the tenant paginated (400)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "badRequest",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

customPropertyNotFound

Same fields as [Get a custom property by id (404)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties-id).

**Example response**

`application/json`

```json
{
  "messageCode": "customPropertyNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get all custom properties of the tenant paginated (403)](https://www.subrite.no/developers/custom-property?md=true#get-api-v1-custom-properties).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/custom-properties/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string",
  "settings": {
    "isRequired": true,
    "isUnique": true,
    "isSearchable": true,
    "options": [],
    "maxLength": 0,
    "minValue": 0,
    "maxValue": 0,
    "regex": "string",
    "regexErrorMessageCode": "string",
    "defaultValue": "string",
    "sequenceStartNumber": 0,
    "helpText": {}
  },
  "permissions": {
    "readAccess": {},
    "editAccess": {}
  }
}'
```

### Example response

200 · `application/json`

```json
{
  "name": "string",
  "displayName": "string",
  "entity": "Member",
  "dataType": "string",
  "fieldType": "text",
  "description": "string",
  "settings": {
    "isRequired": true,
    "isUnique": true,
    "isSearchable": true,
    "options": [],
    "maxLength": 0,
    "minValue": 0,
    "maxValue": 0,
    "regex": "string",
    "regexErrorMessageCode": "string",
    "defaultValue": "string",
    "sequenceStartNumber": 0,
    "helpText": {}
  },
  "permissions": {
    "readAccess": {},
    "editAccess": {}
  },
  "order": 0,
  "tenantId": 0,
  "createdBy": 0,
  "updatedBy": 0,
  "tenant": {
    "market": "NO",
    "productName": "enterprise",
    "additionalFeatures": [],
    "disabledFeatures": [],
    "name": "string",
    "isActive": true,
    "defaultLanguage": "en",
    "hostName": "string",
    "logo": "string",
    "favicon": "string",
    "authLogo": "string",
    "authLogoHeight": 0,
    "siteUrl": "string",
    "termsUrl": "string",
    "privacyUrl": "string",
    "gtm": "string",
    "taxRates": [],
    "smsOtp": true,
    "emailProvider": "brevo",
    "tenantContact": "string",
    "registeredBusinessNo": "string",
    "bankAccountNo": "string",
    "swiftCode": "string",
    "iban": "<iban>",
    "defaultLogoutURL": "string",
    "postalAddress": "<postalAddress>",
    "otpTemplateId": {},
    "smsSenderId": 0,
    "emailSenderId": 0,
    "smsSender": {
      "metaData": {}
    },
    "emailSender": {
      "metaData": {}
    },
    "products": [],
    "users": [],
    "members": [],
    "roles": [],
    "subscriptionPlans": [],
    "packages": [],
    "invoices": [],
    "orders": [],
    "paymentProviders": [],
    "newslettersProviderConfig": [],
    "paymentProviderConfigs": [],
    "oidcClients": [],
    "oauthProviders": [],
    "activityLogs": [],
    "m2m_api_clients": [],
    "customProperties": [],
    "consents": [],
    "preference": {
      "inputFieldConfig": [],
      "customFieldsOnMemberCard": [],
      "customFieldsOnInvoice": [],
      "visibleAdditionalFieldsOnMypage": [],
      "metaData": {}
    },
    "settings": {
      "aiResidency": {},
      "metaData": {}
    },
    "communicationTemplates": [],
    "additionalHostnames": [],
    "exportHistory": [],
    "arReportHistory": [],
    "mypageCardsSettings": [],
    "webhooks": [],
    "customOrders": [],
    "customOrderSources": [],
    "brandKits": [],
    "communicationReceivers": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {}
  },
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {}
}
```
