# Service Reconfiguration Example

#### Changing Datacenter/Static Residential Payment Cycle

1. /service/reconfigure\_option/{service\_id}

<details>

<summary>Example Response</summary>

```
{
	"message": "Service reconfigure option list successfully generated.",
	"reconfigure_option": [
		{
			"end_of_period": false,
			"max_service_quantity": 244,
			"min_service_quantity": 6,
			"product_prices": [
				{
					"price_cycle_interval": "year",
					"price_cycle_interval_count": 1,
					"price_id": "price_1OWfPxC8brDpu5Aa8jjGMPEN",
					"price_is_subscription": true,
					"price_package_quantity": null,
					"price_per_unit_amount": null,
					"price_tier_type": "volume",
					"price_tiers": [
						{
							"price_tier_amount": 1785,
							"price_tier_up_to": 49
						},
						{
							"price_tier_amount": 1683,
							"price_tier_up_to": 99
						},
						{
							"price_tier_amount": 1530,
							"price_tier_up_to": null
						}
					],
					"price_type": "recurring"
				}
			],
			"require_remove_proxy_ids": true
		},
		{
			"end_of_period": true,
			"max_service_quantity": 12,
			"min_service_quantity": 12,
			"product_prices": [
				{
					"price_cycle_interval": "month",
					"price_cycle_interval_count": 3,
					"price_id": "price_1OWfPxC8brDpu5AavNOThUjK",
					"price_is_subscription": true,
					"price_package_quantity": null,
					"price_per_unit_amount": null,
					"price_tier_type": "volume",
					"price_tiers": [
						{
							"price_tier_amount": 498,
							"price_tier_up_to": 49
						},
						{
							"price_tier_amount": 470,
							"price_tier_up_to": 99
						},
						{
							"price_tier_amount": 427,
							"price_tier_up_to": null
						}
					],
					"price_type": "recurring"
				},
				{
					"price_cycle_interval": "month",
					"price_cycle_interval_count": 1,
					"price_id": "price_1OWfPxC8brDpu5AajovuNcMy",
					"price_is_subscription": true,
					"price_package_quantity": null,
					"price_per_unit_amount": null,
					"price_tier_type": "volume",
					"price_tiers": [
						{
							"price_tier_amount": 175,
							"price_tier_up_to": 49
						},
						{
							"price_tier_amount": 165,
							"price_tier_up_to": 99
						},
						{
							"price_tier_amount": 150,
							"price_tier_up_to": null
						}
					],
					"price_type": "recurring"
				}
			],
			"require_remove_proxy_ids": false
		}
	]
}
```

</details>

2. Extract product\_prices and display on UI. This shows the available payment cycles of the service for an immediate change and a scheduled change.

Only "end\_of\_period": true dictionary has various product\_prices, meaning that you can only change payment cycle at the end of the current period.

3. Customer picks new payment cycle to change at the end of the current period and you call /service/reconfigure\_calculate/{service\_id}

```
{
	"end_of_period":	true,
	"service_price_id":	{new_price_id for new payment cycle}
}
```

<details>

<summary>Example Response</summary>

```
{
	"anchor_behavior": "unchanged",
	"due": "09th January 2025",
	"end_of_period": true,
	"message": "Service reconfiguration option validated and calculated.",
	"proration_behavior": "none",
	"service_price_id": "price_1OWfPxC8brDpu5AajovuNcMy",
	"service_quantity": 12,
	"total": 2100
}
```

</details>

4. Use response data to display **Next Due Date, Payment Anchor Date Behavior, New Quantity and New Total**
5. Customer confirms and you call /service/reconfigure/{service\_id} with the same JSON as previously validated

```
{
	"edited": [
		"170-4825-7769"
	],
	"message": "Service 170-4825-7769 has been successfully reconfigured with recur every month  with 12 x Static Dedicated Datacenter Proxy (DE) at the end of your current billing period.",
	"subscription_schedule_created": [
		"sub_sched_1OXMtbC8brDpu5Aa5FR71BvJ"
	]
}
```

#### &#x20;Increase Datacenter/Static Residential Quantity

1. /service/reconfigure/{service\_id}

Call JSON

```json
{
	"service_quantity": {Integer Greater Than Current Quantity},
	"end_of_period":	false
}
```

Response JSON

```
{
	"edited": [
		"170-4825-7769"
	],
	"message": "Service successfully reconfigured with price_id price_1OWfPxC8brDpu5Aa8jjGMPEN and quantity 20."
}
```

2. Payment taken and service\_status set to `awaiting_additional_fulfillment`
3. New Proxies are attached to package

#### &#x20;Decrease Datacenter/Static Residential Quantity

1. /service/reconfigure/{service\_id}

```
{
	"service_quantity": {Integer Small Than Current Quantity},
	"end_of_period":	false,
	"require_remove_proxy_ids": [123, 234, 444...] #List of proxy_id in current service with list length equal to current_quantity-new_quantity
}
```

#### Bringing Forward Residential Bandwidth Payment Cycle

1. /service/reconfigure/{service\_id}

```
{
	"end_of_period":	false,
}
```

2. Payment is taken
3. New bandwidth is added immediately and payment date is reanchored


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://internal.developer.documentation.private.user.pingproxies.com/service-management/service-reconfiguration/service-reconfiguration-example.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
