SkyHub API

sync_errors

Listar categorias de erros

Open in API Explorer
GET /sync_errors/categories

Listar as Categorias de Erros que temos na SkyHub

Example Request

Format:
curl --request GET \
  --url https://desenvolvedores.skyhub.com.br/sync_errors/categories \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-accountmanager-key: foo' \
  --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/sync_errors/categories")

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["content-type"] = 'application/json'
request["x-accountmanager-key"] = 'foo'
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": "/sync_errors/categories",
  "headers": {
    "x-api-key": "YOUR API KEY HERE",
    "accept": "application/json",
    "content-type": "application/json",
    "x-accountmanager-key": "foo",
    "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",
    'content-type': "application/json",
    'x-accountmanager-key': "foo",
    'x-user-email': "MUDAR@SEU_EMAIL.COM"
    }

conn.request("GET", "/sync_errors/categories", 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/sync_errors/categories",
  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",
    "content-type: application/json",
    "x-accountmanager-key: foo",
    "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/sync_errors/categories"

	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("content-type", "application/json")
	req.Header.Add("x-accountmanager-key", "foo")
	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
Content-Type 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

foo
X-User-Email String Required MUDAR@SEU_EMAIL.COM

Responses

200 Success

Requisição executada com sucesso

sync_errors Listar erros por categoria
{
  "name": "Sincronia de Pedidos MKTP -> SkyHub",
String
  error_types: [
Array
    {
    { ... }
Object
    }
  ]
  "entity_type": "orders",
String
  "code": "sync_order_mtkp_to_skyhub"
String
}
401 Error (Empty Response)

Obter uma categoria de erro

Open in API Explorer
GET /sync_errors/categories/{code}

Example Request

Format:
curl --request GET \
  --url https://desenvolvedores.skyhub.com.br/sync_errors/categories/sync_order_mtkp_to_skyhub \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-accountmanager-key: foo' \
  --header 'x-api-key: foo' \
  --header 'x-user-email: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/sync_errors/categories/sync_order_mtkp_to_skyhub")

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["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["x-user-email"] = 'MUDAR@SEU_EMAIL.COM'
request["x-accountmanager-key"] = 'foo'
request["x-api-key"] = 'foo'

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

var options = {
  "method": "GET",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/sync_errors/categories/sync_order_mtkp_to_skyhub",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "x-user-email": "MUDAR@SEU_EMAIL.COM",
    "x-accountmanager-key": "foo",
    "x-api-key": "foo"
  }
};

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 = {
    'accept': "application/json",
    'content-type': "application/json",
    'x-user-email': "MUDAR@SEU_EMAIL.COM",
    'x-accountmanager-key': "foo",
    'x-api-key': "foo"
    }

conn.request("GET", "/sync_errors/categories/sync_order_mtkp_to_skyhub", 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/sync_errors/categories/sync_order_mtkp_to_skyhub",
  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",
    "content-type: application/json",
    "x-accountmanager-key: foo",
    "x-api-key: foo",
    "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/sync_errors/categories/sync_order_mtkp_to_skyhub"

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

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "application/json")
	req.Header.Add("x-user-email", "MUDAR@SEU_EMAIL.COM")
	req.Header.Add("x-accountmanager-key", "foo")
	req.Header.Add("x-api-key", "foo")

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

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

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

}

Path Parameters

Name Type Required Description Example
code String Required sync_order_mtkp_to_skyhub

Request Headers

Name Type Required Description Example
Accept String Required application/json
Content-Type 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

foo
X-Api-Key String Required foo

Listar erro de produtos

Open in API Explorer
GET /sync_errors/products

Receber uma lista de erros relacionados a produtos.

Example Request

Format:
curl --request GET \
  --url https://desenvolvedores.skyhub.com.br/sync_errors/products \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-accountmanager-key: foo' \
  --header 'x-api-key: foo' \
  --header 'x-user-email: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/sync_errors/products")

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["content-type"] = 'application/json'
request["x-accountmanager-key"] = 'foo'
request["x-user-email"] = 'MUDAR@SEU_EMAIL.COM'
request["accept"] = 'application/json'
request["x-api-key"] = 'foo'

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

var options = {
  "method": "GET",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/sync_errors/products",
  "headers": {
    "content-type": "application/json",
    "x-accountmanager-key": "foo",
    "x-user-email": "MUDAR@SEU_EMAIL.COM",
    "accept": "application/json",
    "x-api-key": "foo"
  }
};

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 = {
    'content-type': "application/json",
    'x-accountmanager-key': "foo",
    'x-user-email': "MUDAR@SEU_EMAIL.COM",
    'accept': "application/json",
    'x-api-key': "foo"
    }

conn.request("GET", "/sync_errors/products", 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/sync_errors/products",
  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",
    "content-type: application/json",
    "x-accountmanager-key: foo",
    "x-api-key: foo",
    "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/sync_errors/products"

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

	req.Header.Add("content-type", "application/json")
	req.Header.Add("x-accountmanager-key", "foo")
	req.Header.Add("x-user-email", "MUDAR@SEU_EMAIL.COM")
	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "foo")

	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
Content-Type String Required application/json
x-accountmanager-key String Required foo
X-User-Email String Required MUDAR@SEU_EMAIL.COM
Accept String Required application/json
X-Api-Key String Required foo

Listar erro de pedidos

Open in API Explorer
GET sync_errors/orders/

Receber uma lista de erros relacionados a pedidos.

Example Request

Format:
curl --request GET \
  --url https://desenvolvedores.skyhub.com.brsync_errors/orders/ \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-accountmanager-key: foo' \
  --header 'x-api-key: foo' \
  --header 'x-user-email: MUDAR@SEU_EMAIL.COM'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.brsync_errors/orders/")

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["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-user-email"] = 'MUDAR@SEU_EMAIL.COM'
request["x-accountmanager-key"] = 'foo'

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

var options = {
  "method": "GET",
  "hostname": "desenvolvedores.skyhub.com.brsync_errors",
  "port": null,
  "path": "/orders/",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "x-api-key": "foo",
    "x-user-email": "MUDAR@SEU_EMAIL.COM",
    "x-accountmanager-key": "foo"
  }
};

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.brsync_errors")

headers = {
    'accept': "application/json",
    'content-type': "application/json",
    'x-api-key': "foo",
    'x-user-email': "MUDAR@SEU_EMAIL.COM",
    'x-accountmanager-key': "foo"
    }

conn.request("GET", "/orders/", 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.brsync_errors/orders/",
  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",
    "content-type: application/json",
    "x-accountmanager-key: foo",
    "x-api-key: foo",
    "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.brsync_errors/orders/"

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

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-user-email", "MUDAR@SEU_EMAIL.COM")
	req.Header.Add("x-accountmanager-key", "foo")

	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-Api-Key String Required foo
X-User-Email String Required MUDAR@SEU_EMAIL.COM
x-accountmanager-key String Required foo

Ignorar erros de produtos

Open in API Explorer
PATCH /sync_errors/products

Example Request

Format:
curl --request PATCH \
  --url https://desenvolvedores.skyhub.com.br/sync_errors/products \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --data '{"errors":[{"entity_id":"2004111","error_category_code":"b2w_products_production","error_code":"GERAL"}]}'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/sync_errors/products")

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

request = Net::HTTP::Patch.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"errors\":[{\"entity_id\":\"2004111\",\"error_category_code\":\"b2w_products_production\",\"error_code\":\"GERAL\"}]}"

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

var options = {
  "method": "PATCH",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/sync_errors/products",
  "headers": {
    "accept": "application/json",
    "x-api-key": "YOUR API KEY HERE",
    "content-type": "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.write(JSON.stringify({ errors: 
   [ { entity_id: '2004111',
       error_category_code: 'b2w_products_production',
       error_code: 'GERAL' } ] }));
req.end();
import http.client

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

payload = "{\"errors\":[{\"entity_id\":\"2004111\",\"error_category_code\":\"b2w_products_production\",\"error_code\":\"GERAL\"}]}"

headers = {
    'accept': "application/json",
    'x-api-key': "YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("PATCH", "/sync_errors/products", 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/sync_errors/products",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => "{\"errors\":[{\"entity_id\":\"2004111\",\"error_category_code\":\"b2w_products_production\",\"error_code\":\"GERAL\"}]}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json",
    "x-api-key: YOUR API KEY HERE"
  ),
));

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

curl_close($curl);

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

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

func main() {

	url := "https://desenvolvedores.skyhub.com.br/sync_errors/products"

	payload := strings.NewReader("{\"errors\":[{\"entity_id\":\"2004111\",\"error_category_code\":\"b2w_products_production\",\"error_code\":\"GERAL\"}]}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

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

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

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

}

Request Body

Name Type Required Description Example
Request Object Required

Saiba como ignorar os erros: Quando utilizamos o método PATCH, informarmos para a Skyhub que não desejamos ver aquele determinado erro novamente, ou seja, após a correção do problema, você pode informar para que você fez a correção e não deseja ver aquele erro novamente, e ele não voltará a aparecer.

{
  errors: [
Array
    {
    { ... }
Object

Errors

      "entity_id": "2004111",
String
      "error_category_code": "b2w_products_production",
String
      "error_code": "GERAL"
String
    }
  ]
}

Ignorar erros de pedidos

Open in API Explorer
PATCH /sync_errors/orders

Saiba como ignorar os erros: Quando utilizamos o método PATCH, informarmos para a Skyhub que não desejamos ver aquele determinado erro novamente, ou seja, após a correção do problema, você pode informar para que você fez a correção e não deseja ver aquele erro novamente, e ele não voltará a aparecer.

Example Request

Format:
curl --request PATCH \
  --url https://desenvolvedores.skyhub.com.br/sync_errors/orders \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-api-key: YOUR API KEY HERE' \
  --data '{"errors":[{"entity_id":"12295841401","error_category_code":"sync_order_mtkp_to_skyhub","error_code":"itens_not_mapped"}]}'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/sync_errors/orders")

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

request = Net::HTTP::Patch.new(url)
request["accept"] = 'application/json'
request["x-api-key"] = 'YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"errors\":[{\"entity_id\":\"12295841401\",\"error_category_code\":\"sync_order_mtkp_to_skyhub\",\"error_code\":\"itens_not_mapped\"}]}"

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

var options = {
  "method": "PATCH",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/sync_errors/orders",
  "headers": {
    "accept": "application/json",
    "x-api-key": "YOUR API KEY HERE",
    "content-type": "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.write(JSON.stringify({ errors: 
   [ { entity_id: '12295841401',
       error_category_code: 'sync_order_mtkp_to_skyhub',
       error_code: 'itens_not_mapped' } ] }));
req.end();
import http.client

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

payload = "{\"errors\":[{\"entity_id\":\"12295841401\",\"error_category_code\":\"sync_order_mtkp_to_skyhub\",\"error_code\":\"itens_not_mapped\"}]}"

headers = {
    'accept': "application/json",
    'x-api-key': "YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("PATCH", "/sync_errors/orders", 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/sync_errors/orders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => "{\"errors\":[{\"entity_id\":\"12295841401\",\"error_category_code\":\"sync_order_mtkp_to_skyhub\",\"error_code\":\"itens_not_mapped\"}]}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json",
    "x-api-key: YOUR API KEY HERE"
  ),
));

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

curl_close($curl);

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

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

func main() {

	url := "https://desenvolvedores.skyhub.com.br/sync_errors/orders"

	payload := strings.NewReader("{\"errors\":[{\"entity_id\":\"12295841401\",\"error_category_code\":\"sync_order_mtkp_to_skyhub\",\"error_code\":\"itens_not_mapped\"}]}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("x-api-key", "YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

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

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

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

}

Request Body

Name Type Required Description Example
Request Object Required
{
  errors: [
Array
    {
    { ... }
Object

Errors

      "entity_id": "12295841401",
String
      "error_category_code": "sync_order_mtkp_to_skyhub",
String
      "error_code": "itens_not_mapped"
String
    }
  ]
}

Listar produtos por categoria

Open in API Explorer
GET /sync_errors/products?error_category_code={code}

Receber lista de produtos por determinada categoria, entre eles podendo encontrar erros de conexão na Skyhub e erros de produção retornados pela B2W

Example Request

Format:
curl --request GET \
  --url 'https://desenvolvedores.skyhub.com.br/sync_errors/products?X-User-Email=MUDAR%40SEU_EMAIL.COM&error_category_code=%7Bcode%7D' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-accountmanager-key: foo' \
  --header 'x-api-key: foo'
require 'uri'
require 'net/http'

url = URI("https://desenvolvedores.skyhub.com.br/sync_errors/products?X-User-Email=MUDAR%40SEU_EMAIL.COM&error_category_code=%7Bcode%7D")

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["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["x-api-key"] = 'foo'
request["x-accountmanager-key"] = 'foo'

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

var options = {
  "method": "GET",
  "hostname": "desenvolvedores.skyhub.com.br",
  "port": null,
  "path": "/sync_errors/products?X-User-Email=MUDAR%40SEU_EMAIL.COM&error_category_code=%7Bcode%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json",
    "x-api-key": "foo",
    "x-accountmanager-key": "foo"
  }
};

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 = {
    'accept': "application/json",
    'content-type': "application/json",
    'x-api-key': "foo",
    'x-accountmanager-key': "foo"
    }

conn.request("GET", "/sync_errors/products?X-User-Email=MUDAR%40SEU_EMAIL.COM&error_category_code=%7Bcode%7D", 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/sync_errors/products?X-User-Email=MUDAR%40SEU_EMAIL.COM&error_category_code=%7Bcode%7D",
  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",
    "content-type: application/json",
    "x-accountmanager-key: foo",
    "x-api-key: foo"
  ),
));

$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/sync_errors/products?X-User-Email=MUDAR%40SEU_EMAIL.COM&error_category_code=%7Bcode%7D"

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

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "application/json")
	req.Header.Add("x-api-key", "foo")
	req.Header.Add("x-accountmanager-key", "foo")

	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-Api-Key String Required foo
x-accountmanager-key String Required foo

Query Parameters

Name Type Required Description Example
X-User-Email String Required MUDAR%40SEU_EMAIL.COM