PATCH
/
public
/
user
/
service
/
edit
/
{service_id}
curl --request PATCH \
  --url https://api.pingproxies.com/1.0/public/user/service/edit/{service_id} \
  --header 'Content-Type: <content-type>' \
  --header 'X-API-Private-Key: <api-key>' \
  --header 'X-API-Public-Key: <api-key>' \
  --data '{
  "cancel_comment": "<string>",
  "cancel_feedback": "<string>",
  "payment_method_id": "<string>",
  "service_is_automatic_collection": true,
  "service_is_pending_cancellation": true,
  "service_metadata": {}
}'
{
  "edited": [
    "API-1234-5678"
  ],
  "message": "Service successfully edited."
}

Authorizations

X-API-Private-Key
string
header
required

Private API key for user-level authentication.

X-API-Public-Key
string
header
required

Public API key for user-level authentication.

Headers

Content-Type
string
default:application/json
required

Content type for the request body as application/json.

Path Parameters

service_id
string
required

ID of the Service to edit

Body

application/json
Parameters required to edit the service.
cancel_comment
string

Comment regarding the cancellation.

cancel_feedback
string

Feedback reasons for cancellation.

payment_method_id
string

New payment method ID.

service_is_automatic_collection
boolean

Flag to determine if service charge should be automatic.

service_is_pending_cancellation
boolean

Indicates if the service should be canceled at the end of the period.

service_metadata
object

Arbitrary metadata object associated with the service. Constraints

  • Must be a valid, non-nested JSON object.
  • Maximum 30 keys.
  • Each value's string representation ≤ 300 characters.
  • Total size ≤ 32KB.

Response

200 - application/json
Successfully edited the service.
edited
string[]

List of service IDs that were successfully edited.

The service ID.

Example:
["API-1234-5678"]
message
string

Success message.

Example:

"Service successfully edited."