Issue Creating Customer with data other than first and last name

zaczac Member Posts: 1

Greetings,

I've been testing the Lightspeed API and I can only create and customer and add their first & lastname, but cannot add additional info like: address, address2, dob etc. I've read, and re-read your documentation, especially https://developers.lightspeedhq.com/ecom/endpoints/customer/#post-create-a-customer. Here's details on my code below (sorry for the length), and maybe you all can lend some guidance as to what I'm doing incorrectly?

POST: https://api.lightspeedapp.com/API/Account/{{account_id}}/Customer.json

Then, in the body of that request I'm sending:

{

"firstName": "John",

"lastName": "Doe3",

}

This works, and returns:

{

"@attributes": {

"count": "1"

},

"Customer": {

"customerID": "6414",

"firstName": "John",

"lastName": "Doe3",

"title": "",

"company": "",

"companyRegistrationNumber": "",

"vatNumber": "",

"createTime": "2021-04-01T20:35:22+00:00",

"timeStamp": "2021-04-01T20:35:22+00:00",

"archived": "false",

"contactID": "6430",

"creditAccountID": "0",

"customerTypeID": "0",

"discountID": "0",

"taxCategoryID": "0",

"Contact": {

"contactID": "6430",

"custom": "",

"noEmail": "true",

"noPhone": "true",

"noMail": "true",

"Addresses": {

"ContactAddress": {

"address1": "",

"address2": "",

"city": "",

"state": "",

"zip": "",

"country": "",

"countryCode": "",

"stateCode": ""

}

},

"Phones": "",

"Emails": "",

"Websites": "",

"timeStamp": "2021-04-01T20:35:22+00:00"

},

"Tags": ""

}

}



When I adjust the body of my call to:



{

"firstName": "John",

"lastName": "Doe3",

"addressBillingStreet": "123 Test St.",

"addressBillingStreet2": "#3",

"addressBillingZipcode": "80202",

"addressBillingCity": "Denver",

"addressBillingRegion": "CO"

}

The Customer John Doe3 is created, but the other fields don't populate and the return JSON is the same as I provided above. I've tried formatting my JSON body to match the response and swapping various address fields. Any idea where I'm going wrong? Thanks so much!

Sign In or Register to comment.