Skip to main content
POST
/
customers
/
bulk
/
csv
JavaScript
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
  username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
  password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const response = await client.customers.bulk.uploadCsv({
  file: fs.createReadStream('path/to/file'),
});

console.log(response.jobId);
{
  "jobId": "Job:019542f5-b3e7-1d02-0000-000000000006",
  "status": "PENDING"
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Body

multipart/form-data
file
file
required

CSV file containing customer information

Response

CSV upload accepted for processing

jobId
string
required

Unique identifier for the bulk import job

Example:

"Job:019542f5-b3e7-1d02-0000-000000000006"

status
enum<string>
required
Available options:
PENDING,
PROCESSING