title: How can I send a POST request without sending an auto incrementing primary key in express
body: <p>I am writing a simple API which I have been testing using Postman. I have an auto incrementing primary key (CustomerTypeID) for my "customer_type" table stored in MySQL. For practical reasons I need to be able to create records in this table without sending a CustomerTypeID. When I send the following POST request using Postman:</p>
  
  <pre><code>{
    "CustomerType": "testing"
  }
  </code></pre>
  
  <p>The updated table shows a new row with CustomerTypeID of 2 and a CustomerType of NULL.</p>
  
  <p>Below is a snippet of code in my Express API which shows this specific query and how the routing for this POST request works.</p>
  
  <pre><code>var db = require('../dbconnection.js');
  var CustomerType = {
    addCustomerType:function(CustomerType,callback) {
      return db.query("INSERT INTO customer_type (CustomerType) VALUES (?)", [CustomerType.CustomerType], callback);
    }
  };
  module.exports = CustomerType;
  </code></pre>
  
  <p>I know that I could change the query to say</p>
  
  <pre><code>INSERT INTO customer_type (CustomerTypeID, CustomerType) VALUES (?,?);
  </code></pre>
  
  <p>and that would fill both columns. But, I do not know how to leave out the CustomerTypeID column as it will be a number that the end user will have no way of knowing.</p>