Сourses

Courses

Security and Compliance

GDPR Compliance

Integration

Website integration

Validating event parameters

When you create events in eSputnik, it is essential that the names of the entered parameters are correct.

The eSputnik system gives you the possibility to validate events and provide immediate feedback if their parameters contain errors.

Using the event parameters validation, you can:

  • Check that a parameter is in a defined set.
  • Check that a required parameter is set.

Validating event parameters in your account

To activate the event parameters validation when creating a new event or editing an existing event: 

  1. Enable the Validate parameters slide button.
  2. Click + Add parameter.
    Enabling Validate Parameters
  3. Enter the parameter name in the corresponding field and select the Required parameter checkbox if that parameter is required.
  4. Add other parameters as necessary, then click Add.
    Adding parameters

See Events to learn more about how to create events in eSputnik.

When the Validate parameters option is enabled, the system will accept an event only if it meets the specified structure, otherwise, it will not accept it and send the error “400 bad request” and the required event structure.

Validating event parameters using API

You can validate event parameters using eSputnik API Generate event: 

POST https://esputnik.com/api/v1/event

To validate the event parameters in your API request, indicate the parameters you need to validate in params of the request body.

If the parameters do not meet the specified structure, you will get the “400 bad request”  error and the required event structure in the response.

Response example: 

The event should have the following params: [
    {
        "name": "EmailAddress",
        "required": true
    },
    {
        "name": "Phone Number",
        "required": false
    },
    {
        "name": "Name",
        "required": false
    }
]

See API documentation for more information.

Any Questions?
We’re always happy to help!
Request a Callback
Fill in the form, and our specialists will call you back as soon as possible.
Request a Callback
Chat Support
We’re waiting for your questions!
Send a Chat Message
Email
Contact the eSputnik support team
Send an Email