Import vehicle via JSON files

As we know, we already have a feature to import vehicles via files (CSV, TSV). With the current import function, we process the files (import files and image files) imported by User via FTP. Regarding the new request from Carsales, they will be using our publish API to POST the Vehicle-Json files, our system will process these JSON files to get Vehicle Information and Vehicle Images.

I went through the original Import Vehicle function to get the workflow and check if we can reuse the original function. The answer here's, we cannot reuse the original functions because of these things:

  • Structure objects are different: Original functions is using files and process line by line. Vehicle-Json is an object and it's included child objects.
  • Vehicle's Images: Original functions handler manual upload by User. Vehicle-JSON, we need to download the image via URL in a JSON file
  • We don't want to affect the original function which using on live sites.