# How to homologate my integration with SkyHub?

## Which of the categories do I fit the best?

In order to start the homologation process, we must know in which category you fit:

### I am a store/seller that will develop my own integration or platform / ERP

If it is a store, please request the homologation through the link: <https://ajuda.skyhub.com.br/hc/pt-br/requests/new>

{% hint style="info" %}
Use the following category: "homologação" > "solicitar homologação"
{% endhint %}

### I am a platform/ERP company

*Please contact the Partner Hub at: <hub.de.lojas.marketplace@b2winc.onmicrosoft.com>*

The B2W Partnership Team will request the creation of your test account and after that SkyHub Homologation Team will contact you with data access for you start the development.

See a [video summary](https://vimeo.com/221486157) (in portuguese) of the approval process (just 3 minutes)

![https://vimeo.com/221486157](https://2606423342-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWLii0XmQdjJQQG6m8e%2F-LWWedUTu_ST060kiXpg%2F-LWX7AVg4LCho405hGFd%2Fimage.png?alt=media\&token=10795edb-e6f5-426c-9a97-e3e7920156d1)

## Prerequisites

It is essential that you homologue integration altogether.

### Products

1. Create
2. Update
3. Delete

{% hint style="warning" %}
**Note:** All products must contain photo and category.
{% endhint %}

### Orders

1. Create
2. Update
3. Delete

{% hint style="warning" %}
**Note:** Skyhub does not have stockpile functionality. It is of the utmost importance that you develop a stockpile solution on your side.
{% endhint %}

{% hint style="danger" %}
During the approval process you will need to create orders in the SkyHub API, for this you can use rest tools such as: DHC, Postman etc.
{% endhint %}

## What methods are used to carry out the type approval?

| Method   | Description |
| -------- | ----------- |
| `POST`   | Create      |
| `PUT`    | Update      |
| `GET`    | Search      |
| `DELETE` | Delete      |

## What will we are going to validate?

Note: It is essential that you send us a product that corresponds to each one of the different requests.

### Products

1. Create product with more than one variation
2. Create product with more than one variation and with price variation in sku.
3. Create variation product containing **size** attribute
4. Create variable product containing the **color** attribute
5. Create product with variations containing the attributes **color** and **size**
6. Create product with variation containing the attribute **voltage**
7. Create product with category (**category + subcategory**)
8. Update the inventory of product (**submit values before and after the update**)
9. Update product price (**submit values before and after the update**)
10. Change product status to '**enabled**'
11. Change product status to '**disabled**'
12. Delete a product

{% content-ref url="product-integration" %}
[product-integration](https://skyhub-english.gitbook.io/skyhub-api-english/skyhub-api-guides/product-integration)
{% endcontent-ref %}

### Orders

1. Create an order that contains a single unit of a simple product
2. Create an order that contains several units of the same simple product
3. Create an Order that contains a single unit of a variable product
4. Create an order that contains several units of the same variable product
5. Update order status for **approved**
6. Update Order Status to **Shipped** with NFE Trace Code and Key
7. Update Order Status for **Delivered** with NFE Trace Code and Key
8. Update order status to **canceled**
9. Update the order status for **delivery exception**
10. Consume all requests by the queue of integration (/ queues). Important to accomplish a `GET` to consume the request and a `DELETE` to remove it from the queue.

{% content-ref url="order-integration" %}
[order-integration](https://skyhub-english.gitbook.io/skyhub-api-english/skyhub-api-guides/order-integration)
{% endcontent-ref %}

### Get Shipping Label

Currently B2W and Mercado Livre Marketplaces has theirs own freight service, "B2W Entrega" and "Mercado Envios 2" respectively. Both services offer an endpoint that allows the generation of freight labels.

[Check in our api explorer](http://api-docs.skyhub.com.br/#/orders/getOrderShipmentLabel)

{% content-ref url="servico-de-etiqueta-de-frete" %}
[servico-de-etiqueta-de-frete](https://skyhub-english.gitbook.io/skyhub-api-english/skyhub-api-guides/servico-de-etiqueta-de-frete)
{% endcontent-ref %}

### Error Catalog

We provide an endpoint to access integration errors on SkyHub platform, to learn more about this feature, go to the Error Catalog <<<< {INSERIR LINK COM O ENDPOINT DO SWAGGER QUE TRATA DO CATALOGO DE ERROS}

## Best Practices

The issues below are related to the integration validaton:

1. The product size information are required. Which actions are taken to ensure that the data is always sent correctly?
2. Products must be sent with their weight in kilograms (kg) and dimensions in centimeters (cm). Which actions are taken to ensure that the data is always sent correctly?
3. What are the actions taken when errors occur in the update of an order?
4. Is there a way to remove this product or request from the integration stream to avoid a greater number of errors? If so, which one?
5. Knowing that our API has a limit of 500 requests per minute, what are the actions taken so that the application does not exceed this limit? ***Note: On receipt of return 429 in the API it will be necessary to wait until the next minute to make a new request.***
6. It is mandatory to consume all pending orders from the integration queue (Queues), in order to avoid selling products without stock.

### Why is it mandatory?

**To avoid having divergence between available and committed stock.**

If you do not consume the pending orders what can happen? You may sell a product without stock, since stock reserve does not exist on the SkyHub platform, we always consider the information sent by you as available stock, consequently we will make it available in the Marketplace.&#x20;

{% hint style="info" %}
**Must Remember:**

* Platforms / ERPs that do not conform to this rule will have to bear the seller's loss, since they hold the information.
* For Skyhub, only the available stock should be shipped.
  {% endhint %}

## In case of doubt, what to do?

You must contact SkuHub API Team via <api@skyhub.com.br> e-mail with the following subject:

`Doubt - How to do (enter question here) of the homologation - (Store or Plataform/ERP Name)`

Do not forget to describe your question in the e-mail.

{% hint style="success" %}
**How SkyHub API Team Can Help:**

* We support the inquiries related to requests made at Json.
  {% endhint %}

{% hint style="danger" %}
When SkyHub API Cant Help:

* We do not support programming code questions
* We do not generate requests for API integrationIf you have completed the development
  {% endhint %}

Please kindly request the validation through <api@skyhub.com.br> with the following title:

`API Homologation – “Name of the Store or Plataform/ERP”`

Attach the [homologation worksheet](https://docs.google.com/spreadsheets/d/1-q9yjzNVxK2Dg7ITKm7LLhVHU3ym9om5wahVrjDY194/edit#gid=914591712) filled in with the Sku's of the items and order numbers used in the requisitions.
