Update a simulation
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.
Path Parameters
Paddle ID of the simulation entity to work with.
Request Body
Paddle ID of the notification setting where this simulation is sent, prefixed with ntfset_
.
Name of this simulation.
Whether this entity can be used in Paddle.
Single event sent for this simulation, in the format entity.event_type
.
Simulation payload. Pass a JSON object that matches the schema for an event type to simulate a custom payload. Set to null
to clear and populate with a demo example.
Response
Represents a simulation entity.
Unique Paddle ID for this simulation, prefixed with ntfsim_
.
Whether this entity can be used in Paddle.
Paddle ID of the notification setting where this simulation is sent, prefixed with ntfset_
.
Name of this simulation.
Single event sent for this simulation, in the format entity.event_type
.
Simulation payload.
Configuration for scenario simulations. null
for single events.
RFC 3339 datetime string of when this simulation was last run. null
until run. Set automatically by Paddle.
RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
Information about this response.
Unique ID for the request relating to this response. Provide this when contacting Paddle support about a specific request.
12345678910111213141516171819201{
2 "name": "Refund approved",
3 "type": "adjustment.updated",
4 "payload": {
5 "id": "adj_01hvgf2s84dr6reszzg29zbvcm",
6 "action": "refund",
7 "transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y",
8 "subscription_id": "sub_01hvccbx32q2gb40sqx7n42430",
9 "customer_id": "ctm_01hrffh7gvp29kc7xahm8wddwa",
10 "reason": "error",
11 "credit_applied_to_balance": null,
12 "currency_code": "USD",
13 "status": "approved",
14 "items": [
15 {
16 "id": "adjitm_01hvgf2s84dr6reszzg2gx70gj",
17 "item_id": "txnitm_01hvcc94b7qgz60qmrqmbm19zw",
18 "type": "partial",
19 "amount": "100",
20 "proration": null,