Wrong isVisible, Visibility values after setting

MagdeveloperMagdeveloper Member Posts: 1

Hi,

We try to sent following code via API to set below values:

$this->api->products->update( $productId, [
'product' => [
'isVisible' => false,
'visibility' => 'hidden'
]
] );

However we retrieve the product  back where these values have not been changed / set...

Can you please investigate?

1 comment

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 573 moderator
    edited December 2018
    Hey @Magdeveloper

    There's probably something wrong with your code. 

    Have you tried to do a manual curl request?

    curl -X PUT \  https://api.{{cluster}}.com/en/products/{{productID}}.json \  -H 'Authorization: Basic {{token}}' \  -H 'Content-Type: application/json' \  -d '{  "product": {    "visibility": "visible",    "isVisible" : true  }}

    Fill the cluster, product ID and the base64 encrypted of your api key and secret and tell me if you're able to get the change as you expect

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.