Discussion

Discount plans are a systematic way to define a discount or series of discounts that can be given to a tenant. A discount may be continuous (i.e. recurs every month) or it may have a limited duration (i.e. 3 months).


GET /v1/:facility_id/discount_plans
Show configured discount plans

Examples

GET /v1/2194db49-8253-4d61-9c1b-c26043f4995c/discount_plans
200
{
  "discount_plans": [
    {
      "id": "c23fdbcf-e0d9-4594-8645-b56283b67d11",
      "name": "PLAN3",
      "description": "It's so descriptive #3",
      "public_description": null,
      "availability_text": "9/12/2022",
      "requirements_text": "",
      "kind": "always",
      "min_occupancy_required": false,
      "min_occupancy_months": null,
      "prepay_required": false,
      "prepay_months": null,
      "start_date": "2022-09-12",
      "end_date": null,
      "auto_apply": false,
      "promotion_type": "promotion",
      "deleted": false,
      "turned_on": true,
      "available_for_all_facilities": true,
      "round_to_nearest": null,
      "hide_from_website": false,
      "move_in_only": false,
      "tenant_account_kind_id": null,
      "existing_tenant_only": false,
      "priority": null,
      "role_permission": null,
      "choose_your_own_promo": false,
      "discount_plan_discounts": [
        {
          "id": "f5cad27d-6d26-43a0-8264-62a4fdaf9f5b",
          "discount_type": "percent",
          "month_number": 1,
          "amount": 10.0,
          "minimum_amount": null,
          "maximum_amount": null
        }
      ],
      "discount_plan_controls": [],
      "api_association_ids": [
        "cd6156e7-ea10-462d-bbf3-352f822581a9"
      ],
      "client_applications": [
        {
          "id": "c47e74e8-6d4e-44a9-8aed-d87dbe7881d8",
          "name": "Test App",
          "channel_rates_on": false,
          "internal": false
        }
      ],
      "always_discount_plan_discount_id": "f5cad27d-6d26-43a0-8264-62a4fdaf9f5b",
      "facility_ids": [
        "2194db49-8253-4d61-9c1b-c26043f4995c"
      ]
    },
    {
      "id": "76623f93-a1fa-4122-981d-da2e200fa570",
      "name": "PLAN4",
      "description": "It's so descriptive #4",
      "public_description": null,
      "availability_text": "9/12/2022",
      "requirements_text": "",
      "kind": "limited",
      "min_occupancy_required": false,
      "min_occupancy_months": null,
      "prepay_required": false,
      "prepay_months": null,
      "start_date": "2022-09-12",
      "end_date": null,
      "auto_apply": false,
      "promotion_type": "promotion",
      "deleted": false,
      "turned_on": true,
      "available_for_all_facilities": true,
      "round_to_nearest": null,
      "hide_from_website": false,
      "move_in_only": false,
      "tenant_account_kind_id": null,
      "existing_tenant_only": false,
      "priority": null,
      "role_permission": null,
      "choose_your_own_promo": false,
      "discount_plan_discounts": [
        {
          "id": "1e1e0b20-ae21-4b82-ba13-d9019644f42a",
          "discount_type": "amount",
          "month_number": 1,
          "amount": 10.0,
          "minimum_amount": null,
          "maximum_amount": null
        },
        {
          "id": "829c9580-15dc-43f0-a7cb-494bf94759f2",
          "discount_type": "percent",
          "month_number": 2,
          "amount": 10.0,
          "minimum_amount": null,
          "maximum_amount": null
        },
        {
          "id": "1da1823f-c693-4c94-b45e-03a36e61cb42",
          "discount_type": "none",
          "month_number": 3,
          "amount": 0.0,
          "minimum_amount": null,
          "maximum_amount": null
        },
        {
          "id": "2ee45124-6309-4ea3-b8a5-bf52f32a88ec",
          "discount_type": "fixed",
          "month_number": 4,
          "amount": 0.0,
          "minimum_amount": null,
          "maximum_amount": null
        }
      ],
      "discount_plan_controls": [],
      "api_association_ids": [
        "cd6156e7-ea10-462d-bbf3-352f822581a9"
      ],
      "client_applications": [
        {
          "id": "c47e74e8-6d4e-44a9-8aed-d87dbe7881d8",
          "name": "Test App",
          "channel_rates_on": false,
          "internal": false
        }
      ],
      "always_discount_plan_discount_id": "1e1e0b20-ae21-4b82-ba13-d9019644f42a",
      "facility_ids": [
        "2194db49-8253-4d61-9c1b-c26043f4995c"
      ]
    }
  ],
  "meta": {
    "pagination": {
      "current_page": 1,
      "total_pages": 1,
      "per_page": 100,
      "total_entries": 2,
      "previous_page": null,
      "next_page": null
    },
    "status_code": 200,
    "status_message": "OK",
    "status_cat": "https://http.cat/200",
    "request_method": "GET",
    "request_id": null,
    "parameters": {
      "facility_id": "2194db49-8253-4d61-9c1b-c26043f4995c"
    }
  }
}

GET /v1/:facility_id/discount_plans/:id
Show a particular discount plan

The field kind has these possible values: limited (meaning a number of months), always (meaning always)
The field discount_type has these possible values: none (meaning no discount), amount (meaning $ off), percent (meaning % off), fixed (meaning fixed price), variable (meaning variable)

Examples

GET /v1/a8d1d612-c800-470d-a83b-0af8ababaa78/discount_plans/c273abd9-d537-47b0-8861-dc26cecf165a
200
{
  "discount_plan": {
    "id": "c273abd9-d537-47b0-8861-dc26cecf165a",
    "name": "PLAN5",
    "description": "It's so descriptive #5",
    "public_description": null,
    "availability_text": "9/12/2022",
    "requirements_text": "",
    "kind": "limited",
    "min_occupancy_required": false,
    "min_occupancy_months": null,
    "prepay_required": false,
    "prepay_months": null,
    "start_date": "2022-09-12",
    "end_date": null,
    "auto_apply": false,
    "promotion_type": "promotion",
    "deleted": false,
    "turned_on": true,
    "available_for_all_facilities": true,
    "round_to_nearest": null,
    "hide_from_website": false,
    "move_in_only": false,
    "tenant_account_kind_id": null,
    "existing_tenant_only": false,
    "priority": null,
    "role_permission": null,
    "choose_your_own_promo": false,
    "discount_plan_discounts": [
      {
        "id": "7906269d-a9ee-43b0-aff1-207f9c0deff3",
        "discount_type": "amount",
        "month_number": 1,
        "amount": 10.0,
        "minimum_amount": null,
        "maximum_amount": null
      },
      {
        "id": "7823fb0c-877b-4664-95d3-ae10bcb1d190",
        "discount_type": "percent",
        "month_number": 2,
        "amount": 10.0,
        "minimum_amount": null,
        "maximum_amount": null
      },
      {
        "id": "e097fd72-b7eb-438e-8572-202ca481bcc7",
        "discount_type": "none",
        "month_number": 3,
        "amount": 0.0,
        "minimum_amount": null,
        "maximum_amount": null
      },
      {
        "id": "080aa79d-2ab3-4735-8acd-bf4702c4539f",
        "discount_type": "fixed",
        "month_number": 4,
        "amount": 0.0,
        "minimum_amount": null,
        "maximum_amount": null
      }
    ],
    "discount_plan_controls": [],
    "api_association_ids": [],
    "client_applications": [],
    "always_discount_plan_discount_id": "7906269d-a9ee-43b0-aff1-207f9c0deff3",
    "facility_ids": [
      "a8d1d612-c800-470d-a83b-0af8ababaa78"
    ]
  },
  "meta": {
    "status_code": 200,
    "status_message": "OK",
    "status_cat": "https://http.cat/200",
    "request_method": "GET",
    "request_id": null,
    "parameters": {
      "facility_id": "a8d1d612-c800-470d-a83b-0af8ababaa78",
      "id": "c273abd9-d537-47b0-8861-dc26cecf165a"
    }
  }
}