Store Locator Plus® for WordPress › Forums › Store Locator Plus › REST API Issue Add/Update Location fails
Tagged: REST API
- This topic has 3 replies, 2 voices, and was last updated 5 years, 6 months ago by Cici.
-
AuthorPosts
-
May 23, 2019 at 7:11 PM #59267INFO219Participant
Hi,
I’m using SLP for WordPress and have Premier subscription. I’m connecting via the SLP REST API as listed here:https://docs.storelocatorplus.com/blog/store-locator-plus-rest-api-endpoints/
I can call Get Locations and I can retrieve an individual location. Responses come in fine and my authentication is clearly working ok.
When I try to Add a location or Update an existing location, I get this message:
“code”: “rest_forbidden”,
“message”: “Sorry, you are not allowed to do that.”,
“data”: {
“status”: 401
}Would be helpful for a bit more detailed documentation on REST APIs, examples, or how to resolve this.
thanks,
SDAttachments:
You must be logged in to view attached files.May 24, 2019 at 10:25 AM #59271CiciKeymasterSorry, We cannot help you with this method of adding locations . , this is far and beyond the general Store locator Plus plugin questions and requires an in depth knowledge base of your specific server, host, configuration, Word Press, REST API , plugin development and how they all work together. You also have not followed the Posting guidelines above (READ THIS BEFORE POSTING) and have not provided screens shots of your Info Plugin environment. I can only assume that you do not have a legit copy of pour plugin and are trying to build or develop an APP to work with our plugin, sorry I cannot help you with that.
The docs that you are referring to are from 2016. WordPress and SLP have undergone a lot of major changes since then and since we have no idea what versions you are using we cannot verify. That article does not belong in the current docs archives and will be removed, thanks for pointing it out to us. It is way too technical for the general population.
If your l configuration is preventing REST API with communicating with WP , that is not as a result of the Store Locator Plus plugin and is outside of the realm of our support either in the forums or even for a paid support option
You should be adding locations via the basic SLP plugin under Locations add, I do not know what you are attempting to do with the screenshots. There used to be a third party add-on that allowed user managed locations, if you are trying to replicate that capability. you can look at that authors site if you are trying to provide capabilities for a user :
search for him in WordPress under DeBAAT.
May 24, 2019 at 11:13 PM #59277INFO219ParticipantThanks Cici,
I added screenshot of my environment. I’m a developer assisting a client who has a SLP Premier Subscription.
I understand if this issue is too technical, no problem.
However, I encourage you to keep this functionality in the plugin, as it’s working now!
I made a minor change in the php and was able to get around the error message. This means I can add/update locations via the API.
The use case we are developing is an integration between a CRM (Zoho) and the WordPress-SLP plugin. So if a contact in CRM has location info, it can be added/update in SLP by changing in Zoho CRM
Given that the API is working, I think it’s a great feature that allows various integrations.
thanks again for your help.
regards,
-D
Attachments:
You must be logged in to view attached files.May 26, 2019 at 11:47 AM #59281CiciKeymasterThanks for that info. i will pass it along to the developer, Lance,. I am sure a lot of what you are explaining is understood by him . He has a blog where he writes technical articles and some info for a class he teaches
As you probably know, the majority of people using the WordPress plugin do not have in depth knowledge of anything remotely as detailed as what you describe and many have little or no IT assistance never mind someone with developer skills other then building a web site page.
When I mentioned changes since the doc page you referenced was written,92016) here is an example: Updated in December 2018 the geocode requests go through the WP REST API now. This was in response to the google API changes last year and trying to save customers some money . Also a more recent update requires PHP min to be 5.6
https://www.storelocatorplus.com/fewer-geocode-requests-with-store-locator-plus-5/
My skill set is general about WordPress and more about how the general plugin works .
P.S. there are newer versions /updates to SLP, Power add-on (changelog) and Premier. You might want to check the SLP changelog for what was changed for each version of the base plugin and can be found on the WP Store locator Plus development page
-
AuthorPosts
- The topic ‘REST API Issue Add/Update Location fails’ is closed to new replies.