Product Integration

Do you know what e-commerce product is?

We have two lines of reasoning:

SKU is the unit of stock sold, the acronym stands for Stock Keeping Unit

Simples Product

The simple product is unique, has no SKU variation. Example: Book, CD, DVD ...

Important: Even a simple product, needs attributes and characteristics that strengthen the identity of the product itself. Example: Jazz CD

Attributes can be used for filters in your categories.

Configurable Product

A configurable (variable) product has two or more variations (eg color and size or color and voltage) that differentiate it from a corresponding product.

Examples:

Product: 300 Liter refrigerator; Variation 1: 300 liter refrigerator - 110 volts Variation 2: 300 liter refrigerator - 220 volts

In the example above, each of the refrigerators has a different ID_SKU and are linked to a Product (Parent Product) code.

Product Structure

Next, we'll show the structure of a product according to the standard Skyhub Json format.

Best practices for product registration

Following a convention (standard) in the product registration is a very important practice. We then list some of the best practices to help you become even more successful in the Marketplace.

  • Use a standard for the composition of SKU codes, but never repeat a code, either for simple product or configurable product (variable) one;

  • Make sure that the product code does not have any white space. This usually from the direct copy of the Excel file cell;

  • The products must need to be shipped with the weight in kilograms (kg) and the dimensions in centimeters (cm)

  • You'll find much more in our "Best Practices Guide to Product Registration"

A little bit of "practice"

To perform any type of request, you must always fill in the Header, with the information generated by us from Skyhub, considering the model below:

X-User-Email: email@domain.com.br
x-Api-Key: XXXXXXXXX
x-accountmanager-key: XXXXXXXXXX
Accept: application/json;charset=UTF-8
Content-Type: application/json

POST

To register a product via API, you must use the POST method directing your request to our endpoint https://api.skyhub.com.br

Below is an example that includes a variation of COD_SKU_VARIACAO code:

{
  "product": {
    "sku": "SKU_CODE",
    "name": "PRODUCT_TITLE",
    "description": "PRODUCT_DESCRIPTION",
    "status": "enabled",
    "price": 30.00,
    "promotional_price": 29.90,
    "cost": 0.0,
    "weight": 0.100,
    "height": 20,
    "width": 30,
    "length": 20,
    "brand": "BRAND",
    "nbm": "98769898",
    "categories": [
      {
        "code": "01",
        "name": "SKYHUB HOMOLOGATION"
      }
    ],
    "images": [
      "http://d26lpennugtm8s.cloudfront.net/stores/154/284/products/camiseta-lisa-verde-bandeira-algodo-p-ao-gg-pronta-entrega-355901-mlb20431777049_092015-o-07fadec89e5ed54705c1b9ab5411dec8-1024-1024.jpg"
    ],
    "specifications": [
      {
        "key": "Parent Variation Specifications",
        "value": "Parent Product Specifications"
      }
    ],
    "variations": [
      {
        "sku": "COD_SKU_VARIACAO",
        "qty": 10,
        "ean": "9876543210987",
        "images": [
          "http://d26lpennugtm8s.cloudfront.net/stores/154/284/products/camiseta-lisa-verde-bandeira-algodo-p-ao-gg-pronta-entrega-355901-mlb20431777049_092015-o-07fadec89e5ed54705c1b9ab5411dec8-1024-1024.jpg"
        ],
        "specifications": [
          {
            "key": "Color",
            "value": "Green"
          },
          {
            "key": "Size",
            "value": "XL"
          }
        ]
      }
    ],
    "variation_attributes": [
      "Color",
      "Size"
    ]
  }
}

If you want to register a simple product (without variation), you can use the template below where we remove the Variations array.

{
  "product": {
    "sku": "200",
    "name": "SIMPLE PRODUCT",
    "description": "SIMPLE PRODUCT",
    "status": "enable",
    "qty": 0,
    "price": 100,
    "promotional_price": 89.99,
    "cost": 49.00,
    "weight": 3,
    "height": 1,
    "width": 1,
    "length": 1,
    "brand": "SKYHUB",
    "ean": "",
    "nbm": "",
    "categories": [
      {
        "code": "01",
        "name": "skyhub homologation"
      }
    ],
    "images": [
      ""
    ],
    "specifications": [
      {
        "key": "Size",
        "value": "XL"
      }
    ]
  }
}

GET

To perform a query in the API we must use the GET method, filling in the Header as previously shown and keeping the request as below:

https://api.skyhub.com.br/products/SKU_code

The "SKU_code" is the product code you wish to consult

Result
{
  "sku": "CODIGO_SKU",
  "name": "DESCRICAO PRODUTO",
  "description": "CRIAR"
}

In our example, we list a "summary" result because the complete return would bring several pages, with all the attributes that compose the product, but basically the response of our GET brought the product registration itself.

PUT

The way to update information is through the PUT method, keeping our Header and conserving the attribute in which you want to update.

To perform the update, we must maintain the endpoint:

https://api.skyhub.com.br/products/CODIGO_SKU

In this example, we are only changing the name of the product, so all other attributes have been removed from the request, to facilitate understanding.

{
  "product": {
    "name": "NOME DO PRODUTO ALTERADO!"
  }
}

Note: You can also keep all the attributes of your request and change the values from which you want to perform an update.

DELETE

To delete a item, you must use the DELETE method, keeping the Header already indicated, the request is equal to a GET, but the product will be deleted.

https://api.skyhub.com.br/products/CODIGO_SKU

Important: Before deleting any item from Skyhub, it is extremely important to verify if the product is connected to a Marketplace. Remember: You must disconnect and/or remove association of the SKU from all marketplaces, otherwise you won't be able to delete the product from Skyhub.

Last updated