Bulk Import users via API

We recommend the "/bulkimports?" endpoint for situations where you need to create or update multiple users via the API. This endpoint only works for creating/updating users at this time. As with all other Litmos API calls, you can make a GET, PUT or POST request using XML or JSON formats. The bulk import runs the same process as the bulk import functionality available within the UI. 

Get’s the latest Bulk Imports for an organization (latest 1000).

 

GEThttps://api.litmos.com/v1.svc/bulkimports?apikey=[APIKEY]&source=[company-name]

Response:

<UserBulkImports>
  <UserBulkImport>
    <Id></Id>
    <ImportDate></ImportDate>
    <Status> </Status>
    <TotalRecords></TotalRecords>
    <TotalUsersCreated></TotalUsersCreated>
    <Failed></Failed>
    <Duplicate></Duplicate>
    <InvalidEmail></InvalidEmail>
    <SendEmails></SendEmails>
    <SkipFirstLogin></SkipFirstLogin>
  </UserBulkImport>
  <UserBulkImport>
    <Id></Id>POST -
    <Status> </Status>
    <TotalRecords></TotalRecords>
    <TotalUsersCreated></TotalUsersCreated>
    <Failed></Failed>
    <Duplicate></Duplicate>
    <InvalidEmail></InvalidEmail>
    <SendEmails></SendEmails>
    <SkipFirstLogin></SkipFirstLogin>
  </UserBulkImport>
  ………..
</UserBulkImports>

 

 

Get a specific Bulk Import:

 

 

GET- https://api.litmos.com/v1.svc/bulkimports/[Id]?apikey=[APIKEY]&source=[company-name]

Response:

<UserBulkImport>
   <Id></Id>
   <ImportDate></ImportDate>
   <Status> </Status>
   <TotalRecords></TotalRecords>
   <TotalUsersCreated></TotalUsersCreated>
   <Failed></Failed>
   <Duplicate></Duplicate>
   <InvalidEmail></InvalidEmail>
   <SendEmails></SendEmails>
   <SkipFirstLogin></SkipFirstLogin>
</UserBulkImport>

 

Create a new Bulk Import for an organization:

 

POST -https://api.litmos.com/v1.svc/bulkimports?apikey=[APIKEY]&source=[company-name]

 

Querystring parameters:

&sendmessage=[true/false] set true if you want to send login emails

&skipfirstlogin=[true/false] set to true if you want to skipfirstlogin

&format=json for json format

 

XML Body

<UserImports>

 <UserImport>

   <Username></Username>

   <Email></Email>

   <FirstName></FirstName>

   <LastName> </LastName>

   <Phone></Phone>

   <Mobile></Mobile>

   <Skype></Skype>

   <Title></Title>

   <CompanyName></CompanyName>

   <WebSite></WebSite>

   <Twitter></Twitter>

   <Team1></Team1>

   <Team2></Team2>

   <Team3></Team3>

   <Team4></Team4>

   <Team5></Team5>

   <Course1></Course1>

   <Course2></Course2>

   <Course3></Course3>

   <Address1></Address1>

   <Address2></Address2>

   <City></City>

   <State></State>

   <Zip></Zip>

   <Country></Country>

   <CustomField1></CustomField1>

   <CustomField2></CustomField2>

   <CustomField3></CustomField3>

   <CustomField4></CustomField4>

   <CustomField5></CustomField5>

   <CustomField6></CustomField6>

   <CustomField7></CustomField7>

   <CustomField8></CustomField8>

   <CustomField9></CustomField9>

   <CustomField10></CustomField10>

   <Active>true/false (If not included default is false)</Active>

 </UserImport>

 <UserImport>

   <Username> </Username>

   <Email> </Email>

   <FirstName> </FirstName>

   <LastName> </LastName>

   <Phone></Phone>

   <Mobile></Mobile>

   <Skype></Skype>

   <Title></Title>

   <CompanyName></CompanyName>

   <WebSite></WebSite>

   <Twitter></Twitter>

   <Team1></Team1>

   <Team2></Team2>

   <Team3></Team3>

   <Team4></Team4>

   <Team5></Team5>

   <Course1></Course1>

   <Course2></Course2>

   <Course3></Course3>

   <Address1></Address1>

   <Address2></Address2>

   <City></City>

   <State></State>

   <Zip></Zip>

   <Country></Country>

   <CustomField1></CustomField1>

   <CustomField2></CustomField2>

   <CustomField3></CustomField3>

   <CustomField4></CustomField4>

   <CustomField5></CustomField5>

   <CustomField6></CustomField6>

   <CustomField7></CustomField7>

   <CustomField8></CustomField8>

   <CustomField9></CustomField9>

   <CustomField10></CustomField10>

   <Active>true/false (If not included default is false)</Active>

 </UserImport>

</UserImports>

 

JSON Body:

[{

   "Username" : "",
   "Email" : "",
   "FirstName" : "",
   "LastName" : "",
   "Phone" : "",
   "Mobile" : "",
   "Skype" : "",
   "Title" : "",
   "CompanyName" : "",
   "WebSite" : "",
   "Twitter" : "",
   "Team1" : "",
   "Team2" : "",
   "Team3" : "",
   "Team4" : "",
   "Team5" : "",
   "Course1" : "",
   "Course2" : "",
   "Course3" : "",
   "Address1" : "",
   "Address2" : "",
   "City" : "",
   "State" : "",
   "Zip" : "",
   "Country" : "",
   "CustomField1" : "",
   "CustomField2" : "",
   "CustomField3" : "",
   "CustomField4" : "",
   "CustomField5" : "",
   "CustomField6" : "",
   "CustomField7" : "",
   "CustomField8" : "",
   "CustomField9" : "",
   "CustomField10" : "",
   "Active" : "true"
},

 

{

   "Username" : "",
   "Email" : "",
   "FirstName" : "",
   "LastName" : "",
   "Phone" : "",
   "Mobile" : "",
   "Skype" : "",
   "Title" : "",
   "CompanyName" : "",
   "WebSite" : "",
   "Twitter" : "",
   "Team1" : "",
   "Team2" : "",
   "Team3" : "",
   "Team4" : "",
   "Team5" : "",
   "Course1" : "",
   "Course2" : "",
   "Course3" : "",
   "Address1" : "",
   "Address2" : "",
   "City" : "",
   "State" : "",
   "Zip" : "",
   "Country" : "",
   "CustomField1" : "",
   "CustomField2" : "",
   "CustomField3" : "",
   "CustomField4" : "",
   "CustomField5" : "",
   "CustomField6" : "",
   "CustomField7" : "",
   "CustomField8" : "",
   "CustomField9" : "",
   "CustomField10" : "",
   "Active" : "true"
}]

 

 

 

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.