Docs

Create a run for a simulation

Creates a new simulation run for a simulation.

POST /simulations/{simulation_id}/runs

Creates a new simulation run for a simulation.

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

Requires notification_simulation.write permission.

Path parameters

simulation_idstringrequired
Paddle ID of the simulation entity to work with.

Response (201)

datarequired
Represents a simulation run entity.
Single event run
Single event simulations play a single event.
idstringrequired
Example: ntfsimrun_01ghbkd0frb9k95cnhwd1bxpvk
Unique Paddle ID for this simulation run, prefixed with ntfsimrun_.
Pattern: ^ntfsimrun_[a-z\d]{26}$
statusstringrequired
Status of this simulation run.
Values
  • pending
    Simulation run is pending. Paddle is sending events that are part of this simulation.
  • completed
    Simulation run is completed. Paddle attempted to send events that are part of this simulation.
  • canceled
    Simulation run is canceled. Simulation run was canceled before all events were sent.
created_atstring (date-time)required
Example: 2024-10-12T07:20:50.52Z
RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
updated_atstring (date-time)required
Example: 2024-10-13T07:20:50.52Z
RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
typestringrequired
Single event sent for this simulation, in the format entity.event_type.
Values
+ Show all values
Scenario run
Scenario simulations play all events sent for a subscription lifecycle event.
idstringrequired
Example: ntfsimrun_01ghbkd0frb9k95cnhwd1bxpvk
Unique Paddle ID for this simulation run, prefixed with ntfsimrun_.
Pattern: ^ntfsimrun_[a-z\d]{26}$
statusstringrequired
Status of this simulation run.
Values
  • pending
    Simulation run is pending. Paddle is sending events that are part of this simulation.
  • completed
    Simulation run is completed. Paddle attempted to send events that are part of this simulation.
  • canceled
    Simulation run is canceled. Simulation run was canceled before all events were sent.
created_atstring (date-time)required
Example: 2024-10-12T07:20:50.52Z
RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
updated_atstring (date-time)required
Example: 2024-10-13T07:20:50.52Z
RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
typestringrequired
Scenario for this simulation. Scenario simulations play all events sent for a subscription lifecycle event.
Values
  • subscription_creation
    Simulates all events sent when a subscription is created.
  • subscription_renewal
    Simulates all events sent when a subscription is renewed.
  • subscription_pause
    Simulates all events sent when a subscription is paused.
  • subscription_resume
    Simulates all events sent when a subscription is resumed.
  • subscription_cancellation
    Simulates all events sent when a subscription is canceled.
metaobjectrequired
Information about this response.
request_idstringrequired
Example: b15ec92e-8688-40d4-a04d-f44cbec93355
Unique ID for the request relating to this response. Provide this when contacting Paddle support about a specific request.
Response
{
"data": {
"id": "ntfsimrun_01j82h13n87yq2sfv187hm2r0p",
"status": "pending",
"type": "subscription_creation",
"created_at": "2024-09-18T12:17:04.168467Z",
"updated_at": "2024-09-18T12:17:04.168467Z"
},
"meta": {
"request_id": "2201997e-d23b-4a49-acdb-8a9f8cc72ff6"
}
}

Was this page helpful?