Creating Sales Orders and Auto-Generating Sales Order Numbers

I built an app to batch upload and create Sales Orders, but I'm running into this error.

400 Bad Request

{

"code": 4097,

"message": "Number entered does not match the auto-generated number. To proceed, please disable auto-generation and continue."

}

Is there a way to keep auto-generated numbers, but also use the API to make sales orders and numbers?