Create a Product
You can create a product with a certain name, type, and introduction date. A product can be of the customer-subscription, general, or add-on types. You may have the following product types:
-
Subscription (customer-subscription) — A product with a recurring charge. Optionally, it can have a one-time price too. An example of the customer-subscription is a cable TV subscription.
-
One-Time (general) — a product that is sold one time only. An example could be an initiation fee for a cable subscription.
-
Add-on (add-on) — An addition to another product. This add-on product should have a parent product of the subscription type. With add-on products, you can define additional services on top of base charges. An example could be additional premium channels package on a cable subscription.
Use the following endpoint and sample payload to create a new product:
POST https://example-gotransverse.com/billing/2/products
Request
{
"product_type": "customer-subscription",
"name": "Product 1",
"description": "additional information on product",
"introduction_date": "2018-08-10",
"product_category": {
"id": "1406"
}
}
Response
{
"product_type": "customer-subscription",
"id": "24362",
"name": "Product 1",
"description": "additional information on product",
"serialized": true,
"taxable": false,
"trial": false,
"state": "DRAFT",
"requires_agreement": false,
"default_quantity": 1,
"product_category": {
"id": "1406",
"name": "Product Category"
},
"min_service_resources": 0,
"max_service_resources": 0,
"trial_override": false,
"product_tags": [],
"introduction_date": "2018-08-10T00:00:00-05:00",
"rule_override": false,
"rule_type": "TAPERED",
"rule_mode": "ROOT",
"consume_prepaid_balance": false
}
Parameters
The required fields are marked with an asterisk (*) or listed as Required in the table.
-
product_type* — the type of the product. Possible values:
-
customer-subscription
-
one-time
-
add-on
-
-
name* — the name of the product.
-
description — the additional information on this product.
-
introduction_date — the date when the product was introduced.
-
product_category* — the category to which this product is associated.
-
serialized — specifies whether this product is serialized. In Gotransverse, the terms unique and non-unique are used instead of serialized and non-serialized.
-
taxable — specifies whether this product is taxable.
-
trial — specifies whether this product has a trial period.
-
state — the state of product.
-
DRAFT status means that this product is not yet available for purchase.
-
AVAILABLE status means that the product is available for purchase.
-
NOT AVAILABLE status means that the product is no longer available for purchase.
-
-
requires_agreement — specifies whether the product requires an agreement.
-
default_quantity — the default quantity of this product.
-
min_service_resources — the minimum number of service resources that this product requires. Service resources are used in conjunction with usage.
-
max_service_resources — the maximum number of service resources this product can have.
-
trial_override — specifies whether the trial period or the number of trial days has been overridden.
-
product_tags — the associated product tags.
-
introduction_date — the date when the product is or should be introduced.
-
rule_override — specifies whether the usage is overridden at the time of the order.
-
rule_type — indicates the type of the rule, it can be Tapered or Tiered.
-
rule_mode — indicates the rule mode. It is used by a service product to determine how to apply usage rules to its services.
-
ROOT is used only for parent services (subscriptions).
-
APPEND means the parent (subscription) usage rule is executed first, and only then the usage rule of child (add-on or service device) services.
-
OVERWRITE means that the child (add-on or service device) usage rule is executed first, and only then the parent (subscription) usage rule.
-
-
consume_prepaid_balance — specifies whether the product consumes a prepaid register.