# Products

At Zūm Rails one product can have one or more prices, these are called product prices and need to be informed at the moment of creating a product. Product prices can have different types of configurations such as Pricing Model and Frequency.

**Pricing Models Types**

<table><thead><tr><th width="120">Type</th><th>Behavior</th></tr></thead><tbody><tr><td>Standard</td><td>You should select standard pricing if you want to charge your users a fixed price per unit.</td></tr><tr><td>Package</td><td>You should select package pricing if you want to charge your users for a group of units. Say you charge $50 for every 10 units. If the user buys 15 units, he will be charged $100 by default.</td></tr></tbody></table>

**Frequency Types**

<table><thead><tr><th width="123">Type</th><th>Behavior</th></tr></thead><tbody><tr><td>OneTime</td><td>If this is a product which is available as a one time purchase by paying the full price right now, choose frequency “OneTime”.</td></tr><tr><td>Recurring</td><td>If this is a product which is available as a recurring subscription, choose frequency “Recurring".</td></tr></tbody></table>

## Creating a new product <a href="#creating-a-new-product" id="creating-a-new-product"></a>

Use this endpoint if you want to add a new product to your account.

`Method: POST`

`Endpoint: {{env}}/api/product`

{% tabs %}
{% tab title="Payload for product with one OneTime price" %}

```json
{
  "Name": "Test Product",
  "Description": "Product Description",
  "ProductPrices": [
    {
      "ProductPriceType": "Standard",
      "Price": 22.55,
      "PerUnit": 0,
      "Frequency": "OneTime",
      "PlanName": null,
      "PlanDescription": null,
      "BillingPeriod": null,
      "EnableSubscriptionEndDate": null,
      "SubscriptionEndDate": null,
      "EnableFreeTrial": false,
      "FreeTrialInDays": 0,
      "EnableSetupFee": false,
      "SetupFee": 0
    }
  ]
}
```

{% endtab %}

{% tab title="Payload for product with one Recurring price" %}

```json
{
  "Name": "Test Product",
  "Description": "Product Description",
  "ProductPrices": [
    {
      "ProductPriceType": "Standard",
      "Price": 123.25,
      "PerUnit": 0,
      "Frequency": "Recurring",
      "PlanName": "Platinum Plan",
      "PlanDescription": "Platinum plan description",
      "BillingPeriod": "Annually",
      "EnableSubscriptionEndDate": true,
      "SubscriptionEndDate": "2022-02-26",
      "EnableFreeTrial": false,
      "FreeTrialInDays": 0,
      "EnableSetupFee": false,
      "SetupFee": 0
    }
  ]
}
```

{% endtab %}
{% endtabs %}

**Input parameters**

<table><thead><tr><th width="211">Parameter</th><th width="93">Type</th><th width="165">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>string</td><td>yes</td><td>Product Name</td></tr><tr><td>Description</td><td>string</td><td>no</td><td>Product Description</td></tr><tr><td><strong>Prices</strong></td><td></td><td>yes</td><td></td></tr><tr><td>ProductPriceType</td><td>string</td><td>yes</td><td>Price Model</td></tr><tr><td>Price</td><td>decimal</td><td>yes</td><td>Price value</td></tr><tr><td>PerUnit</td><td>int</td><td>yes (if ProductPriceType is Package)</td><td>Package size</td></tr><tr><td>Frequency</td><td>decimal</td><td>yes</td><td>Price frequency</td></tr><tr><td>PlanName</td><td>string</td><td>yes (if Frequency is recurring)</td><td>Recurring plan name</td></tr><tr><td>PlanDescription</td><td>string</td><td>no</td><td>Price frequency</td></tr><tr><td>BillingPeriod</td><td>string</td><td>yes (if Frequency is recurring)</td><td>Billing Period Type</td></tr><tr><td>EnableSubscriptionEndDate</td><td>bool</td><td>no</td><td>Enable subscription end date</td></tr><tr><td>SubscriptionEndDate</td><td>date</td><td>yes (if EnableSubscriptionEndDate is true)</td><td>End date that makes subscription available</td></tr><tr><td>EnableFreeTrial</td><td>bool</td><td>no</td><td>Enable free trial feature</td></tr><tr><td>FreeTrialInDays</td><td>int</td><td>yes (if EnableFreeTrial is true)</td><td>Number of days for free trial</td></tr><tr><td>EnableSetupFee</td><td>bool</td><td>no</td><td>Enable setup fee</td></tr><tr><td>SetupFee</td><td>decimal</td><td>yes (if EnableSetupFee is true)</td><td>Number of days for free trial</td></tr></tbody></table>

**Billing Period Type**

<table><thead><tr><th width="204">Parameter</th><th width="154">Type</th><th>Description</th></tr></thead><tbody><tr><td>Monthly</td><td>string</td><td>Sets a monthly recurrence</td></tr><tr><td>Weekly</td><td>string</td><td>Sets a weekly recurrence</td></tr><tr><td>Biweekly</td><td>string</td><td>Sets a biweeky recurrence</td></tr><tr><td>Annually</td><td>string</td><td>Sets an annual recurrence</td></tr></tbody></table>

## Uploading a product picture

Use this endpoint if you want to upload a new image to a product.

`Method: PATCH`

`Endpoint: {{env}}/api/product/{{producId}}/uploadproductimage`

{% tabs %}
{% tab title="Payload" %}

```json
{
  "Bytes": "/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAUFBQUGBQYHBwYJCQgJCQ0MCwsMDRMODw4PDhMdEhUSEhUSHRofGRcZHxouJCAgJC41LSotNUA5OUBRTVFqao4BBQUFBQYFBgcHBgkJCAkJDQwLCwwNEw4PDg8OEx0SFRISFRIdGh8ZFxkfGi4kICAkLjUtKi01QDk5QFFNUWpqjv/CABEIBd0F3AMBIgACEQEDEQH/xAAdA...",
  "Filename": "marketing-kit-launch-binders-com-open-49901SD.jpg"
}
```

{% endtab %}
{% endtabs %}

**Input parameters**

<table><thead><tr><th width="168">Parameter</th><th width="157">Type</th><th width="156">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>Filename</td><td>string</td><td>yes</td><td>Files name</td></tr><tr><td>Bytes</td><td>string</td><td>yes</td><td>The file's blob</td></tr></tbody></table>

{% hint style="info" %}
**INFO**\
To remove a image send a request with Filename and Bytes values has `null`
{% endhint %}

## Update a product

Use this endpoint if you want to update a new product on your account.

`Method: PUT`

`Endpoint: {{env}}/api/product/{{product_id}}`

{% tabs %}
{% tab title="Payload" %}

```json
{
  "Name": "Test",
  "Description": "Teste",
  "ProductPrices": [
    {
      "Id": "68fe5724-7a8b-41d7-9e9c-350f15953d00",
      "ProductPriceType": "Standard",
      "Price": 123.25,
      "PerUnit": 0,
      "Frequency": "Recurring",
      "PlanName": "Test Recurring",
      "PlanDescription": "Test Description",
      "BillingPeriod": "Annually",
      "EnableSubscriptionEndDate": true,
      "SubscriptionEndDate": "2022-02-26",
      "EnableFreeTrial": false,
      "FreeTrialInDays": 0,
      "EnableSetupFee": false,
      "SetupFee": 0,
      "SetToRemove": true
    },
    {
      "ProductPriceType": "Standard",
      "Price": 25.67,
      "PerUnit": 0,
      "Frequency": "Recurring",
      "PlanName": "Test Recurring",
      "PlanDescription": "Test Description",
      "BillingPeriod": "Annually",
      "EnableSubscriptionEndDate": true,
      "SubscriptionEndDate": "2022-02-26",
      "EnableFreeTrial": false,
      "FreeTrialInDays": 0,
      "EnableSetupFee": false,
      "SetupFee": 0
    }
  ]
}
```

{% endtab %}
{% endtabs %}

**Input parameters**

<table><thead><tr><th width="195">Parameter</th><th width="119">Type</th><th width="156">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>string</td><td>yes</td><td>Product Name</td></tr><tr><td>Description</td><td>string</td><td>no</td><td>Product Description</td></tr><tr><td><strong>Prices</strong></td><td></td><td>yes</td><td></td></tr><tr><td>Id</td><td>guid</td><td>yes (only if you are editing)</td><td>The Id for the product price</td></tr><tr><td>ProductPriceType</td><td>string</td><td>yes</td><td>Price Model</td></tr><tr><td>Price</td><td>decimal</td><td>yes</td><td>Price value</td></tr><tr><td>PerUnit</td><td>int</td><td>yes (if ProductPriceType is Package)</td><td>Package size</td></tr><tr><td>Frequency</td><td>decimal</td><td>yes</td><td>Price frequency</td></tr><tr><td>PlanName</td><td>string</td><td>yes (if Frequency is recurring)</td><td>Recurring plan name</td></tr><tr><td>PlanDescription</td><td>string</td><td>no</td><td>Price frequency</td></tr><tr><td>BillingPeriod</td><td>string</td><td>yes (if Frequency is recurring)</td><td>Billing Period Type</td></tr><tr><td>EnableSubscriptionEndDate</td><td>bool</td><td>no</td><td>Enable subscription end date</td></tr><tr><td>SubscriptionEndDate</td><td>date</td><td>yes (if EnableSubscriptionEndDate is true)</td><td>End date that makes subscription available</td></tr><tr><td>EnableFreeTrial</td><td>bool</td><td>no</td><td>Enable free trial feature</td></tr><tr><td>FreeTrialInDays</td><td>int</td><td>yes (if EnableFreeTrial is true)</td><td>Number of days for free trial</td></tr><tr><td>EnableSetupFee</td><td>bool</td><td>no</td><td>Enable setup fee</td></tr><tr><td>SetupFee</td><td>decimal</td><td>yes (if EnableSetupFee is true)</td><td>Number of days for free trial</td></tr><tr><td>SetToRemove</td><td>bool</td><td>yes (only if you are editing)</td><td>This will remove the product price of the product if set to true</td></tr></tbody></table>

## Get a specific product <a href="#get-a-specific-product" id="get-a-specific-product"></a>

Use this endpoint if you want to get all the information for a specific product.

`Method: GET`

`Endpoint: {{env}}/api/product/{product_id}`

{% tabs %}
{% tab title="Response" %}

```json
{
  "statusCode": 200,
  "message": "GET Request successful.",
  "isError": false,
  "result": {
    "Id": "2ab8f5fa-02a7-4e91-a426-ef09adab3fc8",
    "Name": "Test",
    "Description": "Test",
    "ProductStatus": "Active",
    "ProductPrices": [
      {
        "Id": "037b8b2e-9cc0-4059-a246-f4c02e3564d4",
        "ProductId": "2ab8f5fa-02a7-4e91-a426-ef09adab3fc8",
        "CreatedAt": "2022-02-11T17:25:26.970291",
        "ProductPriceType": "Standard",
        "ProductPriceStatus": "Active",
        "Price": 25.67,
        "PerUnit": 0,
        "Frequency": "Recurring",
        "PlanName": "Test Recurring",
        "PlanDescription": "Test Description",
        "BillingPeriod": "Annually",
        "EnableSubscriptionEndDate": true,
        "SubscriptionEndDate": "2022-02-26T03:00:00",
        "EnableFreeTrial": false,
        "FreeTrialInDays": 0,
        "EnableSetupFee": false,
        "SetupFee": 0,
        "Currency": "CAD",
        "Product": {
          "Id": "2ab8f5fa-02a7-4e91-a426-ef09adab3fc8",
          "Name": "Test",
          "Description": "Test",
          "ProductStatus": "Active",
          "CustomerId": "e9a6db53-1c9b-491d-9ecb-cfb6c6f3d035"
        }
      }
    ],
    "ConnectUrl": "connect_url",
    "CreatedAt": "2022-02-11T15:22:29.58586"
  }
}
```

{% endtab %}
{% endtabs %}

**Response**

<table><thead><tr><th width="260">Parameter</th><th width="93">Type</th><th>Description</th></tr></thead><tbody><tr><td>Id</td><td>guid</td><td>Product id</td></tr><tr><td>Name</td><td>string</td><td>Product Name</td></tr><tr><td>Description</td><td>string</td><td>Product Description</td></tr><tr><td>ProductStatus</td><td>string</td><td>Status for the product</td></tr><tr><td>ConnectUrl</td><td>string</td><td>Public url for access to this product</td></tr><tr><td>CreatedAt</td><td>date</td><td>Creation date</td></tr><tr><td><strong>ProductPrices</strong></td><td></td><td></td></tr><tr><td>Id</td><td>string</td><td>The Id for the product price</td></tr><tr><td>ProductId</td><td>string</td><td>The Id for the product on witch is related</td></tr><tr><td>CreatedAt</td><td>date</td><td>Creation date</td></tr><tr><td>ProductPriceType</td><td>string</td><td>Price Model</td></tr><tr><td>ProductPriceStatus</td><td>string</td><td>Status for the product price</td></tr><tr><td>Price</td><td>decimal</td><td>Price</td></tr><tr><td>PerUnit</td><td>string</td><td>Package size</td></tr><tr><td>Frequency</td><td>string</td><td>Price frequency</td></tr><tr><td>PlanName</td><td>string</td><td>Plan name</td></tr><tr><td>PlanDescription</td><td>string</td><td>Plan description</td></tr><tr><td>BillingPeriod</td><td>string</td><td>Billing Period Type</td></tr><tr><td>EnableSubscriptionEndDate</td><td>bool</td><td>Enable subscription end date</td></tr><tr><td>SubscriptionEndDate</td><td>date</td><td>End date that makes subscription available</td></tr><tr><td>EnableFreeTrial</td><td>bool</td><td>Enable free trial feature</td></tr><tr><td>FreeTrialInDays</td><td>int</td><td>Number of days for free trial</td></tr><tr><td>EnableSetupFee</td><td>bool</td><td>Enable setup fee</td></tr><tr><td>SetupFee</td><td>decimal</td><td>Number of days for free trial</td></tr><tr><td>Currency</td><td>string</td><td>Currency set for the product price</td></tr></tbody></table>

## Search a product <a href="#search-a-product" id="search-a-product"></a>

This endpoint will return products based on the filter informed. Products are returned with pagination, which means that if you need to retrieve all products you need to call the same endpoint incrementing the CurrentPage.

`Method: POST`

`Endpoint: {{env}}/api/product/filter`

{% tabs %}
{% tab title="Payload" %}

```json
{
  "CreatedAt": "2022-02-07T03:00:00.000Z",
  "CreatedAtOperator": "isInTheLast",
  "ProductStatus": 0,
  "GenericSearch": "Product",
  "Pagination": {
    "PageNumber": 1,
    "ItemsPerPage": 7
  }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "statusCode": 200,
  "message": "POST Request successful.",
  "isError": false,
  "result": {
    "CurrentPage": 1,
    "PageSize": 7,
    "TotalCount": 2,
    "Items": [
      {
        "Id": "48711cce-c191-4491-8e22-11b9c0b8a967",
        "Name": "Test Product",
        "Description": "Product Description",
        "ProductStatus": "Active",
        "ProductPrices": [
          {
            "Id": "9f80a875-a1d3-4202-a859-4eafa669ff08",
            "ProductId": "48711cce-c191-4491-8e22-11b9c0b8a967",
            "CreatedAt": "2022-02-11T15:17:32.185776",
            "ProductPriceType": "Standard",
            "ProductPriceStatus": "Active",
            "Price": 22.55,
            "PerUnit": 0,
            "Frequency": "OneTime",
            "EnableFreeTrial": false,
            "FreeTrialInDays": 0,
            "EnableSetupFee": false,
            "SetupFee": 0,
            "Currency": "CAD",
            "Product": {
              "Id": "48711cce-c191-4491-8e22-11b9c0b8a967",
              "Name": "Test Product",
              "Description": "Product Description",
              "ProductStatus": "Active",
              "CustomerId": "e9a6db53-1c9b-491d-9ecb-cfb6c6f3d035"
            }
          },
          {
            "Id": "e70eb52e-4938-4b0b-97a0-12f366febf04",
            "ProductId": "48711cce-c191-4491-8e22-11b9c0b8a967",
            "CreatedAt": "2022-02-11T15:17:32.185777",
            "ProductPriceType": "Standard",
            "ProductPriceStatus": "Active",
            "Price": 35.68,
            "PerUnit": 0,
            "Frequency": "OneTime",
            "EnableFreeTrial": false,
            "FreeTrialInDays": 0,
            "EnableSetupFee": false,
            "SetupFee": 0,
            "Currency": "CAD",
            "Product": {
              "Id": "48711cce-c191-4491-8e22-11b9c0b8a967",
              "Name": "Test Product",
              "Description": "Product Description",
              "ProductStatus": "Active",
              "CustomerId": "e9a6db53-1c9b-491d-9ecb-cfb6c6f3d035"
            }
          }
        ],
        "CreatedAt": "2022-02-11T15:17:32.300689"
      },
      {
        "Id": "2c467d94-7e81-4154-a4b8-293c369c4fbf",
        "Name": "Test Product",
        "Description": "Product Description",
        "ProductStatus": "Active",
        "ProductPrices": [
          {
            "Id": "9a7bb825-361d-4258-9c70-9fbe10119eba",
            "ProductId": "2c467d94-7e81-4154-a4b8-293c369c4fbf",
            "CreatedAt": "2022-02-11T15:16:59.488244",
            "ProductPriceType": "Standard",
            "ProductPriceStatus": "Active",
            "Price": 22.55,
            "PerUnit": 0,
            "Frequency": "OneTime",
            "EnableFreeTrial": false,
            "FreeTrialInDays": 0,
            "EnableSetupFee": false,
            "SetupFee": 0,
            "Currency": "CAD",
            "Product": {
              "Id": "2c467d94-7e81-4154-a4b8-293c369c4fbf",
              "Name": "Test Product",
              "Description": "Product Description",
              "ProductStatus": "Active",
              "CustomerId": "e9a6db53-1c9b-491d-9ecb-cfb6c6f3d035"
            }
          },
          {
            "Id": "fe07c018-beaa-42be-9a8c-0b75944bc70e",
            "ProductId": "2c467d94-7e81-4154-a4b8-293c369c4fbf",
            "CreatedAt": "2022-02-11T15:16:59.488246",
            "ProductPriceType": "Standard",
            "ProductPriceStatus": "Active",
            "Price": 35.68,
            "PerUnit": 0,
            "Frequency": "OneTime",
            "EnableFreeTrial": false,
            "FreeTrialInDays": 0,
            "EnableSetupFee": false,
            "SetupFee": 0,
            "Currency": "CAD",
            "Product": {
              "Id": "2c467d94-7e81-4154-a4b8-293c369c4fbf",
              "Name": "Test Product",
              "Description": "Product Description",
              "ProductStatus": "Active",
              "CustomerId": "e9a6db53-1c9b-491d-9ecb-cfb6c6f3d035"
            }
          }
        ],
        "CreatedAt": "2022-02-11T15:16:59.67639"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

**Input parameters**

<table><thead><tr><th width="194">Parameter</th><th width="109">Type</th><th width="121">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>GenericSearch</td><td>string</td><td>no</td><td>Filter products by product name or product id</td></tr><tr><td>ProductStatus</td><td>string</td><td>no</td><td>Product status</td></tr><tr><td>CreatedAt</td><td>datetime</td><td>no</td><td>Create date</td></tr><tr><td>CreatedAtOperator</td><td>string</td><td>no</td><td>Operator to filter with CreatedAt properties</td></tr><tr><td><strong>Pagination</strong></td><td></td><td>no</td><td></td></tr><tr><td>PageNumber</td><td>number</td><td>no</td><td>The respective page, starting at 1</td></tr><tr><td>ItemsPerPage</td><td>number</td><td>no</td><td>The amount of items per page between 0 and 100</td></tr></tbody></table>

**Response**

<table><thead><tr><th width="231.800048828125">Parameter</th><th width="99">Type</th><th width="294">Description</th></tr></thead><tbody><tr><td>CurrentPage</td><td>number</td><td>The current page</td></tr><tr><td>PageSize</td><td>number</td><td>The amount of rows returned in the current page</td></tr><tr><td>TotalCount</td><td>number</td><td>The total rows the filter returns</td></tr><tr><td><strong>Items</strong></td><td></td><td>List of products</td></tr><tr><td>Id</td><td>guid</td><td>The product Id</td></tr><tr><td>Name</td><td>string</td><td>The product name</td></tr><tr><td>Description</td><td>string</td><td>The product description</td></tr><tr><td>ProductStatus</td><td>string</td><td>The status for the product</td></tr><tr><td>CreatedAt</td><td>date</td><td>The creation date for the product</td></tr><tr><td><strong>ProductPrices</strong></td><td></td><td>List of Product Prices</td></tr><tr><td>Id</td><td>guid</td><td>The product price Id</td></tr><tr><td>ProductId</td><td>guid</td><td>The Id for the product where this product price is used</td></tr><tr><td>CreatedAt</td><td>date</td><td>The creation date for the product price</td></tr><tr><td>ProductPriceType</td><td>string</td><td>The pricing model for the price</td></tr><tr><td>ProductPriceStatus</td><td>string</td><td>The status for the product price</td></tr><tr><td>Price</td><td>decimal</td><td>Price</td></tr><tr><td>PerUnit</td><td>string</td><td>Package size</td></tr><tr><td>Frequency</td><td>string</td><td>Price frequency</td></tr><tr><td>PlanName</td><td>string</td><td>ecurring plan name (if Frequency is recurring)</td></tr><tr><td>PlanDescription</td><td>string</td><td>Price frequency</td></tr><tr><td>BillingPeriod</td><td>string</td><td>Billing Period Type (if Frequency is recurring)</td></tr><tr><td>EnableSubscriptionEndDate</td><td>bool</td><td>Enable subscription end date</td></tr><tr><td>SubscriptionEndDate</td><td>date</td><td>kes subscription available (if EnableSubscriptionEndDate is true)</td></tr><tr><td>EnableFreeTrial</td><td>bool</td><td>Enable free trial feature</td></tr><tr><td>FreeTrialInDays</td><td>int</td><td>Number of days for free trial (if EnableFreeTrial is true)</td></tr><tr><td>EnableSetupFee</td><td>bool</td><td>Enable setup fee</td></tr><tr><td>SetupFee</td><td>decimal</td><td>Number of days for free trial (if EnableSetupFee is true)</td></tr><tr><td>Currency</td><td>string</td><td>Currency selected for the product price</td></tr><tr><td><strong>Product</strong></td><td></td><td>Related product</td></tr><tr><td>Id</td><td>guid</td><td>Id for the Product</td></tr><tr><td>Name</td><td>string</td><td>Product name</td></tr><tr><td>Description</td><td>string</td><td>Product Description</td></tr><tr><td>ProductStatus</td><td>string</td><td>Product status</td></tr><tr><td>CustomerId</td><td>guid</td><td>Id for the related customer</td></tr></tbody></table>

{% hint style="info" %}
**TIP**

If you need to search for a specific product, we recommend that you retrieve the product id and then use the GET specific product endpoint to retrieve the detailed information about the product.
{% endhint %}

## Archive a product

Use this endpoint if you want to archive a product. Once archived, the product will not be visible in any end user facing screens. If there are any active subscriptions or invoices they will remain until cancelled.

`Method: PATCH`

`Endpoint: {{env}}/api/product/{{product_id}}/archive`

{% tabs %}
{% tab title="Response" %}

```json
{
  "statusCode": 200,
  "message": "PATCH Request successful.",
  "isError": false,
  "result": {
    "Id": "2ab8f5fa-02a7-4e91-a426-ef09adab3fc8",
    "Name": "Product",
    "Description": "",
    "ProductStatus": "Archived",
    "CreatedAt": "2022-02-11T15:22:29.58586"
  }
}
```

{% endtab %}
{% endtabs %}

**Response**

<table><thead><tr><th width="212.60003662109375">Parameter</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>Id</td><td>guid</td><td>The product Id</td></tr><tr><td>Name</td><td>string</td><td>The product name</td></tr><tr><td>Description</td><td>string</td><td>The product description</td></tr><tr><td>ProductStatus</td><td>string</td><td>The status for the product</td></tr><tr><td>CreatedAt</td><td>date</td><td>The creation date for the product</td></tr></tbody></table>

Use this endpoint if you want to archive a product.

## Unarchive a product

Use this endpoint if you want to unarchive a product. Once unarchive, the product will be visible in any end user facing screens. If there are any active subscriptions or invoices they will remain until unaffected.

`Method: PATCH`

`Endpoint: {{env}}/api/product/{{product_id}}/unarchive`

{% tabs %}
{% tab title="Response" %}

```json
{
  "statusCode": 200,
  "message": "PATCH Request successful.",
  "isError": false,
  "result": {
    "Id": "2ab8f5fa-02a7-4e91-a426-ef09adab3fc8",
    "Name": "Product",
    "Description": "",
    "ProductStatus": "Active",
    "CreatedAt": "2022-02-11T15:22:29.58586"
  }
}
```

{% endtab %}
{% endtabs %}

**Response**

<table><thead><tr><th width="251">Parameter</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td>Id</td><td>guid</td><td>The product Id</td></tr><tr><td>Name</td><td>string</td><td>The product name</td></tr><tr><td>Description</td><td>string</td><td>The product description</td></tr><tr><td>ProducStatus</td><td>string</td><td>The status for the product</td></tr><tr><td>CreatedAt</td><td>date</td><td>The creation date for the product</td></tr></tbody></table>

## Delete a product

Use this endpoint if you want to delete a product. Once delete, the product will not be visible or available to any end user or administrator.

`Method: DELETE`

`Endpoint: {{env}}/api/product/{{product_id}}`

{% tabs %}
{% tab title="Response" %}

```json
{
  "statusCode": 200,
  "message": "DELETE Request successful.",
  "isError": false,
  "result": "Request completed"
}
```

{% endtab %}
{% endtabs %}

```
```
