Create C21 DED records in MySQL from API calls

Recipe ToolsDatabaseMarketing

What it does

When someone makes a call to the add_c21_ded API endpoint, this automation inserts a new row into the data_c21_ded table in MySQL. The endpoint returns a response so the caller knows the record was added or if an error occurred.

Who it's for

Data and analytics teams who need to add C21 DED records through an API without direct database access.

How teams use this

Add C21 DED records from external systems

External applications call the add_c21_ded endpoint to insert C21 DED records into MySQL without needing direct database credentials. The API handles validation and returns a confirmation or error message.

Integrate C21 DED with a payroll system

Route payroll deduction data from an HR or payroll platform to this API so C21 DED records sync automatically to MySQL. The endpoint becomes the bridge between systems.

Add validation before inserting records

Include a condition to check that required fields are present and valid before the row is inserted into MySQL. Only records that pass validation will be added to the table.

How it works

  1. Receive the API call. Someone calls the add_c21_ded API endpoint in real time with the request parameters for the new C21 DED record.
  2. Insert the row in MySQL. Add a new row to the data_c21_ded table in MySQL with the values from the API request so the record persists in the database.
  3. Return the response. Send a response back to the API caller confirming the C21 DED record was created in MySQL or reporting any error that occurred during insertion.