Simulations

Update a simulation

Changed on

Updates a simulation using its ID.

For scenario simulations, you can optionally include a config.entities object in the request body with entity IDs to populate simulated webhook payloads with real data. The API key making the request needs read permissions:

  • For the entities you provided, or the request fails.
  • For related entities which aren't nested in the entities you provided, or static examples will be used instead.

For example, when updating a subscription renewal scenario simulation with an API key that has a subscription.read permission but not a transaction.read permission, the request succeeds and the subscription data will be used in simulated payloads, but the related transaction data won't be used in payloads and falls back to a static example.

If you don't provide a config.entities object, simulated webhook payloads are populated with static examples.

If successful, your response includes a copy of the updated simulation entity.

patch/simulations/{simulation_id}

Request

  • Base URL
    https://sandbox-api.paddle.com
  • Auth
    HTTP bearer

Path parameters

simulation_idstring required

Paddle ID of the simulation entity to work with.

Request body

OR

Example request

{
  "notification_setting_id": "ntfset_01gt21c5pdx9q1e4mh1xrsjjn6"
}

Response

The request has succeeded.

Example response

{
  "data": {
    "id": "ntfsim_01ghbkd0frb9k95cnhwd1bxpvk",
    "notification_setting_id": "ntfset_01gt21c5pdx9q1e4mh1xrsjjn6",
    "last_run_at": "2024-10-12T07:20:50.52Z",
    "created_at": "2024-10-12T07:20:50.52Z",
    "updated_at": "2024-10-13T07:20:50.52Z"
  },
  "meta": {
    "request_id": "b15ec92e-8688-40d4-a04d-f44cbec93355"
  }
}

Changes

    • info

      the request optional property / became not read-only

    • info

      the request optional property / became not read-only

    • breaking

      added the new path request parameter simulation_id

    • breaking

      request body became required

    • breaking

      removed from the request body oneOf list

    • breaking

      the request's body type changed from object to no type

    • breaking

      added to the response property oneOf list for the response status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added to the request body oneOf list

    • info

      added to the response property allOf list for the response status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      removed from the response property oneOf list for the response status