Create a new webhook not working.

gregaricangregarican Posts: 308Member 
I have a test LS E-com account and am attempting to create a new webhook to test out. Based on your API documentation (https://developers.lightspeedhq.com/ecom/endpoints/webhook/#post-create-a-webhook) it looks pretty straightforward. Do you know what I could be missing? I have verified that the API credentials I am using are correct. Since I have other API calls that work.

I'll paste the HTTP request/response pair below. Not sure how EN or en (I tried both) are invalid ISO 639-1 options. I even tried changing the language to nl to match the example. Same error was returned in the response. Any suggestions would be welcomed!

Content-Type: application/json
cache-control: no-cache
Postman-Token: c2df7726-90d1-4ad8-bc52-bec36e389b8e
User-Agent: PostmanRuntime/7.6.0
Accept: */*
Host: api.shoplightspeed.com
accept-encoding: gzip, deflate
authorization: Basic {{myEncodedApiKeyAndSecret}}
content-length: 207
Connection: close

{
  "webhook": {
    "isActive": true,
    "itemGroup": "products",
    "itemAction": "*",
    "language": "EN",
    "format": "xml",
    "address": "https://myFqdnUrl/endpoint"
  }
}
HTTP/1.1 404 Not Found
Server: nginx
Date: Mon, 04 Feb 2019 18:27:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 114
Connection: close
X-RateLimit-Limit: 1000/12000/288000
X-RateLimit-Remaining: 996/11993/287993
X-RateLimit-Reset: 161/1961/19961
X-Runtime: 0.113040
X-Request-Id: c0376839767ba566015b5698b3f5b3df

{"error":{"code":404,"method":"CREATE","request":"\/en\/webhooks.json","message":"Unknown or inactive language."}}

3 comments

  • gregaricangregarican Posts: 308Member 
    Please disregard. Some of the API documentation needs to be looked into. I see now the URL path needs to be us and not en for the API call to work. All good now.
  • Adrian SamuelAdrian Samuel Posts: 521Moderator, Lightspeed Staff moderator
    Hey @gregarican, we're glad you've worked this out! The choice of en/us depends on the default language of the shop

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.