JSON Syntax Error Updating Customer

randiwestrandiwest Member Posts: 3

We are trying to use the retail API to update customer information. We are receiving an error about the JSON input being invalid, however it is formatted correctly, as per the documentation.

I have included the request and response below. Any assistance would be greatly appreciated.

PUT /API/Account/XXXXXX/Customer/7366.json HTTP/1.1

Host: api.lightspeedapp.com

User-Agent: PHP Curl/1.9 (+https://github.com/php-mod/curl)

Accept: */*


Content-Type: application/json

Content-Length: 10


HTTP/1.1 400 Bad Request

Date: Fri, 12 Feb 2021 01:08:35 GMT

Content-Type: application/json

Transfer-Encoding: chunked

Connection: keep-alive

Set-Cookie: __cfduid=dd25a96ff9dbb42dd5ecd2818015497031613092114; expires=Sun, 14-Mar-21 01:08:34 GMT; path=/; domain=.lightspeedapp.com; HttpOnly; SameSite=Lax; Secure

x-frame-options: SAMEORIGIN

X-XSS-Protection: 1; mode=block

X-Content-Type-Options: nosniff


X-LS-OAuth-Client-Id: 72113

X-LS-API-Bucket-Level: 10.823730945587/90

X-LS-Shard-Id: 28

X-LS-API-Drip-Rate: 1

X-LS-Master-Account: true

X-LS-Master-System: false

X-LS-Master-Catalog: false

Vary: Accept-Encoding

CF-Cache-Status: DYNAMIC

cf-request-id: 0835616a1c0000ca6311234000000001

Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"

Server: cloudflare

CF-RAY: 62026b569efaca63-YUL

{"httpCode":"400","httpMessage":"Bad Request","message":"JSON Input was invalid. Error Message: Syntax error","errorClass":"InvalidArgumentException"}


Sign In or Register to comment.