SkyHub API

Questions

Endpoint para perguntas e respostas na pré-venda

List Questions

Open in API Explorer
GET /questions

Lista perguntas

Filtros

  • status: Estado atual da pergunta
  • platform: De qual marketplace esta buscando as informações.

Paginação

A paginação é feita utilizando o cursor que esta presente em todas as requests de listar. Cada cursor sempre aponta para a próxima página em apenas um único sentido.

Ao utilizar o cursor, os parâmetros de filtros são ignorados pois o cursor sempre refere-se aos filtros da primeira consulta.

Example Request

Format:
curl --request GET \
  --url 'https://desenvolvedores.skyhub.com.br/questions?status=UNANSWERED&platform=Meli&cursor=eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj' \
  --header 'accept: application/json' \
  --header 'x-accountmanager-key: 7196af0c362340ea83270' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --header 'x-user-email: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/questions?status=UNANSWERED&platform=Meli&cursor=eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["x-api-key"] = 'YOUR API KEY HERE'
request["accept"] = 'application/json'
request["x-user-email"] = 'MUDAR@SEU_EMAIL.COM'
request["x-accountmanager-key"] = '7196af0c362340ea83270'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/questions?status=UNANSWERED&platform=Meli&cursor=eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj",
  "headers": {
    "x-api-key": "YOUR API KEY HERE",
    "accept": "application/json",
    "x-user-email": "MUDAR@SEU_EMAIL.COM",
    "x-accountmanager-key": "7196af0c362340ea83270"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("desenvolvedores.skyhub.com.br")

headers = {
    'x-api-key': "YOUR API KEY HERE",
    'accept': "application/json",
    'x-user-email': "MUDAR@SEU_EMAIL.COM",
    'x-accountmanager-key': "7196af0c362340ea83270"
    }

conn.request("GET", "/questions?status=UNANSWERED&platform=Meli&cursor=eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://desenvolvedores.skyhub.com.br/questions?status=UNANSWERED&platform=Meli&cursor=eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-accountmanager-key: 7196af0c362340ea83270",
    "x-api-key: YOUR API KEY HERE",
    "x-user-email: MUDAR@SEU_EMAIL.COM"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://desenvolvedores.skyhub.com.br/questions?status=UNANSWERED&platform=Meli&cursor=eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("accept", "application/json")
	req.Header.Add("x-user-email", "MUDAR@SEU_EMAIL.COM")
	req.Header.Add("x-accountmanager-key", "7196af0c362340ea83270")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
status String Optional

Filtra as mensagens pelos seus status

Valores possíveis:

  • ANSWERED
  • UNANSWERED
  • FINISHED
UNANSWERED
platform String Required

Filtro para retornar somente as mensagens de uma plataform específica.

Valores possíveis

  • Meli
Meli
cursor String Optional

Utilizado para fazer a paginação das perguntas.

Caso este parâmetro esteja presente, os parâmetros de status e platform serão ignorados.

eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOj

Request Headers

Name Type Required Description Example
Accept String Required application/json
X-User-Email String Required MUDAR@SEU_EMAIL.COM
x-accountmanager-key String Required

Identificador da sua integração com a SkyHub

7196af0c362340ea83270

Responses

200 Success Questions List questions
{
  questions: [
Array

Lista de perguntas

    {
    { ... }
Object

Question

      "id": "Meli-3441234228",
String
      "answered": true,
Boolean
      "message": "Customer Question Message",
String
      "answer": {
      "answer": { ... }
Object
        "message": "Seller Response Question",
String
        "created_on": "2015-02-13T12:58:30-04:00"
String
      },
      "name": "Customer Name",
String
      "sku": "Não associado",
String
      "tags": [
    "foo",
    "foo",
    "foo"
  ],
Array
      "created_on": "2015-02-11T17:46:11-04:00",
String
      "customer": {
      "customer": { ... }
Object
        "name": "Customer Name"
String
      }
    }
  ]
  "cursor": "eyJwbGF0Zm9ybSI6Ik1lbGkiLCJvZmZzZXQiOjE"
String

Cursor de Paginação

}
400 Bad Request

Não foi possível processar a requisição

Questions Response errors
{
  "errors": [
    "Error Message",
    "Error Message",
    "Error Message"
  ]
Array

Retorno padrão de errors

}
401 Authentication Failed

Não foi possível realizar a autenticação. Verifique se as credenciais de acesso estão corretas.

Questions Auth error
{
  "error": "Para continuar, efetue login."
String
}
500 Internal Server Error

Caso ocorra algum erro interno no servidor

(Empty Response)

Show Question

Open in API Explorer
GET /questions/:id

Visualiza uma pergunta pelo seu identificador

Example Request

Format:
curl --request GET \
  --url https://desenvolvedores.skyhub.com.br/questions/:id \
  --header 'accept: application/json' \
  --header 'x-accountmanager-key: 7196af0c362340ea83270' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --header 'x-user-email: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/questions/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["x-api-key"] = 'YOUR API KEY HERE'
request["accept"] = 'application/json'
request["x-accountmanager-key"] = '7196af0c362340ea83270'
request["x-user-email"] = 'MUDAR@SEU_EMAIL.COM'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/questions/:id",
  "headers": {
    "x-api-key": "YOUR API KEY HERE",
    "accept": "application/json",
    "x-accountmanager-key": "7196af0c362340ea83270",
    "x-user-email": "MUDAR@SEU_EMAIL.COM"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("desenvolvedores.skyhub.com.br")

headers = {
    'x-api-key': "YOUR API KEY HERE",
    'accept': "application/json",
    'x-accountmanager-key': "7196af0c362340ea83270",
    'x-user-email': "MUDAR@SEU_EMAIL.COM"
    }

conn.request("GET", "/questions/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://desenvolvedores.skyhub.com.br/questions/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-accountmanager-key: 7196af0c362340ea83270",
    "x-api-key: YOUR API KEY HERE",
    "x-user-email: MUDAR@SEU_EMAIL.COM"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://desenvolvedores.skyhub.com.br/questions/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("accept", "application/json")
	req.Header.Add("x-accountmanager-key", "7196af0c362340ea83270")
	req.Header.Add("x-user-email", "MUDAR@SEU_EMAIL.COM")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
Accept String Required application/json
x-accountmanager-key String Required

Identificador da sua integração com a SkyHub

7196af0c362340ea83270
X-User-Email String Required MUDAR@SEU_EMAIL.COM

Responses

200 Success Questions Question
{
  "id": "Meli-3441234228",
String
  "answered": true,
Boolean
  "message": "Customer Question Message",
String
  "answer": {
  "answer": { ... }
Object
    "message": "Seller Response Question",
String
    "created_on": "2015-02-13T12:58:30-04:00"
String
  },
  "name": "Customer Name",
String
  "sku": "Não associado",
String
  "tags": [
    "foo",
    "foo",
    "foo"
  ],
Array
  "created_on": "2015-02-11T17:46:11-04:00",
String
  "customer": {
  "customer": { ... }
Object
    "name": "Customer Name"
String
  }
}
401 Authentication Failed Questions Auth error
{
  "error": "Para continuar, efetue login."
String
}
404 Not Found Questions Response errors
{
  "errors": [
    "Error Message",
    "Error Message",
    "Error Message"
  ]
Array

Retorno padrão de errors

}
500 Internal Server Error (Empty Response)

Delete Question

Open in API Explorer
DELETE /questions/:id

Remove uma pergunta

Example Request

Format:
curl --request DELETE \
  --url https://desenvolvedores.skyhub.com.br/questions/:id \
  --header 'accept: application/json' \
  --header 'x-accountmanager-key: 7196af0c362340ea83270' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --header 'x-user-email: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/questions/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = 'YOUR API KEY HERE'
request["x-user-email"] = 'MUDAR@SEU_EMAIL.COM'
request["x-accountmanager-key"] = '7196af0c362340ea83270'
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/questions/:id",
  "headers": {
    "x-api-key": "YOUR API KEY HERE",
    "x-user-email": "MUDAR@SEU_EMAIL.COM",
    "x-accountmanager-key": "7196af0c362340ea83270",
    "accept": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("desenvolvedores.skyhub.com.br")

headers = {
    'x-api-key': "YOUR API KEY HERE",
    'x-user-email': "MUDAR@SEU_EMAIL.COM",
    'x-accountmanager-key': "7196af0c362340ea83270",
    'accept': "application/json"
    }

conn.request("DELETE", "/questions/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://desenvolvedores.skyhub.com.br/questions/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "x-accountmanager-key: 7196af0c362340ea83270",
    "x-api-key: YOUR API KEY HERE",
    "x-user-email: MUDAR@SEU_EMAIL.COM"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://desenvolvedores.skyhub.com.br/questions/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("x-user-email", "MUDAR@SEU_EMAIL.COM")
	req.Header.Add("x-accountmanager-key", "7196af0c362340ea83270")
	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
X-User-Email String Required MUDAR@SEU_EMAIL.COM
x-accountmanager-key String Required

Identificador da sua integração com a SkyHub

7196af0c362340ea83270
Accept String Required application/json

Responses

204 Success (Empty Response)
401 Authentication Failed Questions Auth error
{
  "error": "Para continuar, efetue login."
String
}
404 Not Found

Pergunta não encontrada

Questions Response errors
{
  "errors": [
    "Error Message",
    "Error Message",
    "Error Message"
  ]
Array

Retorno padrão de errors

}
500 Internal Server Error (Empty Response)

Question Answer

Open in API Explorer
POST /questions/:id/answer

Responde uma pergunta

Example Request

Format:
curl --request POST \
  --url https://desenvolvedores.skyhub.com.br/questions/:id/answer \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x-accountmanager-key: 7196af0c362340ea83270' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --header 'x-user-token: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/questions/:id/answer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["x-api-key"] = 'YOUR API KEY HERE'
request["accept"] = 'application/json'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request["x-user-token"] = 'MUDAR@SEU_EMAIL.COM'
request["x-accountmanager-key"] = '7196af0c362340ea83270'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/questions/:id/answer",
  "headers": {
    "x-api-key": "YOUR API KEY HERE",
    "accept": "application/json",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001",
    "x-user-token": "MUDAR@SEU_EMAIL.COM",
    "x-accountmanager-key": "7196af0c362340ea83270"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("desenvolvedores.skyhub.com.br")

payload = ""

headers = {
    'x-api-key': "YOUR API KEY HERE",
    'accept': "application/json",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001",
    'x-user-token': "MUDAR@SEU_EMAIL.COM",
    'x-accountmanager-key': "7196af0c362340ea83270"
    }

conn.request("POST", "/questions/:id/answer", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://desenvolvedores.skyhub.com.br/questions/:id/answer",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: multipart/form-data; boundary=---011000010111000001101001",
    "x-accountmanager-key: 7196af0c362340ea83270",
    "x-api-key: YOUR API KEY HERE",
    "x-user-token: MUDAR@SEU_EMAIL.COM"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://desenvolvedores.skyhub.com.br/questions/:id/answer"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
	req.Header.Add("x-user-token", "MUDAR@SEU_EMAIL.COM")
	req.Header.Add("x-accountmanager-key", "7196af0c362340ea83270")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Headers

Name Type Required Description Example
Accept String Required application/json
Content-Type String Required application/json
X-User-Token String Required MUDAR@SEU_EMAIL.COM
x-accountmanager-key String Required

Identificador da sua integração com a SkyHub

7196af0c362340ea83270

Responses

204 Success (Empty Response)
400 Bad Request

Problemas de validação durante o envio para o marketplace.

Questions Response errors
{
  "errors": [
    "Error Message",
    "Error Message",
    "Error Message"
  ]
Array

Retorno padrão de errors

}
401 Authentication Failed Questions Auth error
{
  "error": "Para continuar, efetue login."
String
}
404 Not Found

Question não encontrada

Questions Response errors
{
  "errors": [
    "Error Message",
    "Error Message",
    "Error Message"
  ]
Array

Retorno padrão de errors

}
422 Unprocessable Entity

Não foi possível processar a request

Questions Response errors
{
  "errors": [
    "Error Message",
    "Error Message",
    "Error Message"
  ]
Array

Retorno padrão de errors

}
500 Internal Server Error (Empty Response)