Create plan phase
curl --request POST \
--url https://api.zenskar.com/plans/{plan_id}/phases \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"order": 123,
"description": "<string>",
"features": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"pricings": [
{
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"product": {
"name": "<string>",
"description": "<string>",
"tags": [
"<unknown>"
],
"sku": "<string>",
"parent_link_id": "<string>",
"tax_codes": {},
"is_active": true,
"default_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_attributes": {}
}
}
]
}
'import requests
url = "https://api.zenskar.com/plans/{plan_id}/phases"
payload = {
"name": "<string>",
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"order": 123,
"description": "<string>",
"features": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"pricings": [
{
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"product": {
"name": "<string>",
"description": "<string>",
"tags": ["<unknown>"],
"sku": "<string>",
"parent_link_id": "<string>",
"tax_codes": {},
"is_active": True,
"default_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_attributes": {}
}
}
]
}
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
schedule: {duration: '<string>', start_offset: 'P0D', trigger_type: 'time_based'},
order: 123,
description: '<string>',
features: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
overage_pricing: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
pricings: [
{
schedule: {duration: '<string>', start_offset: 'P0D', trigger_type: 'time_based'},
pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pricing: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
overage_pricing: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
product: {
name: '<string>',
description: '<string>',
tags: ['<unknown>'],
sku: '<string>',
parent_link_id: '<string>',
tax_codes: {},
is_active: true,
default_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_attributes: {}
}
}
]
})
};
fetch('https://api.zenskar.com/plans/{plan_id}/phases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenskar.com/plans/{plan_id}/phases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'schedule' => [
'duration' => '<string>',
'start_offset' => 'P0D',
'trigger_type' => 'time_based'
],
'order' => 123,
'description' => '<string>',
'features' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'overage_pricing' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'pricings' => [
[
'schedule' => [
'duration' => '<string>',
'start_offset' => 'P0D',
'trigger_type' => 'time_based'
],
'pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'pricing' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'overage_pricing' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'product' => [
'name' => '<string>',
'description' => '<string>',
'tags' => [
'<unknown>'
],
'sku' => '<string>',
'parent_link_id' => '<string>',
'tax_codes' => [
],
'is_active' => true,
'default_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_attributes' => [
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zenskar.com/plans/{plan_id}/phases"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"order\": 123,\n \"description\": \"<string>\",\n \"features\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"pricings\": [\n {\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<unknown>\"\n ],\n \"sku\": \"<string>\",\n \"parent_link_id\": \"<string>\",\n \"tax_codes\": {},\n \"is_active\": true,\n \"default_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_attributes\": {}\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zenskar.com/plans/{plan_id}/phases")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"order\": 123,\n \"description\": \"<string>\",\n \"features\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"pricings\": [\n {\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<unknown>\"\n ],\n \"sku\": \"<string>\",\n \"parent_link_id\": \"<string>\",\n \"tax_codes\": {},\n \"is_active\": true,\n \"default_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_attributes\": {}\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/plans/{plan_id}/phases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"order\": 123,\n \"description\": \"<string>\",\n \"features\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"pricings\": [\n {\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<unknown>\"\n ],\n \"sku\": \"<string>\",\n \"parent_link_id\": \"<string>\",\n \"tax_codes\": {},\n \"is_active\": true,\n \"default_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_attributes\": {}\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"order": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"pricings": [],
"features": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"type": "metered",
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
},
"aggregate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataschema": "<string>",
"aggregation_query": "<string>",
"cust_agg_query": "<string>",
"visual_query_builder": {},
"datasource": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
},
"grants": [],
"consumptions": [],
"link_id": "<string>",
"free_units": [],
"discounts": [],
"commitments": [],
"taxes": [],
"payment_terms": [],
"service_fees": [],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"offset": "prepaid",
"cadence": "<string>"
},
"add_to_catalog": true,
"overage_pricing": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"type": "metered",
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
},
"aggregate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataschema": "<string>",
"aggregation_query": "<string>",
"cust_agg_query": "<string>",
"visual_query_builder": {},
"datasource": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
},
"grants": [],
"consumptions": [],
"link_id": "<string>",
"free_units": [],
"discounts": [],
"commitments": [],
"taxes": [],
"payment_terms": [],
"service_fees": [],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"offset": "prepaid",
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": []
},
"usage_report_configs": []
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Plans
Create plan phase
Create a new phase for a plan
POST
/
plans
/
{plan_id}
/
phases
Create plan phase
curl --request POST \
--url https://api.zenskar.com/plans/{plan_id}/phases \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"order": 123,
"description": "<string>",
"features": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"pricings": [
{
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_period": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
},
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": false,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": {
"cadence": "<string>"
}
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": {
"cadence": "<string>"
},
"charge_full_amount": false,
"skip_zero_amount": false
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": false
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": {
"cadence": "<string>"
},
"label": "<string>"
}
],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"product": {
"name": "<string>",
"description": "<string>",
"tags": [
"<unknown>"
],
"sku": "<string>",
"parent_link_id": "<string>",
"tax_codes": {},
"is_active": true,
"default_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_attributes": {}
}
}
]
}
'import requests
url = "https://api.zenskar.com/plans/{plan_id}/phases"
payload = {
"name": "<string>",
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"order": 123,
"description": "<string>",
"features": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"pricings": [
{
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"overage_pricing": {
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [1],
"display_alias": ["<string>"],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": { "cadence": "<string>" }
},
"name": "<string>",
"description": "<string>",
"quantity": {
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": False,
"constraints": {
"min": 1,
"max": 1
}
},
"grants": [
{
"unit_amount": 123,
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": True,
"grant_period": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" },
"start_date": "2023-11-07T05:31:56Z",
"feature_option_value": "<string>",
"numeric_value": 123
}
],
"consumptions": [
{
"entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"show_additional_info": False,
"trigger_event": "invoice_approval"
}
],
"link_id": "<string>",
"free_units": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"unit": "<string>",
"period": { "cadence": "<string>" }
}
],
"discounts": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"commitments": [
{
"unit_amount": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"currency": "<string>",
"label": "<string>",
"period": { "cadence": "<string>" },
"charge_full_amount": False,
"skip_zero_amount": False
}
],
"taxes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"code": "<string>",
"unit_amount": 123
}
],
"payment_terms": [
{
"due_days": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"label": "<string>",
"payment_term_mode": "relative",
"last_day_of_month": False
}
],
"service_fees": [
{
"unit_amount": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"priority": 123,
"pricing_period": { "cadence": "<string>" },
"label": "<string>"
}
],
"execution_logic": { "additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
] },
"is_recurring": True,
"billing_period": { "cadence": "<string>" },
"add_to_catalog": True,
"usage_report_configs": [
{
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"config": {},
"is_default": False,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"products": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_pricing_data": "<unknown>"
}
]
},
"product": {
"name": "<string>",
"description": "<string>",
"tags": ["<unknown>"],
"sku": "<string>",
"parent_link_id": "<string>",
"tax_codes": {},
"is_active": True,
"default_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"custom_attributes": {}
}
}
]
}
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
organisation: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
schedule: {duration: '<string>', start_offset: 'P0D', trigger_type: 'time_based'},
order: 123,
description: '<string>',
features: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
overage_pricing: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
pricings: [
{
schedule: {duration: '<string>', start_offset: 'P0D', trigger_type: 'time_based'},
pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
pricing: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
overage_pricing: {
pricing_data: {
unit_amount: 123,
dimensions: [{name: '<string>', column_name: '<string>'}],
prices: [1],
display_alias: ['<string>'],
pricing_type: 'matrix',
currency: '<string>',
label: '<string>',
unit: '<string>',
pricing_period: {cadence: '<string>'}
},
name: '<string>',
description: '<string>',
quantity: {
label: '<string>',
quantity: 123,
unit: '<string>',
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity_entries: [
{
value: 123,
effective_from: '2023-12-25',
created_at: '2023-11-07T05:31:56Z',
description: '<string>'
}
],
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_frequency: '<string>',
feature_option_value: '<string>',
numeric_value: 123,
allow_mid_cycle_cancellation: false,
constraints: {min: 1, max: 1}
},
grants: [
{
unit_amount: 123,
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
trigger_event: 'invoice_approval',
expires_at: 'end_of_product_billing_period',
expiry_period: '<string>',
grant_frequency_same_as_product: true,
grant_period: '<string>',
unit: '<string>',
period: {cadence: '<string>'},
start_date: '2023-11-07T05:31:56Z',
feature_option_value: '<string>',
numeric_value: 123
}
],
consumptions: [
{
entitlement_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
show_additional_info: false,
trigger_event: 'invoice_approval'
}
],
link_id: '<string>',
free_units: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
unit: '<string>',
period: {cadence: '<string>'}
}
],
discounts: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
commitments: [
{
unit_amount: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
currency: '<string>',
label: '<string>',
period: {cadence: '<string>'},
charge_full_amount: false,
skip_zero_amount: false
}
],
taxes: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
code: '<string>',
unit_amount: 123
}
],
payment_terms: [
{
due_days: 123,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
label: '<string>',
payment_term_mode: 'relative',
last_day_of_month: false
}
],
service_fees: [
{
unit_amount: 1,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
identifier: '<string>',
priority: 123,
pricing_period: {cadence: '<string>'},
label: '<string>'
}
],
execution_logic: {
additional_steps: [{node_type: '<string>', inputs: {}, step_name: '<string>', id: '<string>'}]
},
is_recurring: true,
billing_period: {cadence: '<string>'},
add_to_catalog: true,
usage_report_configs: [
{
aggregate_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
config: {},
is_default: false,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
products: [
{
product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_pricing_data: '<unknown>'
}
]
},
product: {
name: '<string>',
description: '<string>',
tags: ['<unknown>'],
sku: '<string>',
parent_link_id: '<string>',
tax_codes: {},
is_active: true,
default_pricing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
custom_attributes: {}
}
}
]
})
};
fetch('https://api.zenskar.com/plans/{plan_id}/phases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenskar.com/plans/{plan_id}/phases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'schedule' => [
'duration' => '<string>',
'start_offset' => 'P0D',
'trigger_type' => 'time_based'
],
'order' => 123,
'description' => '<string>',
'features' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'overage_pricing' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'pricings' => [
[
'schedule' => [
'duration' => '<string>',
'start_offset' => 'P0D',
'trigger_type' => 'time_based'
],
'pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'pricing' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'overage_pricing' => [
'pricing_data' => [
'unit_amount' => 123,
'dimensions' => [
[
'name' => '<string>',
'column_name' => '<string>'
]
],
'prices' => [
1
],
'display_alias' => [
'<string>'
],
'pricing_type' => 'matrix',
'currency' => '<string>',
'label' => '<string>',
'unit' => '<string>',
'pricing_period' => [
'cadence' => '<string>'
]
],
'name' => '<string>',
'description' => '<string>',
'quantity' => [
'label' => '<string>',
'quantity' => 123,
'unit' => '<string>',
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity_entries' => [
[
'value' => 123,
'effective_from' => '2023-12-25',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>'
]
],
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_frequency' => '<string>',
'feature_option_value' => '<string>',
'numeric_value' => 123,
'allow_mid_cycle_cancellation' => false,
'constraints' => [
'min' => 1,
'max' => 1
]
],
'grants' => [
[
'unit_amount' => 123,
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'trigger_event' => 'invoice_approval',
'expires_at' => 'end_of_product_billing_period',
'expiry_period' => '<string>',
'grant_frequency_same_as_product' => true,
'grant_period' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
],
'start_date' => '2023-11-07T05:31:56Z',
'feature_option_value' => '<string>',
'numeric_value' => 123
]
],
'consumptions' => [
[
'entitlement_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'show_additional_info' => false,
'trigger_event' => 'invoice_approval'
]
],
'link_id' => '<string>',
'free_units' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'unit' => '<string>',
'period' => [
'cadence' => '<string>'
]
]
],
'discounts' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'commitments' => [
[
'unit_amount' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'currency' => '<string>',
'label' => '<string>',
'period' => [
'cadence' => '<string>'
],
'charge_full_amount' => false,
'skip_zero_amount' => false
]
],
'taxes' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'code' => '<string>',
'unit_amount' => 123
]
],
'payment_terms' => [
[
'due_days' => 123,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'label' => '<string>',
'payment_term_mode' => 'relative',
'last_day_of_month' => false
]
],
'service_fees' => [
[
'unit_amount' => 1,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'identifier' => '<string>',
'priority' => 123,
'pricing_period' => [
'cadence' => '<string>'
],
'label' => '<string>'
]
],
'execution_logic' => [
'additional_steps' => [
[
'node_type' => '<string>',
'inputs' => [
],
'step_name' => '<string>',
'id' => '<string>'
]
]
],
'is_recurring' => true,
'billing_period' => [
'cadence' => '<string>'
],
'add_to_catalog' => true,
'usage_report_configs' => [
[
'aggregate_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'config' => [
],
'is_default' => false,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'products' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_pricing_data' => '<unknown>'
]
]
],
'product' => [
'name' => '<string>',
'description' => '<string>',
'tags' => [
'<unknown>'
],
'sku' => '<string>',
'parent_link_id' => '<string>',
'tax_codes' => [
],
'is_active' => true,
'default_pricing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'custom_attributes' => [
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zenskar.com/plans/{plan_id}/phases"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"order\": 123,\n \"description\": \"<string>\",\n \"features\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"pricings\": [\n {\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<unknown>\"\n ],\n \"sku\": \"<string>\",\n \"parent_link_id\": \"<string>\",\n \"tax_codes\": {},\n \"is_active\": true,\n \"default_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_attributes\": {}\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zenskar.com/plans/{plan_id}/phases")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"order\": 123,\n \"description\": \"<string>\",\n \"features\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"pricings\": [\n {\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<unknown>\"\n ],\n \"sku\": \"<string>\",\n \"parent_link_id\": \"<string>\",\n \"tax_codes\": {},\n \"is_active\": true,\n \"default_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_attributes\": {}\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/plans/{plan_id}/phases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"order\": 123,\n \"description\": \"<string>\",\n \"features\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"pricings\": [\n {\n \"schedule\": {\n \"duration\": \"<string>\",\n \"start_offset\": \"P0D\",\n \"trigger_type\": \"time_based\"\n },\n \"pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"overage_pricing\": {\n \"pricing_data\": {\n \"unit_amount\": 123,\n \"dimensions\": [\n {\n \"name\": \"<string>\",\n \"column_name\": \"<string>\"\n }\n ],\n \"prices\": [\n 1\n ],\n \"display_alias\": [\n \"<string>\"\n ],\n \"pricing_type\": \"matrix\",\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"quantity\": {\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity_entries\": [\n {\n \"value\": 123,\n \"effective_from\": \"2023-12-25\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\"\n }\n ],\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_frequency\": \"<string>\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123,\n \"allow_mid_cycle_cancellation\": false,\n \"constraints\": {\n \"min\": 1,\n \"max\": 1\n }\n },\n \"grants\": [\n {\n \"unit_amount\": 123,\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"trigger_event\": \"invoice_approval\",\n \"expires_at\": \"end_of_product_billing_period\",\n \"expiry_period\": \"<string>\",\n \"grant_frequency_same_as_product\": true,\n \"grant_period\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"feature_option_value\": \"<string>\",\n \"numeric_value\": 123\n }\n ],\n \"consumptions\": [\n {\n \"entitlement_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"show_additional_info\": false,\n \"trigger_event\": \"invoice_approval\"\n }\n ],\n \"link_id\": \"<string>\",\n \"free_units\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"unit\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n }\n }\n ],\n \"discounts\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"commitments\": [\n {\n \"unit_amount\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"currency\": \"<string>\",\n \"label\": \"<string>\",\n \"period\": {\n \"cadence\": \"<string>\"\n },\n \"charge_full_amount\": false,\n \"skip_zero_amount\": false\n }\n ],\n \"taxes\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"code\": \"<string>\",\n \"unit_amount\": 123\n }\n ],\n \"payment_terms\": [\n {\n \"due_days\": 123,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"label\": \"<string>\",\n \"payment_term_mode\": \"relative\",\n \"last_day_of_month\": false\n }\n ],\n \"service_fees\": [\n {\n \"unit_amount\": 1,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"identifier\": \"<string>\",\n \"priority\": 123,\n \"pricing_period\": {\n \"cadence\": \"<string>\"\n },\n \"label\": \"<string>\"\n }\n ],\n \"execution_logic\": {\n \"additional_steps\": [\n {\n \"node_type\": \"<string>\",\n \"inputs\": {},\n \"step_name\": \"<string>\",\n \"id\": \"<string>\"\n }\n ]\n },\n \"is_recurring\": true,\n \"billing_period\": {\n \"cadence\": \"<string>\"\n },\n \"add_to_catalog\": true,\n \"usage_report_configs\": [\n {\n \"aggregate_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"config\": {},\n \"is_default\": false,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"products\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_pricing_data\": \"<unknown>\"\n }\n ]\n },\n \"product\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tags\": [\n \"<unknown>\"\n ],\n \"sku\": \"<string>\",\n \"parent_link_id\": \"<string>\",\n \"tax_codes\": {},\n \"is_active\": true,\n \"default_pricing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"custom_attributes\": {}\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"schedule": {
"duration": "<string>",
"start_offset": "P0D",
"trigger_type": "time_based"
},
"order": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"pricings": [],
"features": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"type": "metered",
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
},
"aggregate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataschema": "<string>",
"aggregation_query": "<string>",
"cust_agg_query": "<string>",
"visual_query_builder": {},
"datasource": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
},
"grants": [],
"consumptions": [],
"link_id": "<string>",
"free_units": [],
"discounts": [],
"commitments": [],
"taxes": [],
"payment_terms": [],
"service_fees": [],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"offset": "prepaid",
"cadence": "<string>"
},
"add_to_catalog": true,
"overage_pricing": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pricing_data": {
"unit_amount": 123,
"dimensions": [
{
"name": "<string>",
"column_name": "<string>"
}
],
"prices": [
1
],
"display_alias": [
"<string>"
],
"pricing_type": "matrix",
"currency": "<string>",
"label": "<string>",
"unit": "<string>",
"pricing_period": {
"cadence": "<string>"
}
},
"name": "<string>",
"description": "<string>",
"quantity": {
"type": "metered",
"label": "<string>",
"quantity": 123,
"unit": "<string>",
"aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity_entries": [
{
"value": 123,
"effective_from": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
],
"trigger_event": "invoice_approval",
"expires_at": "end_of_product_billing_period",
"expiry_period": "<string>",
"grant_frequency_same_as_product": true,
"grant_frequency": "<string>",
"feature_option_value": "<string>",
"numeric_value": 123,
"allow_mid_cycle_cancellation": false,
"constraints": {
"min": 1,
"max": 1
},
"aggregate": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dataschema": "<string>",
"aggregation_query": "<string>",
"cust_agg_query": "<string>",
"visual_query_builder": {},
"datasource": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
}
},
"grants": [],
"consumptions": [],
"link_id": "<string>",
"free_units": [],
"discounts": [],
"commitments": [],
"taxes": [],
"payment_terms": [],
"service_fees": [],
"execution_logic": {
"additional_steps": [
{
"node_type": "<string>",
"inputs": {},
"step_name": "<string>",
"id": "<string>"
}
]
},
"is_recurring": true,
"billing_period": {
"offset": "prepaid",
"cadence": "<string>"
},
"add_to_catalog": true,
"usage_report_configs": []
},
"usage_report_configs": []
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
Plan name
Schedule of the Phase
Show child attributes
Show child attributes
Order of the phase
Product Description
Phase Features
Show child attributes
Show child attributes
Different Product Pricings
Show child attributes
Show child attributes
Response
Successful Response
Plan name
Schedule of the phase
Show child attributes
Show child attributes
Order of the phase
Plan ID
Plan created at
Plan updated at
Plan ID
Product Description
Different Product Pricings
Show child attributes
Show child attributes
Phase Features
Show child attributes
Show child attributes