• 0
Sign in to follow this  
lfcardoso

Histórico de perguntas

Question

Bom dia!

 

Alguém sabe como faz para puxar as perguntas anteriores que o cliente fez referente ao mesmo produto? Igual é no mercado livre hj, mas preciso fazer isso via API.

 

Eu tentei:

$getHistoricoQuestao = $meli->get('/questions/search', array('status' => 'answered', 'item_id' => $prodInfo['id'], 'seller_id' => $userResult['id'], 'access_token' => $_SESSION['access_token']));

Mas da o seguinte erro:

Array
(
    [body] => stdClass Object
        (
            [message] => Action not allowed.
            [error] => action_not_allowed
            [status] => 403
            [cause] => Array
                (
                )

        )

    [httpCode] => 403
)

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Acredito que eu descobri o erro. O parâmetro correto para se pegar as questões ja respondidas do usuário é o from.

ficando assim:

$getHistoricoQuestao = $meli->get('/questions/search', array('status' => 'answered', 'item_id' => $prodInfo['id'], 'from' => $userResult['id'], 'access_token' => $_SESSION['access_token']));

 

Eu estava colocando seller_id é esse é do vendedor. Desculpas pelo incomodo.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this