---
title: add_product
slug: docs/addproduct
docTags: 
createdAt: 2021-08-04T18:23:02.000Z
---

This allows you to add products to your applicants by sending over an array of product IDs. The products must already be created within the product editing page before adding them. Private products can be created "on the spot" if desired, but this is less recommended.

# Basic parameters

| Name           | Type    | Required | Description                                                                                                                                                                                                                                                                                                                                                                             |
| -------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action`       | string  | true     | `add_product`                                                                                                                                                                                                                                                                                                                                                                           |
| `group_id`     | numeric | true     | This designates which project the action should be applied towards.                                                                                                                                                                                                                                                                                                                     |
| `clogin_id`    | numeric | false    | This is a central login ID that identifies a user within your organization.<br /><br />Organizations can have multiple projects that the same user can register in. If you know the `clogin_id` from a separate project, you can use it to connect the accounts. <br /><br />`clogin_id` should be `false` for a user who is being created for the first time within your organization. |
| `product_list` | object  | true     | JSON that provides `p_id`, `q`, and other optional arguments. See below for more.                                                                                                                                                                                                                                                                                                       |

# `product_list` parameters

See the products section for more information on the product types.

| Name                   | Product Type                 | Variable Type | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------- | ---------------------------- | ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `p_id`                 | all, except private products | integer       | true     | `p_id` for the product you'd like to add can be found on the product management page by editing the product properties and looking under the product information tab.<br />If creating a private product, `name` is required instead (since private products have no pre-existing `p_id` ).                                                                                                                                                                                                                             |
| `q`                    | all                          | integer       | true     | The quantity of the product you'd like to add.<br /><br />Note that the system will only add a single product if you set `q`>1 and "Product can only be ordered once" is turned on in the product editing page.                                                                                                                                                                                                                                                                                                         |
| `product_remark`       | all                          | string        | false    | This is a remark you can add to the applicant's cart about this product. You can use this for personalized information.                                                                                                                                                                                                                                                                                                                                                                                                 |
| `recurring_start_date` | recurring                    | string        | false    | This allows you to set when a recurring product started if you'd like it not to be the current date. The default format is "mm-dd-yyyy", but you can set the structure with `date_structure`.                                                                                                                                                                                                                                                                                                                           |
| `date_structure`       | recurring                    | string        | false    | Allows you to choose between "yyyy-mm-dd", "dd-mm-yyyy", or the default "mm-dd-yyyy".                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `name`                 | private                      | string        | true\*   | The name of the private product                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `price`                | private                      | numeric       | true\*   | The price of the private product                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `sessions`             | session                      | array         | false    | An array of session IDs that you would like to add. The session IDs can be accessed on the product editing page. Adds all sessions by default.                                                                                                                                                                                                                                                                                                                                                                          |
| `selected_days`        | session                      | array         | false    | This allows you to specify which days *within* a session you would like to add by passing an array of dates for each session. The dates are supplied in mySQL format.<br /><br />See the partial session sample below for more on how to structure this call.<br /><br />Note that any restrictions placed on the sessions themselves will overide any calls through the API. For instance if you supply an amount of days less than the minimum required partial selection, then the system will not add the sessions. |

\*`true` only for private products.&#x20;

# Validation and troubleshooting

Similar to `update`, there are a number of behind-the-scenes validation actions that are occurring whenever you attempt to add a product via the API.&#x20;

### Situations in which no updates occur


There are three common scenarios in which an `add_product` call will be made, but no product will be added for the user.

- If you attempt to add a product to a user which does not exist in the project, the system will not add the product.
- If you attempt to add a product to a user who does exist, however `p_id` does not exist in the project, then the system will not add any product (excepting private products).
- Finally, if you attempt to add a product to a user who does exist, however the request does not conform to the product's selection requirements, then the system will not add any product. For instance if you attempt to add a product who's quota has already been filled, or which is not yet available or expired, then the system will prevent the API action.



## One time event

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990586,
            "q": 1
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990586,
            "q": 1
        }
    ]
}
add_product_event_json = json.dumps(payload)
add_product_event_response = requests.post(url=users_endpoint, 
                                           data=add_product_event_json, 
                                           headers=headers, 
                                           timeout=10)
```
:::

### Response

```json
{
  "msg": "Products added successfully",
  "cart": [
    {
      "reg_id": "102715754",
      "cart_id": "10006192",
      "p_id": "1990586",
      "is_holder_product": "0",
      "parent_product": "1990586",
      "session_id": null,
      "is_session_product": "0",
      "is_session_subproduct": "0",
      "pp_protected": null,
      "pp_protected_amount": "0",
      "session_checkin_total_items": "0",
      "cat_id": "81407",
      "base_product_type": "1",
      "zero_product_presentation": "0",
      "product_present_text_value": "",
      "allow_waitlist": "0",
      "lock_after_paid": "1",
      "lock_in_cart": "0",
      "force_paid_first": "0",
      "lock_once_funds_allocated": "1",
      "session_start_unix": "1638338400",
      "session_end_unix": "1639634399",
      "disable_regsurance": "0",
      "opt_in_regsurance": "0",
      "location": null,
      "internalid": null,
      "instructor": null,
      "disable_time_conflict": "0",
      "discount_presented_as": null,
      "p_name": "Event Product",
      "is_recurring": "0",
      "recurring_cart_parent_id": null,
      "original_session_price": null,
      "day_session_final_price": null,
      "recurring_structure": null,
      "recurring_structure_custom_num": "0",
      "recurring_trigger_start": null,
      "recurring_allow_user_disable": "0",
      "recurring_allow_upgrade": "0",
      "recurring_upgrade_text": null,
      "recur_total_instances": "0",
      "recur_completed_instances": "0",
      "recurring_id": null,
      "recurring_text": "",
      "recurring_comment": "",
      "recurring_pause_comment": "",
      "recurring_messages": null,
      "recurring_instances_left": null,
      "recur_on_original": "0",
      "recur_done": "0",
      "is_recurring_single": "0",
      "recur_allow_renew": "0",
      "recurring_valid_grace": null,
      "recur_autorenew_pid": "0",
      "recur_autorenew_disabled": "0",
      "recur_autorenew_instance": "0",
      "recur_autorenew_done": "0",
      "recur_user_disabled": "0",
      "recur_pause_on": null,
      "recur_resume_on": null,
      "recur_on": "0",
      "recur_end": "0",
      "recur_overall_end": "0",
      "session_start_date_readable": "Wed, Dec 01st, 2021",
      "session_end_date_readable": "Wed, Dec 15th, 2021",
      "session_days_text": null,
      "auto_generated_session_name": "0",
      "allow_partial_enrollment": null,
      "session_remarks": null,
      "original_session_product_price": null,
      "selected_session_days": null,
      "total_session_days": null,
      "session_start_date": "2021-12-01",
      "session_end_date": "2021-12-15",
      "product_total_orders": "1",
      "product_total_pf": "0",
      "product_quota_ordered_full": "0",
      "product_quota_paid_full": "0",
      "special_remarks": "",
      "product_short_remarks": "",
      "skip_paidfor": 0,
      "q": "1",
      "waitlist": "0",
      "price": "500",
      "price_in_cart": "500",
      "total_price": "500.00",
      "locked": "0",
      "delivered": "0",
      "delivered_on": null,
      "delivered_on_ts": null,
      "paid_for": "0",
      "paid_for_amount": "0",
      "paid_for_amount_remark": null,
      "paid_for_additional_remark": null,
      "pf": "0",
      "paid_for_order": "0",
      "cat_order": "1",
      "product_order": "19",
      "conn_fee": "0",
      "tax_fee": "0",
      "original_price": null,
      "amount_paid_with_discount": "0",
      "amount_paid_with_incart_discount": "0",
      "paid_in_full_by_discount": "0",
      "base_discount_remark": null,
      "incart_discount_remark": null,
      "total_discount_remark": " ",
      "discount_product_in_cart": "0",
      "markoff_discount": "0",
      "regsurance_cart_value": "0",
      "regsurance_product": "0",
      "creation_date": "2021-12-08 17:20:11",
      "cart_datestamp": "1638943200",
      "creation_date_readable": "December 8th 2021",
      "paid_on_readable": null,
      "total_order": "662.50",
      "total_payment": "100.00",
      "total_paid_for": "0.00",
      "total_delivered": "0.00",
      "first_name": "Kenny",
      "last_name": "Burrell",
      "org_name": null,
      "discount_remark": "",
      "p_remarks": "",
      "in_cart": "1",
      "in_cart_waitlist": "0"
    }
  ],
  "success": true,
  "user_info": {
    "clogin_id": "102715754",
    "group_id": "100909072",
    "connected_to": "102715737"
  },
  "meta_info": {
    "u_name": "Kenny Burrell",
    "total_forms": "6",
    "completed_forms": "2",
    "total_user_forms": "6",
    "total_completed_user_forms": "2",
    "total_user_mandatory_forms": "6",
    "total_completed_user_mandatory_forms": "2",
    "total_order": "662.50",
    "total_paid": "100.00",
    "total_balance": "562.50",
    "status_id": "0",
    "status_name": null,
    "status_color": null,
    "application_date": "Dec 8th 2021 17:07",
    "application_date_raw": "2021-12-08 17:07:40",
    "u_comments": "0",
    "group_id": "100909072",
    "uid": "4085256",
    "clogin_id": "102715754",
    "excluded": "0",
    "connected_to": "102715737",
    "total_user_tags": "0",
    "user_tag_ids": null,
    "total_non_excluded_children": null,
    "star": "0",
    "admin_initials": null,
    "admin_color": null,
    "assigned_admin_id": null
  }
}
```

## Complete session

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990568,
            "q": 1
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990568,
            "q": 1
        }
    ]
}
add_product_complete_session_json = json.dumps(payload)
add_product_complete_session_response = requests.post(url=users_endpoint, 
                                                      data=add_product_complete_session_json, 
                                                      headers=headers, 
                                                      timeout=10)
```
:::

### Response

```json
{
    "msg": "Products added successfully",
    "cart": [
        {
            "reg_id": "102715754",
            "cart_id": "10006180",
            "p_id": "1990568",
            "is_holder_product": "1",
            "parent_product": "1990568",
            "session_id": null,
            "is_session_product": "0",
            "is_session_subproduct": "0",
            "pp_protected": null,
            "pp_protected_amount": "0",
            "session_checkin_total_items": "0",
            "cat_id": "81407",
            "base_product_type": "3",
            "zero_product_presentation": "0",
            "product_present_text_value": "",
            "allow_waitlist": "0",
            "lock_after_paid": "1",
            "lock_in_cart": "0",
            "force_paid_first": "0",
            "lock_once_funds_allocated": "1",
            "session_start_unix": null,
            "session_end_unix": null,
            "disable_regsurance": "0",
            "opt_in_regsurance": "0",
            "location": null,
            "internalid": null,
            "instructor": null,
            "disable_time_conflict": "0",
            "discount_presented_as": null,
            "p_name": "Session Product",
            "is_recurring": "0",
            "recurring_cart_parent_id": null,
            "original_session_price": null,
            "day_session_final_price": null,
            "recurring_structure": null,
            "recurring_structure_custom_num": "0",
            "recurring_trigger_start": null,
            "recurring_allow_user_disable": "0",
            "recurring_allow_upgrade": "0",
            "recurring_upgrade_text": null,
            "recur_total_instances": "0",
            "recur_completed_instances": "0",
            "recurring_id": null,
            "recurring_text": "",
            "recurring_comment": "",
            "recurring_pause_comment": "",
            "recurring_messages": null,
            "recurring_instances_left": null,
            "recur_on_original": "0",
            "recur_done": "0",
            "is_recurring_single": "0",
            "recur_allow_renew": "0",
            "recurring_valid_grace": null,
            "recur_autorenew_pid": "0",
            "recur_autorenew_disabled": "0",
            "recur_autorenew_instance": "0",
            "recur_autorenew_done": "0",
            "recur_user_disabled": "0",
            "recur_pause_on": null,
            "recur_resume_on": null,
            "recur_on": "0",
            "recur_end": "0",
            "recur_overall_end": "0",
            "session_start_date_readable": null,
            "session_end_date_readable": null,
            "session_days_text": null,
            "auto_generated_session_name": "0",
            "allow_partial_enrollment": null,
            "session_remarks": null,
            "original_session_product_price": null,
            "selected_session_days": null,
            "total_session_days": null,
            "session_start_date": null,
            "session_end_date": null,
            "product_total_orders": "1",
            "product_total_pf": "0",
            "product_quota_ordered_full": "0",
            "product_quota_paid_full": "0",
            "special_remarks": "",
            "product_short_remarks": "",
            "skip_paidfor": 0,
            "q": "1",
            "waitlist": "0",
            "price": "0",
            "price_in_cart": "0",
            "total_price": "0.00",
            "locked": "0",
            "delivered": "0",
            "delivered_on": null,
            "delivered_on_ts": null,
            "paid_for": "0",
            "paid_for_amount": "0",
            "paid_for_amount_remark": null,
            "paid_for_additional_remark": null,
            "pf": "0",
            "paid_for_order": "0",
            "cat_order": "1",
            "product_order": "1",
            "conn_fee": "0",
            "tax_fee": "0",
            "original_price": null,
            "amount_paid_with_discount": "0",
            "amount_paid_with_incart_discount": "0",
            "paid_in_full_by_discount": "0",
            "base_discount_remark": null,
            "incart_discount_remark": null,
            "total_discount_remark": " ",
            "discount_product_in_cart": "0",
            "markoff_discount": "0",
            "regsurance_cart_value": "0",
            "regsurance_product": "0",
            "creation_date": "2021-12-08 17:20:11",
            "cart_datestamp": "1638943200",
            "creation_date_readable": "December 8th 2021",
            "paid_on_readable": null,
            "total_order": "406.25",
            "total_payment": "100.00",
            "total_paid_for": "81.25",
            "total_delivered": "0.00",
            "first_name": "Kenny",
            "last_name": "Burrell",
            "org_name": null,
            "discount_remark": "",
            "p_remarks": "",
            "in_cart": "1",
            "in_cart_waitlist": "0"
        }
    ],
    "success": true,
    "user_info": {
        "clogin_id": "102715754",
        "group_id": "100909072",
        "connected_to": "102715737"
    },
    "meta_info": {
        "u_name": "Kenny Burrell",
        "total_forms": "6",
        "completed_forms": "1",
        "total_user_forms": "6",
        "total_completed_user_forms": "1",
        "total_user_mandatory_forms": "6",
        "total_completed_user_mandatory_forms": "1",
        "total_order": "0.00",
        "total_paid": "100.00",
        "total_balance": "-100.00",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:07",
        "application_date_raw": "2021-12-08 17:07:40",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085256",
        "clogin_id": "102715754",
        "excluded": "0",
        "connected_to": "102715737",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": null,
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```

## Partial session

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990568,
            "q": 1,
            "sessions": [
                1990569
            ]
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990568,
            "q": 1,
            "sessions": [
                1990569
            ]
        }
    ]
}
add_product_partial_session_json = json.dumps(payload)
add_product_partial_session_response = requests.post(url=users_endpoint, 
                                                     data=add_product_partial_session_json, 
                                                     headers=headers, 
                                                     timeout=10)
```
:::

### Response

```json
{
    "msg": "Products added successfully",
    "cart": [
        {
            "reg_id": "102715754",
            "cart_id": "10006181",
            "p_id": "1990569",
            "is_holder_product": "0",
            "parent_product": "1990568",
            "session_id": "1990569",
            "is_session_product": "1",
            "is_session_subproduct": "0",
            "pp_protected": null,
            "pp_protected_amount": "0",
            "session_checkin_total_items": "0",
            "cat_id": "81407",
            "base_product_type": "4",
            "zero_product_presentation": "0",
            "product_present_text_value": "",
            "allow_waitlist": "0",
            "lock_after_paid": "1",
            "lock_in_cart": "0",
            "force_paid_first": "0",
            "lock_once_funds_allocated": "1",
            "session_start_unix": "1638370800",
            "session_end_unix": "1640214000",
            "disable_regsurance": "0",
            "opt_in_regsurance": "0",
            "location": null,
            "internalid": null,
            "instructor": null,
            "disable_time_conflict": "0",
            "discount_presented_as": null,
            "p_name": "Session Product: Wed, Dec 01st, 2021 > Wed, Dec 22nd, 2021",
            "is_recurring": "0",
            "recurring_cart_parent_id": null,
            "original_session_price": "100",
            "day_session_final_price": null,
            "recurring_structure": null,
            "recurring_structure_custom_num": "0",
            "recurring_trigger_start": null,
            "recurring_allow_user_disable": "0",
            "recurring_allow_upgrade": "0",
            "recurring_upgrade_text": null,
            "recur_total_instances": "0",
            "recur_completed_instances": "0",
            "recurring_id": null,
            "recurring_text": "",
            "recurring_comment": "",
            "recurring_pause_comment": "",
            "recurring_messages": null,
            "recurring_instances_left": null,
            "recur_on_original": "0",
            "recur_done": "0",
            "is_recurring_single": "0",
            "recur_allow_renew": "0",
            "recurring_valid_grace": null,
            "recur_autorenew_pid": "0",
            "recur_autorenew_disabled": "0",
            "recur_autorenew_instance": "0",
            "recur_autorenew_done": "0",
            "recur_user_disabled": "0",
            "recur_pause_on": null,
            "recur_resume_on": null,
            "recur_on": "0",
            "recur_end": "0",
            "recur_overall_end": "0",
            "session_start_date_readable": "Wed, Dec 01st, 2021",
            "session_end_date_readable": "Wed, Dec 22nd, 2021",
            "session_days_text": "<div class=\"session_day_holder\"><label>Mon</label></div><div class=\"session_day_holder\"><label>Tue</label></div><div class=\"session_day_holder\"><label>Wed</label></div><div class=\"session_day_holder\"><label>Thu</label></div><div class=\"session_day_holder\"><label>Fri</label></div><div class=\"session_day_holder\"><label>&#xbb; 9:00 am - 5:00 pm</label></div>",
            "auto_generated_session_name": "1",
            "allow_partial_enrollment": "1",
            "session_remarks": "You are enrolled to 10 out of 16 days. The price presented is a prorated price of $162.50 instead of $100 based on $16.25 avg per day.",
            "original_session_product_price": "100",
            "selected_session_days": "10",
            "total_session_days": "16",
            "session_start_date": "2021-12-01",
            "session_end_date": "2021-12-22",
            "product_total_orders": "1",
            "product_total_pf": "0",
            "product_quota_ordered_full": "0",
            "product_quota_paid_full": "0",
            "special_remarks": "",
            "product_short_remarks": "",
            "skip_paidfor": 0,
            "q": "1",
            "waitlist": "0",
            "price": "162.5",
            "price_in_cart": "162.5",
            "total_price": "162.50",
            "locked": "1",
            "delivered": "0",
            "delivered_on": null,
            "delivered_on_ts": null,
            "paid_for": "0",
            "paid_for_amount": "100",
            "paid_for_amount_remark": "$100 has been allocated to this item. Item balance: $62.50.",
            "paid_for_additional_remark": "Payment transaction 6659419 for $100 made on December 8th 2021 was <i>allocated in full</i> to this item.",
            "pf": "0",
            "paid_for_order": "1",
            "cat_order": "1",
            "product_order": "2",
            "conn_fee": "0",
            "tax_fee": "0",
            "original_price": null,
            "amount_paid_with_discount": "0",
            "amount_paid_with_incart_discount": "0",
            "paid_in_full_by_discount": "0",
            "base_discount_remark": null,
            "incart_discount_remark": null,
            "total_discount_remark": " ",
            "discount_product_in_cart": "0",
            "markoff_discount": "0",
            "regsurance_cart_value": "0",
            "regsurance_product": "0",
            "creation_date": "2021-12-08 17:20:11",
            "cart_datestamp": "1638943200",
            "creation_date_readable": "December 8th 2021",
            "paid_on_readable": null,
            "total_order": "162.50",
            "total_payment": "100.00",
            "total_paid_for": "0.00",
            "total_delivered": "0.00",
            "first_name": "Kenny",
            "last_name": "Burrell",
            "org_name": null,
            "discount_remark": "",
            "p_remarks": "",
            "in_cart": "1",
            "in_cart_waitlist": "0"
        }
    ],
    "success": true,
    "user_info": {
        "clogin_id": "102715754",
        "group_id": "100909072",
        "connected_to": "102715737"
    },
    "meta_info": {
        "u_name": "Kenny Burrell",
        "total_forms": "6",
        "completed_forms": "2",
        "total_user_forms": "6",
        "total_completed_user_forms": "2",
        "total_user_mandatory_forms": "6",
        "total_completed_user_mandatory_forms": "2",
        "total_order": "162.50",
        "total_paid": "100.00",
        "total_balance": "62.50",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:07",
        "application_date_raw": "2021-12-08 17:07:40",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085256",
        "clogin_id": "102715754",
        "excluded": "0",
        "connected_to": "102715737",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": null,
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```

## Recurring product

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990589,
            "q": 1,
            "recurring_start_date": "1959-08-17",
            "date_structure": "yyyy-mm-dd"
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990589,
            "q": 1,
            "recurring_start_date": "1959-08-17",
            "date_structure": "yyyy-mm-dd"
        }
    ]
}
add_product_recurring_json = json.dumps(payload)
add_product_recurring_response = requests.post(url=users_endpoint, 
                                               data=add_product_recurring_json, 
                                               headers=headers, 
                                               timeout=10)
```
:::

### Response

```json
{
    "msg": "Products added successfully",
    "cart": [
                {
            "reg_id": "102715754",
            "cart_id": "10006193",
            "p_id": "1990589",
            "is_holder_product": "0",
            "parent_product": "1990589",
            "session_id": null,
            "is_session_product": "0",
            "is_session_subproduct": "0",
            "pp_protected": null,
            "pp_protected_amount": "0",
            "session_checkin_total_items": "0",
            "cat_id": "81407",
            "base_product_type": "6",
            "zero_product_presentation": "0",
            "product_present_text_value": "",
            "allow_waitlist": "0",
            "lock_after_paid": "1",
            "lock_in_cart": "0",
            "force_paid_first": "0",
            "lock_once_funds_allocated": "1",
            "session_start_unix": null,
            "session_end_unix": null,
            "disable_regsurance": "0",
            "opt_in_regsurance": "0",
            "location": null,
            "internalid": null,
            "instructor": null,
            "disable_time_conflict": "0",
            "discount_presented_as": null,
            "p_name": "Subscription Product",
            "is_recurring": "1",
            "recurring_cart_parent_id": "10006193",
            "original_session_price": null,
            "day_session_final_price": null,
            "recurring_structure": "monthly",
            "recurring_structure_custom_num": "0",
            "recurring_trigger_start": "dateadded",
            "recurring_allow_user_disable": "0",
            "recurring_allow_upgrade": "0",
            "recurring_upgrade_text": null,
            "recur_total_instances": "1",
            "recur_completed_instances": "1",
            "recurring_id": null,
            "recurring_text": "",
            "recurring_comment": "",
            "recurring_pause_comment": "",
            "recurring_messages": null,
            "recurring_instances_left": "0",
            "recur_on_original": "0",
            "recur_done": "0",
            "is_recurring_single": "1",
            "recur_allow_renew": "1",
            "recurring_valid_grace": "1",
            "recur_autorenew_pid": "1990589",
            "recur_autorenew_disabled": "0",
            "recur_autorenew_instance": "0",
            "recur_autorenew_done": "0",
            "recur_user_disabled": "0",
            "recur_pause_on": null,
            "recur_resume_on": null,
            "recur_on": "1638943260",
            "recur_end": "1641621540",
            "recur_overall_end": "1641621540",
            "session_start_date_readable": null,
            "session_end_date_readable": null,
            "session_days_text": null,
            "auto_generated_session_name": "0",
            "allow_partial_enrollment": null,
            "session_remarks": null,
            "original_session_product_price": null,
            "selected_session_days": null,
            "total_session_days": null,
            "session_start_date": null,
            "session_end_date": null,
            "product_total_orders": "1",
            "product_total_pf": "0",
            "product_quota_ordered_full": "0",
            "product_quota_paid_full": "0",
            "special_remarks": "",
            "product_short_remarks": "",
            "skip_paidfor": 0,
            "q": "1",
            "waitlist": "0",
            "price": "50",
            "price_in_cart": "50",
            "total_price": "50.00",
            "locked": "0",
            "delivered": "0",
            "delivered_on": null,
            "delivered_on_ts": null,
            "paid_for": "0",
            "paid_for_amount": "0",
            "paid_for_amount_remark": null,
            "paid_for_additional_remark": null,
            "pf": "0",
            "paid_for_order": "0",
            "cat_order": "1",
            "product_order": "22",
            "conn_fee": "0",
            "tax_fee": "0",
            "original_price": "100",
            "amount_paid_with_discount": "50",
            "amount_paid_with_incart_discount": "0",
            "paid_in_full_by_discount": "0",
            "base_discount_remark": "<i>Discount Product</i> applied. You saved $50",
            "incart_discount_remark": null,
            "total_discount_remark": "<i>Discount Product</i> applied. You saved $50 ",
            "discount_product_in_cart": "0",
            "markoff_discount": "0",
            "regsurance_cart_value": "0",
            "regsurance_product": "0",
            "creation_date": "2021-12-08 17:20:11",
            "cart_datestamp": "1638943200",
            "creation_date_readable": "December 8th 2021",
            "paid_on_readable": null,
            "total_order": "406.25",
            "total_payment": "100.00",
            "total_paid_for": "81.25",
            "total_delivered": "0.00",
            "first_name": "Kenny",
            "last_name": "Burrell",
            "org_name": null,
            "discount_remark": "<i>Discount Product</i> applied. You saved $50",
            "p_remarks": "",
            "in_cart": "1",
            "in_cart_waitlist": "0"
        }
    ],
    "success": true,
    "user_info": {
        "clogin_id": "102715754",
        "group_id": "100909072",
        "connected_to": "102715737"
    },
    "meta_info": {
        "u_name": "Kenny Burrell",
        "total_forms": "6",
        "completed_forms": "2",
        "total_user_forms": "6",
        "total_completed_user_forms": "2",
        "total_user_mandatory_forms": "6",
        "total_completed_user_mandatory_forms": "2",
        "total_order": "762.50",
        "total_paid": "100.00",
        "total_balance": "662.50",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:07",
        "application_date_raw": "2021-12-08 17:07:40",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085256",
        "clogin_id": "102715754",
        "excluded": "0",
        "connected_to": "102715737",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": null,
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```

## Merchandise Product

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990587,
            "q": 1
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990587,
            "q": 1
        }
    ]
}
add_product_merchandise_json = json.dumps(payload)
add_product_merchandise_response = requests.post(url=users_endpoint, 
                                                 data=add_product_merchandise_json, 
                                                 headers=headers, 
                                                 timeout=10)

```
:::

### Response

```json
{
    "msg": "Products added successfully",
    "cart": [
                {
            "reg_id": "102715754",
            "cart_id": "10006194",
            "p_id": "1990587",
            "is_holder_product": "0",
            "parent_product": "1990587",
            "session_id": null,
            "is_session_product": "0",
            "is_session_subproduct": "0",
            "pp_protected": null,
            "pp_protected_amount": "0",
            "session_checkin_total_items": "0",
            "cat_id": "81407",
            "base_product_type": "7",
            "zero_product_presentation": "0",
            "product_present_text_value": "",
            "allow_waitlist": "0",
            "lock_after_paid": "1",
            "lock_in_cart": "0",
            "force_paid_first": "0",
            "lock_once_funds_allocated": "1",
            "session_start_unix": null,
            "session_end_unix": null,
            "disable_regsurance": "0",
            "opt_in_regsurance": "0",
            "location": null,
            "internalid": null,
            "instructor": null,
            "disable_time_conflict": "0",
            "discount_presented_as": null,
            "p_name": "Merchandise Product",
            "is_recurring": "0",
            "recurring_cart_parent_id": null,
            "original_session_price": null,
            "day_session_final_price": null,
            "recurring_structure": null,
            "recurring_structure_custom_num": "0",
            "recurring_trigger_start": null,
            "recurring_allow_user_disable": "0",
            "recurring_allow_upgrade": "0",
            "recurring_upgrade_text": null,
            "recur_total_instances": "0",
            "recur_completed_instances": "0",
            "recurring_id": null,
            "recurring_text": "",
            "recurring_comment": "",
            "recurring_pause_comment": "",
            "recurring_messages": null,
            "recurring_instances_left": null,
            "recur_on_original": "0",
            "recur_done": "0",
            "is_recurring_single": "0",
            "recur_allow_renew": "0",
            "recurring_valid_grace": null,
            "recur_autorenew_pid": "0",
            "recur_autorenew_disabled": "0",
            "recur_autorenew_instance": "0",
            "recur_autorenew_done": "0",
            "recur_user_disabled": "0",
            "recur_pause_on": null,
            "recur_resume_on": null,
            "recur_on": "0",
            "recur_end": "0",
            "recur_overall_end": "0",
            "session_start_date_readable": null,
            "session_end_date_readable": null,
            "session_days_text": null,
            "auto_generated_session_name": "0",
            "allow_partial_enrollment": null,
            "session_remarks": null,
            "original_session_product_price": null,
            "selected_session_days": null,
            "total_session_days": null,
            "session_start_date": null,
            "session_end_date": null,
            "product_total_orders": "1",
            "product_total_pf": "0",
            "product_quota_ordered_full": "0",
            "product_quota_paid_full": "0",
            "special_remarks": "",
            "product_short_remarks": "",
            "skip_paidfor": 0,
            "q": "1",
            "waitlist": "0",
            "price": "25",
            "price_in_cart": "25",
            "total_price": "25.00",
            "locked": "0",
            "delivered": "0",
            "delivered_on": null,
            "delivered_on_ts": null,
            "paid_for": "0",
            "paid_for_amount": "0",
            "paid_for_amount_remark": null,
            "paid_for_additional_remark": null,
            "pf": "0",
            "paid_for_order": "0",
            "cat_order": "1",
            "product_order": "20",
            "conn_fee": "0",
            "tax_fee": "0",
            "original_price": "50",
            "amount_paid_with_discount": "25",
            "amount_paid_with_incart_discount": "0",
            "paid_in_full_by_discount": "0",
            "base_discount_remark": "<i>Discount Product</i> applied. You saved $25",
            "incart_discount_remark": null,
            "total_discount_remark": "<i>Discount Product</i> applied. You saved $25 ",
            "discount_product_in_cart": "0",
            "markoff_discount": "0",
            "regsurance_cart_value": "0",
            "regsurance_product": "0",
            "creation_date": "2021-12-08 17:20:12",
            "cart_datestamp": "1638943200",
            "creation_date_readable": "December 8th 2021",
            "paid_on_readable": null,
            "total_order": "406.25",
            "total_payment": "100.00",
            "total_paid_for": "81.25",
            "total_delivered": "0.00",
            "first_name": "Kenny",
            "last_name": "Burrell",
            "org_name": null,
            "discount_remark": "<i>Discount Product</i> applied. You saved $25",
            "p_remarks": "",
            "in_cart": "1",
            "in_cart_waitlist": "0"
        }
    ],
    "success": true,
    "user_info": {
        "clogin_id": "102715754",
        "group_id": "100909072",
        "connected_to": "102715737"
    },
    "meta_info": {
        "u_name": "Kenny Burrell",
        "total_forms": "6",
        "completed_forms": "2",
        "total_user_forms": "6",
        "total_completed_user_forms": "2",
        "total_user_mandatory_forms": "6",
        "total_completed_user_mandatory_forms": "2",
        "total_order": "812.50",
        "total_paid": "100.00",
        "total_balance": "712.50",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:07",
        "application_date_raw": "2021-12-08 17:07:40",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085256",
        "clogin_id": "102715754",
        "excluded": "0",
        "connected_to": "102715737",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": null,
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```

## Discount Product

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990588,
            "q": 1
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "p_id": 1990588,
            "q": 1
        }
    ]
}
add_product_discount_json = json.dumps(payload)
add_product_discount_response = requests.post(url=users_endpoint, 
                                             data=add_product_discount_json, 
                                             headers=headers, 
                                             timeout=10)
```
:::

### Response

```json
{
    "msg": "Products added successfully",
    "cart": [
        {
            "reg_id": "102715754",
            "cart_id": "10006195",
            "p_id": "1990588",
            "is_holder_product": "0",
            "parent_product": "1990588",
            "session_id": null,
            "is_session_product": "0",
            "is_session_subproduct": "0",
            "pp_protected": null,
            "pp_protected_amount": "0",
            "session_checkin_total_items": "0",
            "cat_id": "81407",
            "base_product_type": "2",
            "zero_product_presentation": "0",
            "product_present_text_value": "",
            "allow_waitlist": "0",
            "lock_after_paid": "1",
            "lock_in_cart": "0",
            "force_paid_first": "0",
            "lock_once_funds_allocated": "1",
            "session_start_unix": null,
            "session_end_unix": null,
            "disable_regsurance": "0",
            "opt_in_regsurance": "0",
            "location": null,
            "internalid": null,
            "instructor": null,
            "disable_time_conflict": "0",
            "discount_presented_as": "as_mark_off",
            "p_name": "Discount Product",
            "is_recurring": "0",
            "recurring_cart_parent_id": null,
            "original_session_price": null,
            "day_session_final_price": null,
            "recurring_structure": null,
            "recurring_structure_custom_num": "0",
            "recurring_trigger_start": null,
            "recurring_allow_user_disable": "0",
            "recurring_allow_upgrade": "0",
            "recurring_upgrade_text": null,
            "recur_total_instances": "0",
            "recur_completed_instances": "0",
            "recurring_id": null,
            "recurring_text": "",
            "recurring_comment": "",
            "recurring_pause_comment": "",
            "recurring_messages": null,
            "recurring_instances_left": null,
            "recur_on_original": "0",
            "recur_done": "0",
            "is_recurring_single": "0",
            "recur_allow_renew": "0",
            "recurring_valid_grace": null,
            "recur_autorenew_pid": "0",
            "recur_autorenew_disabled": "0",
            "recur_autorenew_instance": "0",
            "recur_autorenew_done": "0",
            "recur_user_disabled": "0",
            "recur_pause_on": null,
            "recur_resume_on": null,
            "recur_on": "0",
            "recur_end": "0",
            "recur_overall_end": "0",
            "session_start_date_readable": null,
            "session_end_date_readable": null,
            "session_days_text": null,
            "auto_generated_session_name": "0",
            "allow_partial_enrollment": null,
            "session_remarks": null,
            "original_session_product_price": null,
            "selected_session_days": null,
            "total_session_days": null,
            "session_start_date": null,
            "session_end_date": null,
            "product_total_orders": "1",
            "product_total_pf": "0",
            "product_quota_ordered_full": "0",
            "product_quota_paid_full": "0",
            "special_remarks": "",
            "product_short_remarks": "",
            "skip_paidfor": 0,
            "q": "1",
            "waitlist": "0",
            "price": "50",
            "price_in_cart": "50",
            "total_price": "50.00",
            "locked": "0",
            "delivered": "0",
            "delivered_on": null,
            "delivered_on_ts": null,
            "paid_for": "0",
            "paid_for_amount": "0",
            "paid_for_amount_remark": null,
            "paid_for_additional_remark": null,
            "pf": "0",
            "paid_for_order": "0",
            "cat_order": "1",
            "product_order": "21",
            "conn_fee": "0",
            "tax_fee": "0",
            "original_price": null,
            "amount_paid_with_discount": "0",
            "amount_paid_with_incart_discount": "0",
            "paid_in_full_by_discount": "0",
            "base_discount_remark": null,
            "incart_discount_remark": null,
            "total_discount_remark": " ",
            "discount_product_in_cart": "1",
            "markoff_discount": "1",
            "regsurance_cart_value": "0",
            "regsurance_product": "0",
            "creation_date": "2021-12-08 17:20:12",
            "cart_datestamp": "1638943200",
            "creation_date_readable": "December 8th 2021",
            "paid_on_readable": null,
            "total_order": "406.25",
            "total_payment": "100.00",
            "total_paid_for": "81.25",
            "total_delivered": "0.00",
            "first_name": "Kenny",
            "last_name": "Burrell",
            "org_name": null,
            "discount_remark": "",
            "p_remarks": "",
            "in_cart": "1",
            "in_cart_waitlist": "0"
        }
    ],
    "success": true,
    "user_info": {
        "clogin_id": "102715754",
        "group_id": "100909072",
        "connected_to": "102715737"
    },
    "meta_info": {
        "u_name": "Kenny Burrell",
        "total_forms": "6",
        "completed_forms": "2",
        "total_user_forms": "6",
        "total_completed_user_forms": "2",
        "total_user_mandatory_forms": "6",
        "total_completed_user_mandatory_forms": "2",
        "total_order": "406.25",
        "total_paid": "100.00",
        "total_balance": "306.25",
        "status_id": "0",
        "status_name": null,
        "status_color": null,
        "application_date": "Dec 8th 2021 17:07",
        "application_date_raw": "2021-12-08 17:07:40",
        "u_comments": "0",
        "group_id": "100909072",
        "uid": "4085256",
        "clogin_id": "102715754",
        "excluded": "0",
        "connected_to": "102715737",
        "total_user_tags": "0",
        "user_tag_ids": null,
        "total_non_excluded_children": null,
        "star": "0",
        "admin_initials": null,
        "admin_color": null,
        "assigned_admin_id": null
    }
}
```

## Private product

### Call

:::CodeblockTabs
```curl
curl -X POST "https://www.regpack.com/reg/api2/users/" \ 
     -H "Content-Type: application/json" \ 
     -H "Accept: application/json" \ 
     -H "Api-Id: 15263" \ 
     -H "Api-user: api_admin@regpacks.com" \ 
     -H "Api-Token: cd2e514f-7gab-3cde-62fg-51abcd4e7362" \ 
     -d '{
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "name": "last minute flight to Kansas City",
            "price": 500,
            "q": 1
        }
    ]
}
```

```python
import requests
import json
users_endpoint = https://www.regpack.com/reg/api2/users/
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Api-Id": "15263",
    "Api-user": "api_admin@regpacks.com",
    "Api-Token": "cd2e514f-7gab-3cde-62fg-51abcd4e7362",
}
payload = {
    "action": "add_product",
    "group_id": 100909072,
    "clogin_id": 102715754,
    "connected_to": 102715737,
    "product_list": [
        {
            "name": "last minute flight to Kansas City",
            "price": 500,
            "q": 1
        }
    ]
}
add_product_private_json = json.dumps(payload)
add_product_private_response = requests.post(url=users_endpoint, 
                                             data=add_product_private_json, 
                                             headers=headers, 
                                             timeout=10)
```
:::

### Response

```curl
{
    "msg": "Products added successfully",
}
```







