Swagger API and FWH
Posted: Tue Sep 22, 2020 10:39 pm
I'm using a shopcart system (shoptrader) for my online store. I'm not able to change all data by the import functions provided and changing some functions by Shoptrader will cost extra. Not a very big problem but we have FWH !!!
and so maybe I can do stuff with FWH and Swagger API that seems to be provided by Shoptrader.
Before I spend time in looking what Swagger can do for me, I have some starters questions :
I have a API code to connect, but I don't know whitch databases I can connect to...
I was abble to connect AND retrieve some data from the linkbar in Google. This was the result from the product database:
[{"uprid":"730","productId":730,"stockId":-1,"referenceId":0,"isBundle":0,"bundledProducts":[],"status":1,"quantity":"0","ean":"","sku":"","model":"KLEUR_P","hsCode":null,"name":"","price":"0.0000","taxClassId":"4","taxRate":"0.0000","isPhysical":"1","isDigital":"0","isQuotation":"0","url":"artikelen-zonder-categorie\/5f68953c837de","urlAbs":"https:\/\/www.maveco-webshop.be\/artikelen-zonder-categorie\/5f68953c837de","attributesString":"","backOrder":0,"onHome":0,"layover":1,"configurationAllowCheckout":1,"configurationStockCheck":0,"attributes":[],"description":"","addonInstagramEnabled":"0","addonInstagram":"0","addonOcsEnabled":"0","dropship":"0","dateAdded":"2020-09-21 13:57:43","lastModified":"2020-09-21 13:57:43","descriptions":{"description":"","extra":"","intro":""},"images":["","","","","","","","","","","",""],"image_alt":["","","","","","","","","","","",""],"discounts":{"name":"0","groupDiscount":"0.00","groupDiscountCategory":"0.00","groupDiscountProduct":"0.00"},"category":{"id":"888888","name":"Artikelen zonder categorie","categoryIds":"888888","cPath":"888888"},"quantities":{"quantity":"0","physicalQuantity":"0","minimumQuantity":"0","externalQuantity":"0","quantityStep":"1","trackQuantity":"1"},"prices":{"basePrice":"0.0000","normalPrice":"0.0000","price":"0.0000","specialPrice":"0.0000","purchasePrice":"0.0000"},"manufacturer":{"id":0,"name":"","image":""},"dimensions":{"type":"0","width":"0.00","height":"0.00","area":"0.00","weight":"0.00"},"reviews":{"count":0,"avg":0},"addons":{"multicatalog":{"enabled":0},"layover":{"enabled":1}}}]
I was not able at this time to change any values in the database (the API code is write and read anabled, but I think I can get this to work next days...
My questions :
Is there some FWH code that is working in retrieving this kind information ?
There are 2 lines of code in the online Swagger software tool :
cUrl :
curl -X PATCH "http://swagger.shoptrader.com/api/v2/cu ... 0850a54624" -H "accept: application/json" -H "token: c5ce13c97e79b8d54ca40e75ea43c41282cb25e469c4babb8ad4400850a54624" -H "Content-Type: application/json" -d "{\"firstName\":\"Marco\"}"
and
Request Url :
http://swagger.shoptrader.com/api/v2/cu ... 0850a54624
What can I do with the cUrl code ?
The Request Url will give info when copied into a link bar in Chrome.
and so maybe I can do stuff with FWH and Swagger API that seems to be provided by Shoptrader.
Before I spend time in looking what Swagger can do for me, I have some starters questions :
I have a API code to connect, but I don't know whitch databases I can connect to...
I was abble to connect AND retrieve some data from the linkbar in Google. This was the result from the product database:
[{"uprid":"730","productId":730,"stockId":-1,"referenceId":0,"isBundle":0,"bundledProducts":[],"status":1,"quantity":"0","ean":"","sku":"","model":"KLEUR_P","hsCode":null,"name":"","price":"0.0000","taxClassId":"4","taxRate":"0.0000","isPhysical":"1","isDigital":"0","isQuotation":"0","url":"artikelen-zonder-categorie\/5f68953c837de","urlAbs":"https:\/\/www.maveco-webshop.be\/artikelen-zonder-categorie\/5f68953c837de","attributesString":"","backOrder":0,"onHome":0,"layover":1,"configurationAllowCheckout":1,"configurationStockCheck":0,"attributes":[],"description":"","addonInstagramEnabled":"0","addonInstagram":"0","addonOcsEnabled":"0","dropship":"0","dateAdded":"2020-09-21 13:57:43","lastModified":"2020-09-21 13:57:43","descriptions":{"description":"","extra":"","intro":""},"images":["","","","","","","","","","","",""],"image_alt":["","","","","","","","","","","",""],"discounts":{"name":"0","groupDiscount":"0.00","groupDiscountCategory":"0.00","groupDiscountProduct":"0.00"},"category":{"id":"888888","name":"Artikelen zonder categorie","categoryIds":"888888","cPath":"888888"},"quantities":{"quantity":"0","physicalQuantity":"0","minimumQuantity":"0","externalQuantity":"0","quantityStep":"1","trackQuantity":"1"},"prices":{"basePrice":"0.0000","normalPrice":"0.0000","price":"0.0000","specialPrice":"0.0000","purchasePrice":"0.0000"},"manufacturer":{"id":0,"name":"","image":""},"dimensions":{"type":"0","width":"0.00","height":"0.00","area":"0.00","weight":"0.00"},"reviews":{"count":0,"avg":0},"addons":{"multicatalog":{"enabled":0},"layover":{"enabled":1}}}]
I was not able at this time to change any values in the database (the API code is write and read anabled, but I think I can get this to work next days...
My questions :
Is there some FWH code that is working in retrieving this kind information ?
There are 2 lines of code in the online Swagger software tool :
cUrl :
curl -X PATCH "http://swagger.shoptrader.com/api/v2/cu ... 0850a54624" -H "accept: application/json" -H "token: c5ce13c97e79b8d54ca40e75ea43c41282cb25e469c4babb8ad4400850a54624" -H "Content-Type: application/json" -d "{\"firstName\":\"Marco\"}"
and
Request Url :
http://swagger.shoptrader.com/api/v2/cu ... 0850a54624
What can I do with the cUrl code ?
The Request Url will give info when copied into a link bar in Chrome.