Associate Related Products
To associate the related products, use the following endpoint specifying the desired type and scope of relation in the request payload.
POST https://example-gotransverse.com/billing/2 /products/{product_id}/relations
Products can be related in the scope of an order or account. When you indicate the order scope of product relation, products that you want to relate should be in the same order. While account relation scope means that products should belong to the same billing account but can be in different orders.
Request
{
"product": {
"id": "24364"
},
"product_relation_type": "REQUIRED",
"scope": "ACCOUNT"
}
Response
{
"id": "30866",
"product": {
"product_type": "customer-subscription",
"id": "24364",
"name": "Product 2"
},
"product_relation_type": "REQUIRED",
"scope": "ACCOUNT"
}
Parameters
The required fields are marked with an asterisk (*) or listed as Required in the table.
-
product* — details about the product.
-
id: the ID of the product that you want to associate.
-
name: the name of the product that you want to associate.
-
-
product_relation_type* — indicates the type of the product relation. Possible values are: RECOMMENDED, DEPENDENT, INCOMPATIBLE, CHILD, PARENT, REQUIRED, and ADDON.
-
scope — indicates the scope type of the product relation. Possible values are ORDER or ACCOUNT.