Service Adjustments Explained
Understanding the service adjustment audit trail in the Ping Proxies API
Service Adjustments
Service Adjustments provide a comprehensive audit trail of all modifications made to services within the Ping Proxies system. They capture detailed information about what changed, who made the change, when it occurred, and the specific values before and after the adjustment.
What Are Service Adjustments?
A Service Adjustment is a record created every time a service is modified in any way. These adjustments serve several important purposes:
- Audit Trail: Maintain a complete history of all service changes
- Accountability: Track who made each change (system, administrator, or customer)
- Transparency: Document exact values before and after modifications
- Troubleshooting: Help diagnose issues by reviewing the chronology of changes
- Billing Records: Provide references for invoices generated due to adjustments
Key Components of a Service Adjustment
Each Service Adjustment contains detailed information to fully document a change:
Identifiers and Metadata
Field | Description |
---|---|
service_adjustment_id | Unique identifier for the adjustment record |
service_id | ID of the service that was modified |
invoice_id | ID of any invoice generated by this adjustment |
service_adjustment_creation_datetime | When the adjustment was created |
service_adjustment_last_update_datetime | When the adjustment was last updated |
Type and Status
Field | Description |
---|---|
service_adjustment_type | The type of adjustment (see types below) |
service_adjustment_status | Current status: pending , complete , or failed |
Source Tracking
Field | Description |
---|---|
service_adjustment_is_administrator | Whether an administrator made the change |
service_adjustment_is_automatic | Whether the system made the change automatically |
service_adjustment_is_customer | Whether a customer made the change |
Change Documentation
Field | Description |
---|---|
service_adjustment_pre | JSON snapshot of service state before the adjustment |
service_adjustment_post | JSON snapshot of service state after the adjustment |
service_adjustment_eval | Side-by-side comparison of changed values |
Service Adjustment Types
Service adjustments can be of various types, each representing a different kind of modification:
Type | Description |
---|---|
ingestion | Initial creation of a service |
fulfillment | Allocation of proxies to a service |
remove_proxy | Removal of proxies from a service |
additional_fulfillment | Adding more proxies to an existing service |
update | General update to service attributes |
proxy_replacement | Replacing proxies with new ones |
extension | Extending the service period |
top_up | Adding additional bandwidth to a residential service |
top_up_and_extension | Both extending service and adding bandwidth |
cancel | Cancellation of a service |
Understanding the Adjustment Evaluation
The service_adjustment_eval
field is particularly useful as it provides a clear, side-by-side comparison of the changed values. This field contains an object where:
- Each key represents a field that was changed
- Each value is an array with two elements:
- The first element is the value before the change
- The second element is the value after the change
For example:
This evaluation shows that the service expiry was extended by one year and the quantity was increased from 5 to 10.
Special Adjustment Types
Proxy Replacements
For proxy_replacement
adjustments, the object will include additional data in a proxy_replacements
array, which contains records of each proxy that was replaced:
This shows the old and new IP addresses, as well as the reason for the replacement.
Where Adjustments Come From
Service adjustments are created automatically in response to various events:
-
Customer Actions:
- Manually editing a service through the dashboard
- Making changes via the API
- Canceling a service
- Adding bandwidth to a residential service
-
Administrative Actions:
- Support staff making changes to services
- Manual adjustments by the Ping Proxies team
-
Automated System Actions:
- Automatic fulfillment of newly purchased services
- Scheduled service renewals
- System-initiated proxy replacements
- Error recovery processes
Accessing Service Adjustments
Service adjustments can be accessed through the API using:
- Retrieve by ID: To get details of a specific adjustment
- Search: To find adjustments for a particular service or type
When retrieving a service adjustment with a proxy replacement, the response will include details of all replaced proxies to provide a complete picture of what changed.
Practical Uses of Service Adjustments
Service adjustments offer valuable data for various stakeholders:
- For Customers: Understand when and why services changed
- For Resellers: Track changes to client services
- For Developers: Debug integration issues by reviewing the chronology of changes
- For Support Teams: Quickly identify what changed when troubleshooting
Reading an Adjustment: Example Scenario
Let’s walk through a practical example of reading a service adjustment:
A customer sees that their service was recently modified. They can examine the adjustment to find:
- What changed: By looking at the
service_adjustment_eval
field - When it changed: From the
service_adjustment_creation_datetime
- Who made the change: By checking the source flags (administrator, automatic, or customer)
- Why it changed: By understanding the
service_adjustment_type
- Complete before/after state: By examining the
service_adjustment_pre
andservice_adjustment_post
fields
This comprehensive information helps eliminate guesswork and provides a clear picture of the service’s history.
How Adjustments Connect to Other Objects
Service adjustments are connected to several other objects in the Ping Proxies system:
- Services: Each adjustment belongs to a specific service
- Invoices: Adjustments that involve billing changes will reference the corresponding invoice
- Proxy Replacements: When proxies are replaced, the adjustment contains details of each replacement
- Residential Ledger: For residential services, bandwidth adjustments may be linked to ledger entries