# Product

**Summary:** Endpoints for Product

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

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

`GET /api/v1/products`

**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` |
| `orderDirection` | query | `string` | Allowed values: `"asc"`, `"desc"` · Default: `"desc"` |
| `orderBy` | query | `string` | Allowed values: `"createdAt"`, `"id"`, `"updatedAt"`, `"name"`, `"price"` · Default: `"createdAt"` |
| `isOptional` | query | `boolean` |   |
| `status` | query | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `name` | query | `string` |   |

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `items` (Required) | `array of ProductResponse` |   |
| `items[].productCategory` (Required when parent is present) | `string` | Allowed values: `"digital_subscription"`, `"physical_subscription"`, `"physical"`, `"event_ticket"`, `"PHYSICAL_PRODUCT"` |
| `items[].tenantId` (Required when parent is present) | `number` |   |
| `items[].name` (Required when parent is present) | `string` |   |
| `items[].uuid` (Required when parent is present) | `string` |   |
| `items[].isOptional` (Required when parent is present) | `boolean` |   |
| `items[].price` (Required when parent is present) | `number` |   |
| `items[].currency` (Required when parent is present) | `string` |   |
| `items[].tax` (Required when parent is present) | `number` |   |
| `items[].stock` (Required when parent is present) | `number` |   |
| `items[].maxQuantityPerOrder` (Required when parent is present) | `number` |   |
| `items[].ean` (Required when parent is present) | `string` |   |
| `items[].allowFutureStartDate` (Required when parent is present) | `boolean` |   |
| `items[].assignSeatToOwner` (Required when parent is present) | `boolean` |   |
| `items[].supportsIpAccess` (Required when parent is present) | `boolean` |   |
| `items[].status` (Required when parent is present) | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `items[].properties` (Required when parent is present) | `object` |   |
| `items[].shippingCharges` (Required when parent is present) | `array of ShippingCharge` |   |
| `items[].shippingCharges[].country` (Required when parent is present) | `string` |   |
| `items[].shippingCharges[].charge` (Required when parent is present) | `number` |   |
| `items[].description` (Required when parent is present) | `string` |   |
| `items[].circulationType` (Required when parent is present) | `string` | Allowed values: `"subscription"`, `"single_copy"` · Can be null |
| `items[].publicationDays` (Required when parent is present) | `string` | Can be null |
| `items[].diProductCode` (Required when parent is present) | `string` | Can be null |
| `items[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `items[].entityTags` (Required when parent is present) | `array of EntityTag` |   |
| `items[].entityTags[].productId` (Required when parent is present) | `number` |   |
| `items[].entityTags[].tagId` (Required when parent is present) | `number` |   |
| `items[].entityTags[].subscriptionPlanId` (Required when parent is present) | `number` |   |
| `items[].entityTags[].tag` (Required when parent is present) | `Tag` | Nested fields omitted: depth limit. |
| `items[].entityTags[].product` (Required when parent is present) | `Product` | Nested fields omitted: depth limit. |
| `items[].entityTags[].subscriptionPlan` (Required when parent is present) | `SubscriptionPlan` | Nested fields omitted: depth limit. |
| `items[].entityTags[].visualWorkflowId` (Required when parent is present) | `number` |   |
| `items[].entityTags[].visualWorkflow` (Required when parent is present) | `VisualWorkflow` | Nested fields omitted: depth limit. |
| `items[].entityTags[].id` (Required when parent is present) | `number` |   |
| `items[].entityTags[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].entityTags[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].entityTags[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].entityTags[].metaData` (Required when parent is present) | `object` |   |
| `items[].subscriptionPlanProducts` (Required when parent is present) | `array of SubscriptionPlanProduct` |   |
| `items[].subscriptionPlanProducts[].subscriptionPlanId` (Required when parent is present) | `number` |   |
| `items[].subscriptionPlanProducts[].productId` (Required when parent is present) | `number` |   |
| `items[].subscriptionPlanProducts[].price` (Required when parent is present) | `number` |   |
| `items[].subscriptionPlanProducts[].properties` (Required when parent is present) | `OptionalProductProperties` | Nested fields omitted: depth limit. |
| `items[].subscriptionPlanProducts[].subscriptionPlan` (Required when parent is present) | `SubscriptionPlan` | Nested fields omitted: depth limit. |
| `items[].subscriptionPlanProducts[].product` (Required when parent is present) | `Product` | Nested fields omitted: depth limit. |
| `items[].subscriptionPlanProducts[].tenantId` (Required when parent is present) | `number` |   |
| `items[].subscriptionPlanProducts[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: depth limit. |
| `items[].subscriptionPlanProducts[].id` (Required when parent is present) | `number` |   |
| `items[].subscriptionPlanProducts[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].subscriptionPlanProducts[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].subscriptionPlanProducts[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `items[].subscriptionPlanProducts[].metaData` (Required when parent is present) | `object` |   |
| `items[].packageProducts` (Required when parent is present) | `array of PackageProduct` | Nested fields omitted: field limit. |
| `items[].memberPackageProducts` (Required when parent is present) | `array of MemberPackageProduct` | Nested fields omitted: field limit. |
| `items[].orderItem` (Required when parent is present) | `array of OrderItem` | Nested fields omitted: field limit. |
| `items[].productContents` (Required when parent is present) | `array of ProductContent` | 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` |   |
| `items[].tags` | `array of string` |   |
| `items[].memberFields` | `array of string` | Allowed values: `"email"`, `"fullName"`, `"phone"`, `"address"` |
| `items[].hasInternationalShipping` | `boolean` |   |
| `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`

Query validation failed; field codes in errors\[\]

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"` |
| `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 products of the tenant (403)](https://www.subrite.no/developers/product?md=true#get-api-v1-products).

### Example request

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

### Example response

200 · `application/json`

```json
{
  "items": [
    {
      "properties": {},
      "shippingCharges": [],
      "entityTags": [],
      "subscriptionPlanProducts": [],
      "packageProducts": [],
      "memberPackageProducts": [],
      "orderItem": [],
      "productContents": [],
      "metaData": {},
      "tags": [],
      "memberFields": []
    }
  ],
  "meta": {
    "page": 0,
    "take": 0,
    "count": 0,
    "pageCount": 0,
    "hasPreviousPage": true,
    "hasNextPage": true
  }
}
```

<a id="post-api-v1-products"></a>
## Create a new product

`POST /api/v1/products`

**Authentication:** Bearer token (JWT)

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `productCategory` (Required) | `ProductCategory` | Allowed values: `"digital_subscription"`, `"physical_subscription"`, `"physical"`, `"event_ticket"`, `"PHYSICAL_PRODUCT"` |
| `hasInternationalShipping` | `boolean` |   |
| `circulationType` | `CIRCULATION_TYPE` | How printed copies are sold: the DI Abo file (subscription) or LOS (single\_copy). · Allowed values: `"subscription"`, `"single_copy"` · Can be null |
| `publicationDays` | `string` | Weekdays the product is published, ascending digits 1-7 where 1 is Monday. · `pattern`: `/^(?=.)1?2?3?4?5?6?7?$/` · Can be null |
| `diProductCode` | `string` | DI's code for the title, up to 5 letters or digits. · `pattern`: `/^[A-Za-z0-9]{1,5}$/` · Can be null |
| `name` (Required) | `string` |   |
| `price` (Required) | `number` | `minimum`: `0` |
| `currency` (Required) | `string` |   |
| `tax` (Required) | `number` | `minimum`: `0`, `maximum`: `1` |
| `stock` (Required) | `number` | `minimum`: `-1` |
| `maxQuantityPerOrder` (Required) | `number` | `minimum`: `0` |
| `allowFutureStartDate` (Required) | `boolean` |   |
| `status` (Required) | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `isOptional` (Required) | `boolean` |   |
| `tags` (Required) | `array of string` |   |
| `ean` | `string` |   |
| `description` | `string` |   |
| `assignSeatToOwner` | `boolean` |   |
| `supportsIpAccess` | `boolean` |   |

**Example request body**

`application/json`

```json
{
  "productCategory": "digital_subscription",
  "hasInternationalShipping": true,
  "circulationType": "subscription",
  "publicationDays": "4",
  "diProductCode": "ABC",
  "name": "string",
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": -1,
  "maxQuantityPerOrder": 0,
  "allowFutureStartDate": true,
  "status": "draft",
  "isOptional": true,
  "tags": [
    "string"
  ],
  "ean": "string",
  "description": "string",
  "assignSeatToOwner": true,
  "supportsIpAccess": true
}
```

### Responses

#### 201

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

| Name | Type | Description |
| --- | --- | --- |
| `productCategory` (Required) | `string` | Allowed values: `"digital_subscription"`, `"physical_subscription"`, `"physical"`, `"event_ticket"`, `"PHYSICAL_PRODUCT"` |
| `tenantId` (Required) | `number` |   |
| `name` (Required) | `string` |   |
| `uuid` (Required) | `string` |   |
| `isOptional` (Required) | `boolean` |   |
| `price` (Required) | `number` |   |
| `currency` (Required) | `string` |   |
| `tax` (Required) | `number` |   |
| `stock` (Required) | `number` |   |
| `maxQuantityPerOrder` (Required) | `number` |   |
| `ean` (Required) | `string` |   |
| `allowFutureStartDate` (Required) | `boolean` |   |
| `assignSeatToOwner` (Required) | `boolean` |   |
| `supportsIpAccess` (Required) | `boolean` |   |
| `status` (Required) | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `properties` (Required) | `object` |   |
| `shippingCharges` (Required) | `array of ShippingCharge` |   |
| `shippingCharges[].country` (Required when parent is present) | `string` |   |
| `shippingCharges[].charge` (Required when parent is present) | `number` |   |
| `description` (Required) | `string` |   |
| `circulationType` (Required) | `string` | Allowed values: `"subscription"`, `"single_copy"` · Can be null |
| `publicationDays` (Required) | `string` | Can be null |
| `diProductCode` (Required) | `string` | Can be null |
| `tenant` (Required) | `Tenant` | Nested fields omitted: field limit. |
| `entityTags` (Required) | `array of EntityTag` |   |
| `entityTags[].productId` (Required when parent is present) | `number` |   |
| `entityTags[].tagId` (Required when parent is present) | `number` |   |
| `entityTags[].subscriptionPlanId` (Required when parent is present) | `number` |   |
| `entityTags[].tag` (Required when parent is present) | `Tag` | Nested fields omitted: field limit. |
| `entityTags[].product` (Required when parent is present) | `Product` | Nested fields omitted: field limit. |
| `entityTags[].subscriptionPlan` (Required when parent is present) | `SubscriptionPlan` | Nested fields omitted: field limit. |
| `entityTags[].visualWorkflowId` (Required when parent is present) | `number` |   |
| `entityTags[].visualWorkflow` (Required when parent is present) | `VisualWorkflow` | Nested fields omitted: field limit. |
| `entityTags[].id` (Required when parent is present) | `number` |   |
| `entityTags[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `entityTags[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `entityTags[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `entityTags[].metaData` (Required when parent is present) | `object` |   |
| `subscriptionPlanProducts` (Required) | `array of SubscriptionPlanProduct` |   |
| `subscriptionPlanProducts[].subscriptionPlanId` (Required when parent is present) | `number` |   |
| `subscriptionPlanProducts[].productId` (Required when parent is present) | `number` |   |
| `subscriptionPlanProducts[].price` (Required when parent is present) | `number` |   |
| `subscriptionPlanProducts[].properties` (Required when parent is present) | `OptionalProductProperties` |   |
| `subscriptionPlanProducts[].properties.isRequired` (Required when parent is present) | `boolean` |   |
| `subscriptionPlanProducts[].properties.quantityRange` (Required when parent is present) | `number` |   |
| `subscriptionPlanProducts[].subscriptionPlan` (Required when parent is present) | `SubscriptionPlan` | Nested fields omitted: field limit. |
| `subscriptionPlanProducts[].product` (Required when parent is present) | `Product` | Nested fields omitted: field limit. |
| `subscriptionPlanProducts[].tenantId` (Required when parent is present) | `number` |   |
| `subscriptionPlanProducts[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `subscriptionPlanProducts[].id` (Required when parent is present) | `number` |   |
| `subscriptionPlanProducts[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `subscriptionPlanProducts[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `subscriptionPlanProducts[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `subscriptionPlanProducts[].metaData` (Required when parent is present) | `object` |   |
| `packageProducts` (Required) | `array of PackageProduct` |   |
| `packageProducts[].packageId` (Required when parent is present) | `number` |   |
| `packageProducts[].productId` (Required when parent is present) | `number` |   |
| `packageProducts[].price` (Required when parent is present) | `number` |   |
| `packageProducts[].properties` (Required when parent is present) | `OptionalProductProperties` | Nested fields omitted: field limit. |
| `packageProducts[].package` (Required when parent is present) | `Package` | Nested fields omitted: field limit. |
| `packageProducts[].product` (Required when parent is present) | `Product` | Nested fields omitted: field limit. |
| `packageProducts[].tenantId` (Required when parent is present) | `number` |   |
| `packageProducts[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `packageProducts[].id` (Required when parent is present) | `number` |   |
| `packageProducts[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `packageProducts[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `packageProducts[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `packageProducts[].metaData` (Required when parent is present) | `object` |   |
| `memberPackageProducts` (Required) | `array of MemberPackageProduct` | Nested fields omitted: field limit. |
| `orderItem` (Required) | `array of OrderItem` | Nested fields omitted: field limit. |
| `productContents` (Required) | `array of ProductContent` | 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` |   |
| `tags` | `array of string` |   |
| `memberFields` | `array of string` | Allowed values: `"email"`, `"fullName"`, `"phone"`, `"address"` |
| `hasInternationalShipping` | `boolean` |   |

#### 400

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

Body validation failed; field codes in errors\[\]. productNameAlreadyExists arrives in errors\[\] against `name` when a live product of the same type (main or optional) already uses it

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

```bash
curl https://api.subrite.no/api/v1/products \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "productCategory": "digital_subscription",
  "hasInternationalShipping": true,
  "circulationType": "subscription",
  "publicationDays": "4",
  "diProductCode": "ABC",
  "name": "string",
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": -1,
  "maxQuantityPerOrder": 0,
  "allowFutureStartDate": true,
  "status": "draft",
  "isOptional": true,
  "tags": [
    "string"
  ],
  "ean": "string",
  "description": "string",
  "assignSeatToOwner": true,
  "supportsIpAccess": true
}'
```

### Example response

201 · `application/json`

```json
{
  "productCategory": "digital_subscription",
  "tenantId": 0,
  "name": "string",
  "uuid": "string",
  "isOptional": true,
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": 0,
  "maxQuantityPerOrder": 0,
  "ean": "string",
  "allowFutureStartDate": true,
  "assignSeatToOwner": true,
  "supportsIpAccess": true,
  "status": "draft",
  "properties": {},
  "shippingCharges": [
    {}
  ],
  "description": "string",
  "circulationType": "subscription",
  "publicationDays": "string",
  "diProductCode": "string",
  "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": {}
  },
  "entityTags": [
    {
      "metaData": {}
    }
  ],
  "subscriptionPlanProducts": [
    {
      "metaData": {}
    }
  ],
  "packageProducts": [
    {
      "metaData": {}
    }
  ],
  "memberPackageProducts": [
    {
      "memberPackageProductEmailDomains": [],
      "memberPackageProductIps": [],
      "seats": [],
      "recipients": [],
      "metaData": {}
    }
  ],
  "orderItem": [
    {
      "metaData": {}
    }
  ],
  "productContents": [
    {}
  ],
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {},
  "tags": [
    "string"
  ],
  "memberFields": [
    "email"
  ],
  "hasInternationalShipping": true
}
```

<a id="get-api-v1-products-all"></a>
## Get products by filters

`GET /api/v1/products/all`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `isOptional` | query | `boolean` |   |
| `status` | query | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `name` | query | `string` |   |

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `[].productCategory` (Required when parent is present) | `string` | Allowed values: `"digital_subscription"`, `"physical_subscription"`, `"physical"`, `"event_ticket"`, `"PHYSICAL_PRODUCT"` |
| `[].tenantId` (Required when parent is present) | `number` |   |
| `[].name` (Required when parent is present) | `string` |   |
| `[].uuid` (Required when parent is present) | `string` |   |
| `[].isOptional` (Required when parent is present) | `boolean` |   |
| `[].price` (Required when parent is present) | `number` |   |
| `[].currency` (Required when parent is present) | `string` |   |
| `[].tax` (Required when parent is present) | `number` |   |
| `[].stock` (Required when parent is present) | `number` |   |
| `[].maxQuantityPerOrder` (Required when parent is present) | `number` |   |
| `[].ean` (Required when parent is present) | `string` |   |
| `[].allowFutureStartDate` (Required when parent is present) | `boolean` |   |
| `[].assignSeatToOwner` (Required when parent is present) | `boolean` |   |
| `[].supportsIpAccess` (Required when parent is present) | `boolean` |   |
| `[].status` (Required when parent is present) | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `[].properties` (Required when parent is present) | `object` |   |
| `[].shippingCharges` (Required when parent is present) | `array of ShippingCharge` |   |
| `[].shippingCharges[].country` (Required when parent is present) | `string` |   |
| `[].shippingCharges[].charge` (Required when parent is present) | `number` |   |
| `[].description` (Required when parent is present) | `string` |   |
| `[].circulationType` (Required when parent is present) | `string` | Allowed values: `"subscription"`, `"single_copy"` · Can be null |
| `[].publicationDays` (Required when parent is present) | `string` | Can be null |
| `[].diProductCode` (Required when parent is present) | `string` | Can be null |
| `[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `[].entityTags` (Required when parent is present) | `array of EntityTag` |   |
| `[].entityTags[].productId` (Required when parent is present) | `number` |   |
| `[].entityTags[].tagId` (Required when parent is present) | `number` |   |
| `[].entityTags[].subscriptionPlanId` (Required when parent is present) | `number` |   |
| `[].entityTags[].tag` (Required when parent is present) | `Tag` | Nested fields omitted: field limit. |
| `[].entityTags[].product` (Required when parent is present) | `Product` | Nested fields omitted: field limit. |
| `[].entityTags[].subscriptionPlan` (Required when parent is present) | `SubscriptionPlan` | Nested fields omitted: field limit. |
| `[].entityTags[].visualWorkflowId` (Required when parent is present) | `number` |   |
| `[].entityTags[].visualWorkflow` (Required when parent is present) | `VisualWorkflow` | Nested fields omitted: field limit. |
| `[].entityTags[].id` (Required when parent is present) | `number` |   |
| `[].entityTags[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].entityTags[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].entityTags[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].entityTags[].metaData` (Required when parent is present) | `object` |   |
| `[].subscriptionPlanProducts` (Required when parent is present) | `array of SubscriptionPlanProduct` |   |
| `[].subscriptionPlanProducts[].subscriptionPlanId` (Required when parent is present) | `number` |   |
| `[].subscriptionPlanProducts[].productId` (Required when parent is present) | `number` |   |
| `[].subscriptionPlanProducts[].price` (Required when parent is present) | `number` |   |
| `[].subscriptionPlanProducts[].properties` (Required when parent is present) | `OptionalProductProperties` |   |
| `[].subscriptionPlanProducts[].properties.isRequired` (Required when parent is present) | `boolean` |   |
| `[].subscriptionPlanProducts[].properties.quantityRange` (Required when parent is present) | `number` |   |
| `[].subscriptionPlanProducts[].subscriptionPlan` (Required when parent is present) | `SubscriptionPlan` | Nested fields omitted: field limit. |
| `[].subscriptionPlanProducts[].product` (Required when parent is present) | `Product` | Nested fields omitted: field limit. |
| `[].subscriptionPlanProducts[].tenantId` (Required when parent is present) | `number` |   |
| `[].subscriptionPlanProducts[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `[].subscriptionPlanProducts[].id` (Required when parent is present) | `number` |   |
| `[].subscriptionPlanProducts[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].subscriptionPlanProducts[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].subscriptionPlanProducts[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].subscriptionPlanProducts[].metaData` (Required when parent is present) | `object` |   |
| `[].packageProducts` (Required when parent is present) | `array of PackageProduct` |   |
| `[].packageProducts[].packageId` (Required when parent is present) | `number` |   |
| `[].packageProducts[].productId` (Required when parent is present) | `number` |   |
| `[].packageProducts[].price` (Required when parent is present) | `number` |   |
| `[].packageProducts[].properties` (Required when parent is present) | `OptionalProductProperties` | Nested fields omitted: field limit. |
| `[].packageProducts[].package` (Required when parent is present) | `Package` | Nested fields omitted: field limit. |
| `[].packageProducts[].product` (Required when parent is present) | `Product` | Nested fields omitted: field limit. |
| `[].packageProducts[].tenantId` (Required when parent is present) | `number` |   |
| `[].packageProducts[].tenant` (Required when parent is present) | `Tenant` | Nested fields omitted: field limit. |
| `[].packageProducts[].id` (Required when parent is present) | `number` |   |
| `[].packageProducts[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].packageProducts[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].packageProducts[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].packageProducts[].metaData` (Required when parent is present) | `object` |   |
| `[].memberPackageProducts` (Required when parent is present) | `array of MemberPackageProduct` | Nested fields omitted: field limit. |
| `[].orderItem` (Required when parent is present) | `array of OrderItem` | Nested fields omitted: field limit. |
| `[].productContents` (Required when parent is present) | `array of ProductContent` | Nested fields omitted: field limit. |
| `[].id` (Required when parent is present) | `number` |   |
| `[].createdAt` (Required when parent is present) | `string (date-time)` |   |
| `[].updatedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].deletedAt` (Required when parent is present) | `string (date-time)` |   |
| `[].metaData` (Required when parent is present) | `object` |   |
| `[].tags` | `array of string` |   |
| `[].memberFields` | `array of string` | Allowed values: `"email"`, `"fullName"`, `"phone"`, `"address"` |
| `[].hasInternationalShipping` | `boolean` |   |

#### 400

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

Query validation failed; field codes in errors\[\]

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

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

### Example response

200 · `application/json`

```json
[
  {
    "productCategory": "digital_subscription",
    "tenantId": 0,
    "name": "string",
    "uuid": "string",
    "isOptional": true,
    "price": 0,
    "currency": "string",
    "tax": 0,
    "stock": 0,
    "maxQuantityPerOrder": 0,
    "ean": "string",
    "allowFutureStartDate": true,
    "assignSeatToOwner": true,
    "supportsIpAccess": true,
    "status": "draft",
    "properties": {},
    "shippingCharges": [],
    "description": "string",
    "circulationType": "subscription",
    "publicationDays": "string",
    "diProductCode": "string",
    "tenant": {
      "additionalFeatures": [],
      "disabledFeatures": [],
      "taxRates": [],
      "products": [],
      "users": [],
      "members": [],
      "roles": [],
      "subscriptionPlans": [],
      "packages": [],
      "invoices": [],
      "orders": [],
      "paymentProviders": [],
      "newslettersProviderConfig": [],
      "paymentProviderConfigs": [],
      "oidcClients": [],
      "oauthProviders": [],
      "activityLogs": [],
      "m2m_api_clients": [],
      "customProperties": [],
      "consents": [],
      "communicationTemplates": [],
      "additionalHostnames": [],
      "exportHistory": [],
      "arReportHistory": [],
      "mypageCardsSettings": [],
      "webhooks": [],
      "customOrders": [],
      "customOrderSources": [],
      "brandKits": [],
      "communicationReceivers": [],
      "metaData": {}
    },
    "entityTags": [],
    "subscriptionPlanProducts": [],
    "packageProducts": [],
    "memberPackageProducts": [],
    "orderItem": [],
    "productContents": [],
    "id": 0,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "deletedAt": "2019-08-24T14:15:22Z",
    "metaData": {},
    "tags": [],
    "memberFields": [],
    "hasInternationalShipping": true
  }
]
```

<a id="get-api-v1-products-id"></a>
## Get a product by id

`GET /api/v1/products/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

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

#### 400

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

The id is not an integer

| 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

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

**Example response**

`application/json`

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

#### 404

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

productNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"productNotFound"` |
| `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": "productNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

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

internalServerError

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

### Example request

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

### Example response

200 · `application/json`

```json
{
  "productCategory": "digital_subscription",
  "tenantId": 0,
  "name": "string",
  "uuid": "string",
  "isOptional": true,
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": 0,
  "maxQuantityPerOrder": 0,
  "ean": "string",
  "allowFutureStartDate": true,
  "assignSeatToOwner": true,
  "supportsIpAccess": true,
  "status": "draft",
  "properties": {},
  "shippingCharges": [
    {}
  ],
  "description": "string",
  "circulationType": "subscription",
  "publicationDays": "string",
  "diProductCode": "string",
  "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": {}
  },
  "entityTags": [
    {
      "metaData": {}
    }
  ],
  "subscriptionPlanProducts": [
    {
      "metaData": {}
    }
  ],
  "packageProducts": [
    {
      "metaData": {}
    }
  ],
  "memberPackageProducts": [
    {
      "memberPackageProductEmailDomains": [],
      "memberPackageProductIps": [],
      "seats": [],
      "recipients": [],
      "metaData": {}
    }
  ],
  "orderItem": [
    {
      "metaData": {}
    }
  ],
  "productContents": [
    {}
  ],
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {},
  "tags": [
    "string"
  ],
  "memberFields": [
    "email"
  ],
  "hasInternationalShipping": true
}
```

<a id="delete-api-v1-products-id"></a>
## Delete a product

`DELETE /api/v1/products/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

#### 400

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

The id is not an integer, or the product is still referenced by a plan, package or channel

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"productUsedInSubscriptionPlans"`, `"productUsedInPackages"`, `"productUsedInContentChannels"` |
| `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 products of the tenant (403)](https://www.subrite.no/developers/product?md=true#get-api-v1-products).

**Example response**

`application/json`

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

#### 404

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

productNotFound

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

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

<a id="patch-api-v1-products-id"></a>
## Update a product

`PATCH /api/v1/products/{id}`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `productCategory` | `ProductCategory` | Allowed values: `"digital_subscription"`, `"physical_subscription"`, `"physical"`, `"event_ticket"`, `"PHYSICAL_PRODUCT"` |
| `hasInternationalShipping` | `boolean` |   |
| `circulationType` | `CIRCULATION_TYPE` | How printed copies are sold: the DI Abo file (subscription) or LOS (single\_copy). · Allowed values: `"subscription"`, `"single_copy"` · Can be null |
| `publicationDays` | `string` | Weekdays the product is published, ascending digits 1-7 where 1 is Monday. · `pattern`: `/^(?=.)1?2?3?4?5?6?7?$/` · Can be null |
| `diProductCode` | `string` | DI's code for the title, up to 5 letters or digits. · `pattern`: `/^[A-Za-z0-9]{1,5}$/` · Can be null |
| `memberFields` | `array of MemberFields` | Allowed values: `"email"`, `"fullName"`, `"phone"`, `"address"` |
| `name` | `string` |   |
| `price` | `number` | `minimum`: `0` |
| `currency` | `string` |   |
| `tax` | `number` | `minimum`: `0`, `maximum`: `1` |
| `stock` | `number` | `minimum`: `-1` |
| `maxQuantityPerOrder` | `number` | `minimum`: `0` |
| `allowFutureStartDate` | `boolean` |   |
| `status` | `string` | Allowed values: `"draft"`, `"published"`, `"archived"` |
| `isOptional` | `boolean` |   |
| `tags` | `array of string` |   |
| `ean` | `string` |   |
| `description` | `string` |   |
| `assignSeatToOwner` | `boolean` |   |
| `supportsIpAccess` | `boolean` |   |

**Example request body**

`application/json`

```json
{
  "productCategory": "digital_subscription",
  "hasInternationalShipping": true,
  "circulationType": "subscription",
  "publicationDays": "4",
  "diProductCode": "ABC",
  "memberFields": [
    "email"
  ],
  "name": "string",
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": -1,
  "maxQuantityPerOrder": 0,
  "allowFutureStartDate": true,
  "status": "draft",
  "isOptional": true,
  "tags": [
    "string"
  ],
  "ean": "string",
  "description": "string",
  "assignSeatToOwner": true,
  "supportsIpAccess": true
}
```

### Responses

#### 200

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

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

#### 400

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

Body validation failed, the id is not an integer, or IP ranges are still registered. memberSeatsCannotBeDecreased arrives in errors\[\] against maxQuantityPerOrder, and productNameAlreadyExists against `name`

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"badRequest"`, `"internalServerError"`, `"cannotDisableIpAccessWhileIpRangesExist"` |
| `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 products of the tenant (403)](https://www.subrite.no/developers/product?md=true#get-api-v1-products).

**Example response**

`application/json`

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

#### 404

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

productNotFound

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

#### 503

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

The seat expansion could not be queued; nothing was saved

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"productOwnerAccessPropagationFailed"` |
| `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": "productOwnerAccessPropagationFailed",
  "message": "string",
  "errors": [
    {}
  ]
}
```

### Example request

```bash
curl 'https://api.subrite.no/api/v1/products/{id}' \
  --request PATCH \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "productCategory": "digital_subscription",
  "hasInternationalShipping": true,
  "circulationType": "subscription",
  "publicationDays": "4",
  "diProductCode": "ABC",
  "memberFields": [
    "email"
  ],
  "name": "string",
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": -1,
  "maxQuantityPerOrder": 0,
  "allowFutureStartDate": true,
  "status": "draft",
  "isOptional": true,
  "tags": [
    "string"
  ],
  "ean": "string",
  "description": "string",
  "assignSeatToOwner": true,
  "supportsIpAccess": true
}'
```

### Example response

200 · `application/json`

```json
{
  "productCategory": "digital_subscription",
  "tenantId": 0,
  "name": "string",
  "uuid": "string",
  "isOptional": true,
  "price": 0,
  "currency": "string",
  "tax": 0,
  "stock": 0,
  "maxQuantityPerOrder": 0,
  "ean": "string",
  "allowFutureStartDate": true,
  "assignSeatToOwner": true,
  "supportsIpAccess": true,
  "status": "draft",
  "properties": {},
  "shippingCharges": [
    {}
  ],
  "description": "string",
  "circulationType": "subscription",
  "publicationDays": "string",
  "diProductCode": "string",
  "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": {}
  },
  "entityTags": [
    {
      "metaData": {}
    }
  ],
  "subscriptionPlanProducts": [
    {
      "metaData": {}
    }
  ],
  "packageProducts": [
    {
      "metaData": {}
    }
  ],
  "memberPackageProducts": [
    {
      "memberPackageProductEmailDomains": [],
      "memberPackageProductIps": [],
      "seats": [],
      "recipients": [],
      "metaData": {}
    }
  ],
  "orderItem": [
    {
      "metaData": {}
    }
  ],
  "productContents": [
    {}
  ],
  "id": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z",
  "metaData": {},
  "tags": [
    "string"
  ],
  "memberFields": [
    "email"
  ],
  "hasInternationalShipping": true
}
```

<a id="get-api-v1-products-productid-content-channels"></a>
## Get content channels associated to a product

`GET /api/v1/products/{productId}/content-channels`

**Authentication:** Bearer token (JWT)

### Parameters

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

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `[].contentChannelId` (Required when parent is present) | `number` |   |
| `[].contentChannelName` (Required when parent is present) | `string` |   |

#### 400

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

The productId is not an integer

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

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

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

**Example response**

`application/json`

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

#### 404

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

productNotFound

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

**Example response**

`application/json`

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

#### 500

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

internalServerError

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

### Example request

```bash
curl 'https://api.subrite.no/api/v1/products/{productId}/content-channels' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
[
  {
    "contentChannelId": 0,
    "contentChannelName": "string"
  }
]
```
