Queues - Order Integration Queue

To ensure the integrity and consistency of our API, we have developed the Queues (Order Integration Queue) where you get the orders and their updates.

Just make a request to the endpoint:

http://api.skyhub.com.br/queues/orders

We offer the requests in the queues at the following status:

Code: book_product
Label: Pagamento Pendente (SkyHub)
Type: NEW

Code: order_canceled
Label: Cancelado (SkyHub)
Type: CANCELED

Code: payment_received
Label: Aprovado (SkyHub)
Type: APPROVED

We also also provide the below statuses only to merchants using the "B2W Entrega" or "B2W Entrega Direct" shipping method.

Code: order_shipped
Label: Pedido Enviado (SkyHub)
Type: SHIPPED

Code: Complete
Label: Completo (entregue) (SkyHub)
Type: DELIVERED
  • Code: Field that receives the request status code in the API.

  • Label: Field that receives the name of the request status in the API.

Consuming order information

To consume queues, your application must perform a GET at the following endpoint:

https://api.skyhub.com.br/queues/orders

The queues query will return only one order at a time. After consumption it is necessary to delete the request, and so on until there is no further information to retrieve.

Best Practices

Why you need to delete the order?

Your application needs to delete the order that was consumed within 5 minutes, otherwise the order will be queued for consumption again.

Request the same order over and over again isn't what we want ! For this reason it is necessary to delete the queues order, so Skyhub understands that the integration was able to save the order in your platform / ERP.

How to delete an order from queues?

To delete the queues, your aplication must perform a DELETE at the following endpoint:

https://api.skyhub.com.br/queues/orders/{code} 

Checking whether the request has been consumed

You also can check if the consumption of the orders occurred in the Skyhub platform painel. That information is visible to the merchand and also via API.

Via Skyhub Painel

Via API

https://api.skyhub.com.br/orders/{code}

The sync_status field tells you whether the request was consumed or not.

Why do you need to consume all the information?

It is mandatory to consume all the orders avaiable at Queues with status NEW, so that the products are committed in their stocks.

In order for the stock of products awaiting payment to be reserved, so when the payment is confirmed you are not out of stock.

Vale Lembrar:

  • Platforms that do not conform to this business rule may bear the merchant's prejudice.

  • For Skyhub, only the available stock should be shipped.

Last updated