Jump to content

How to hide some fields from Webservice API


Recommended Posts

Good day to everyone!

Trying to figure out if it is possible to hide some fields from Prestashop 1.7.5.x Webservice API. Does anyone know the answer?

More Info:

  • I created custom Webservice Resource.
  • Extended Product class.
  • Cusom resource gives me all object fields

But I want to hide some fields, for example wholesale price, before giving access to others.

Is there a way to do that?

Link to comment
Share on other sites

One way to do this is to define 'hidden_fields' variable inside $webserviceParameters array.

protected $webserviceParameters = [
	'hidden_fields' => ['wholesale_price'],
	'fields' => [
		...
	],
	...
];
	

Anyone knows how to hide xlink:href='....' from variable ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...