API
Docs and API's for Weasy.io
Catalog
Manage all the product catalog available in your website.Accepts GET POST PUT DELETE
All requests to the API must be authenticated with an API key on the HTTP Authorization header.
GET
Manage all the product catalog available in your websiteRequest example
~ curl -i -X GET \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/catalog
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/catalog
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| limit | integer | optional | define items per page |
| page | integer | optional | define page to display |
POST
Add a product to your catalogRequest example
~ curl -i -X POST \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[{"sku":"MYSKU","status":1,"highlight":1,"new":1,"showprice":1,"stock":1,"weight":0.4,"type":"simples","mode":"imediata","allow_extra_stock":1,"permissions":1,"id_brand":12,"allow_cart_upload":1,"unit_type":"peso","default_tax":0,"family":[1,2],"i18n":{"pt":{"title":"o meu produto teste","description":"a minha descricao grande","small_description":"a minha descricao pequena","barcode":"EAN-BARCODE-PT","digital_file":"pt.html","seo_title":"o meu produto teste","seo_description":"descricao meta","seo_metatags":"metatag meta","seo_url":"omeuproduto_slug"},"en":{"title":"my test product","description":"this is my big description","small_description":"this is my small description","barcode":"EAN-BARCODE-EN","digital_file":"en.html","seo_title":"my test product","seo_description":"description","seo_metatags":"this is my metatag","seo_url":"myprod_slug"}},"prices":{"1":{"normal_price":8,"discount_price":1,"start_discount_price":"2018-11-23","end_discount_price":"2020-11-23"},"2":[{"from":1,"to":8,"price":10},{"from":9,"to":20,"price":8}]},"images":[{"image":"https:\/\/cdn.weasy.io\/users\/hsgear\/catalog\/IMG_2700.JPG","order":1,"width":1920,"height":900,"i18n":{"pt":"descricao imagem","en":"imagem description"}}],"attachments":[{"file":"https:\/\/cdn.weasy.io\/users\/customer_folder\/catalog\/a.pdf","order":1,"i18n":{"pt":"descricao attach","en":"attach description"}}],"specs":[{"pt":{"title":"spec 1 pt","description":"spec 1 descritpion"}},{"pt":{"title":"spec 2 pt","description":"spec 2 descritpion"}}]}]'\
https://api.weasy.io/v1/catalog
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[{"sku":"MYSKU","status":1,"highlight":1,"new":1,"showprice":1,"stock":1,"weight":0.4,"type":"simples","mode":"imediata","allow_extra_stock":1,"permissions":1,"id_brand":12,"allow_cart_upload":1,"unit_type":"peso","default_tax":0,"family":[1,2],"i18n":{"pt":{"title":"o meu produto teste","description":"a minha descricao grande","small_description":"a minha descricao pequena","barcode":"EAN-BARCODE-PT","digital_file":"pt.html","seo_title":"o meu produto teste","seo_description":"descricao meta","seo_metatags":"metatag meta","seo_url":"omeuproduto_slug"},"en":{"title":"my test product","description":"this is my big description","small_description":"this is my small description","barcode":"EAN-BARCODE-EN","digital_file":"en.html","seo_title":"my test product","seo_description":"description","seo_metatags":"this is my metatag","seo_url":"myprod_slug"}},"prices":{"1":{"normal_price":8,"discount_price":1,"start_discount_price":"2018-11-23","end_discount_price":"2020-11-23"},"2":[{"from":1,"to":8,"price":10},{"from":9,"to":20,"price":8}]},"images":[{"image":"https:\/\/cdn.weasy.io\/users\/hsgear\/catalog\/IMG_2700.JPG","order":1,"width":1920,"height":900,"i18n":{"pt":"descricao imagem","en":"imagem description"}}],"attachments":[{"file":"https:\/\/cdn.weasy.io\/users\/customer_folder\/catalog\/a.pdf","order":1,"i18n":{"pt":"descricao attach","en":"attach description"}}],"specs":[{"pt":{"title":"spec 1 pt","description":"spec 1 descritpion"}},{"pt":{"title":"spec 2 pt","description":"spec 2 descritpion"}}]}]'\
https://api.weasy.io/v1/catalog
Body response example [ HTTP CODE: 200 ]
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sku | string | required | product sku | ||||||||||||||||||||||||||||||||||||||||
| status | integer | required | status of the product options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| highlight | integer | optional | highlight of the product options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| new | integer | optional | mark product as new options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| showprice | integer | optional | show product prices on website options: 0 for inactive, 1 for active Default is 1 |
||||||||||||||||||||||||||||||||||||||||
| weight | float | required | product weight in grames | ||||||||||||||||||||||||||||||||||||||||
| mode | string | optional | product sale mode options: imediata to be bought encomenda for order only brevemente soon available invisivel only visible by link share precosobconsulta price upon request descontinuado descontinued product |
||||||||||||||||||||||||||||||||||||||||
| type | string | optional | product type options: simples simple product pack product pack (soon available) digital for digital products |
||||||||||||||||||||||||||||||||||||||||
| permissions | integer | optional | permissions to view this product options: 0 for registered users, 1 for all users Default is 1 |
||||||||||||||||||||||||||||||||||||||||
| allow_extra_stock | integer | optional | allows selling without stock options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| allow_cart_upload | integer | optional | allows upload files to cart options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| id_brand | integer | optional | brand id Brand id's can be obtained throught the brands endpoint |
||||||||||||||||||||||||||||||||||||||||
| unit_type | string | optional | unit type options: peso for weight unit (ex: 1.5kg), >unidade for unit (ex: 3), >medida for measeures (ex: 1l). Default is unidade |
||||||||||||||||||||||||||||||||||||||||
| default_tax | integer | optional | default product tax id Product tax id's can be obtained throught the Taxes endpoint |
||||||||||||||||||||||||||||||||||||||||
| cartQtdMin | integer | optional | default product minimum quantity to buy | ||||||||||||||||||||||||||||||||||||||||
| family | array of integers | required | product family ids Product family id's can be obtained throught the Product categories endpoint |
||||||||||||||||||||||||||||||||||||||||
| i18n | array of objects | required |
An array containing an object.
The key if the language. Ex: array("pt"=>array("title"=>"",...) , "en"=>array("title"=>"",...)) The key can be obtained in the Languages endpoint.
|
||||||||||||||||||||||||||||||||||||||||
| variants | array of objects | required |
An array containing an object of product variants
All fields are mandatory. If you dont have values just pass 0 for numbers or "" for strings
|
||||||||||||||||||||||||||||||||||||||||
| prices | array of objects | required |
An array containing an object.
The key if the price table id. Example: { "prices": { "1": { "normal_price": 10, "discount_price":4.5, "start_discount_price":"2021-05-23", "end_discount_price":"2021-05-26" }, "2": [{"from":1,"to":8,"price":10},{"from":9,"to":999999,"price":9}] } }
if a price table is based in quantities you should pass and array of intervals as the example bellow: "2" => array( array("from" => 1,"to"=>8,"price"=>10), array("from" => 9,"to"=>20,"price"=>8), ... ) |
||||||||||||||||||||||||||||||||||||||||
| images | array of objects | optional |
An array containing an object.
|
||||||||||||||||||||||||||||||||||||||||
| attachments | array of objects | optional |
An array containing an object.
|
||||||||||||||||||||||||||||||||||||||||
| specs | array of objects | optional |
An array containing an object.
|
PUT
Change a product from your catalog.Request example
~ curl -i -X PUT \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"status":0}'\
https://api.weasy.io/v1/catalog/1
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"status":0}'\
https://api.weasy.io/v1/catalog/1
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| id | integer | required | product id |
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sku | string | optional | product sku | ||||||||||||||||||||||||||||||||||||||||
| status | integer | optional | status of the product options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| highlight | integer | optional | highlight of the product options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| new | integer | optional | mark product as new options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| showprice | integer | optional | show product prices on website options: 0 for inactive, 1 for active Default is 1 |
||||||||||||||||||||||||||||||||||||||||
| weight | float | optional | product weight in grames | ||||||||||||||||||||||||||||||||||||||||
| mode | string | optional | product sale mode options: imediata to be bought encomenda for order only brevemente soon available invisivel only visible by link share precosobconsulta price upon request descontinuado descontinued product |
||||||||||||||||||||||||||||||||||||||||
| type | string | optional | product type options: simples simple product pack product pack (soon available) digital for digital products |
||||||||||||||||||||||||||||||||||||||||
| permissions | integer | optional | permissions to view this product options: 0 for registered users, 1 for all users Default is 1 |
||||||||||||||||||||||||||||||||||||||||
| allow_extra_stock | integer | optional | allows selling without stock options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| allow_cart_upload | integer | optional | allows upload files to cart options: 0 for inactive, 1 for active |
||||||||||||||||||||||||||||||||||||||||
| id_brand | integer | optional | brand id Brand id's can be obtained throught the brands endpoint |
||||||||||||||||||||||||||||||||||||||||
| unit_type | string | optional | unit type options: peso for weight unit (ex: 1.5kg), >unidade for unit (ex: 3), >medida for measeures (ex: 1l). Default is unidade |
||||||||||||||||||||||||||||||||||||||||
| default_tax | integer | optional | default product tax id Product tax id's can be obtained throught the Taxes endpoint |
||||||||||||||||||||||||||||||||||||||||
| cartQtdMin | integer | optional | default product minimum quantity to buy | ||||||||||||||||||||||||||||||||||||||||
| i18n | array of objects | optional |
An array containing an object.
The key if the language. Ex: array("pt"=>array("title"=>"",...) , "en"=>array("title"=>"",...)) The key can be obtained in the Languages endpoint.
|
||||||||||||||||||||||||||||||||||||||||
| prices | array of objects | optional |
An array containing an object.
The key if the price table id. Example: { "prices": { "1": { "normal_price": 10, "discount_price":4.5, "start_discount_price":"2021-05-23", "end_discount_price":"2021-05-26" }, "2": [{"from":1,"to":8,"price":10},{"from":9,"to":999999,"price":9}] } } The key can be obtained in the Prices endpoint.
if a price table is based in quantities you should pass and array of intervals as the example bellow: "2" => array( array("from" => 1,"to"=>8,"price"=>10), array("from" => 9,"to"=>20,"price"=>8), ... ) |
||||||||||||||||||||||||||||||||||||||||
| variants | array of objects | required |
An array containing an object of product variants
All fields are mandatory. If you dont have values just pass 0 for numbers or "" for strings
|
DELETE
Delete a product or collection of produtos from your catalog.Request example
~ curl -i -X DELETE \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/catalog
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/catalog
Body response example [ HTTP CODE: 200 ]
Body attributes
| Attribute description |
|---|
| A json payload containing an array of id or ids. Use GET for collect all the ids. |