Product API

Termékekkel kapcsolatos API funkciók

Termékek lekérdezése

A táblázatban megadott szűrési feltételek ÉS kapcsolatban állnak egymással, csak azokat a szűrőket kell megadni, amelyekre szűrni szeretnénk.

XML esetén:

Url: https://app.webshippy.com/wspyapi/GetProduct/xml

Kérés:

<?xml version="1.0" encoding="utf-8"?>
<request>  
  <apiKey>api-key-comes-here</apiKey>  
  <page>0</page>  
  <limit>10</limit>  
  <filters>    
    <wspyId></wspyId>    
    <referenceId></referenceId>    
    <productName></productName>    
    <sku></sku>    
    <barcode></barcode>    
    <lastMod>2018-01-01 00:00:00</lastMod>  
  </filters>
</request>

Válasz (példa):

<?xml version="1.0" encoding="utf-8"?>
<response>  
  <status>success</status>  
  <message/>  
  <result>    
    <elem>      
      <wspyId>74210</wspyId>      
      <referenceId>1231</referenceId>      
      <sku>szuperhos-polo-piros-xl</sku>      
      <barcode>126510305031</barcode>      
      <productName>Szuperhős Póló</productName>      
      <variantName>Piros, XL</variantName>   
      <hasSerial>no</hasSerial>      
      <dutiable>yes</dutiable>      
      <taricCode>12345</taricCode>      
      <lowStock>5</lowStock>     
      <price>1200.00</price>      
      <vat>0.27</vat>      
      <currency>HUF</currency>      
      <isAdr>yes</isAdr>      
      <adrCode>4</adrCode>      
      <adrQuantity>2</adrQuantity>      
      <coolingDemand>none</coolingDemand>      
      <isFragile>no</isFragile>      
      <category>Divat és ruházat</category>      
      <subCategory>Gyermek divat</subCategory>      
      <subSubCategory>Overál</subSubCategory>      
      <keepQuantity>5</keepQuantity>      
      <dropshippyWholesalePrice>1000.00</dropshippyWholesalePrice>      
      <dropshippyWholesaleVat>0.27</dropshippyWholesaleVat>      
      <dropshippyRecommendedPrice>1200.00</dropshippyRecommendedPrice>      
      <dropshippyPromotion>no</dropshippyPromotion>      
      <productDescription>Szuperhős Póló leírás</productDescription>    
      <type>product</type>      
      <productType>clothes</productType>		
      <imageUrls>https://micoedward.com/wp-content/uploads/2018/04/Love-your-product.png;https://www.noto.design/wp-content/uploads/18-06-14_Heritage_Render_Header-1-1100x619.jpg</imageUrls>      
      <quantity>191</quantity>      
      <available_quantity>189</available_quantity>      
      <reserved_by_orders>2</reserved_by_orders>      
      <updatedAt>2018-03-12 11:59:35</updatedAt>    
    </elem>    
    <elem>      
      <wspyId>74211</wspyId>      
      <referenceId>1232</referenceId>      
      <sku>cicanaci-one-size</sku>      
      <barcode>126510305032</barcode>      
      <productName>CicaNaci - One Size</productName>      
      <variantName/>  <hasSerial>no</hasSerial>      
      <dutiable>yes</dutiable>      
      <taricCode>12345</taricCode>      
      <lowStock>5</lowStock>      
      <price>1200.00</price>      
      <vat>0.27</vat>      
      <currency>HUF</currency>      
      <isAdr>yes</isAdr>      
      <adrCode>4</adrCode>      
      <adrQuantity>2</adrQuantity>      
      <coolingDemand>none</coolingDemand>      
      <isFragile>no</isFragile>      
      <category>Divat és ruházat</category>      
      <subCategory>Gyermek divat</subCategory>      
      <keepQuantity>5</keepQuantity>      
      <dropshippyWholesalePrice>1000.00</dropshippyWholesalePrice>      
      <dropshippyWholesaleVat>0.27</dropshippyWholesaleVat>      
      <dropshippyRecommendedPrice>1200.00</dropshippyRecommendedPrice>      
      <dropshippyPromotion>no</dropshippyPromotion>      
      <productDescription>CicaNaci - One Size</productDescription>    
      <type>product</type>      
      <productType>clothes</productType>		
      <imageUrls/>      
      <quantity>197</quantity>      
      <available_quantity>196</available_quantity>      
      <reserved_by_orders>1</reserved_by_orders>      
      <updatedAt>2018-03-12 11:59:32</updatedAt>    
    </elem>    
    <elem>      
      [ ... ]    
    </elem>    
    [ ... ]  
  </result>
</response>

Hibás kérés esetén (példa):

<?xml version="1.0" encoding="utf-8"?>
<response>  
  <status>error</status>  
  <message>    
    <elem>[field: lastMod]The field must be a valid datetime (eg. yyyy-mm-dd hh:ii:ss)</elem>  
  </message>
</response>

JSON esetén:

Url: https://app.webshippy.com/wspyapi/GetProduct/json

Kérés:

{
  "apiKey": "api-key-comes-here",
  "page": "0",
  "limit": "10",
  "filters": {
    "wspyId": "",
    "referenceId": "",
    "productName": "",
    "sku": "",
    "barcode": "",
    "lastMod": "2018-01-01 00:00:00",
    "getAllProduct": true
  }
}

Válasz (példa):

{
  "status": "success",
  "message": [],
  "result": [
    {
      "wspyId": "74210",
      "referenceId": "1231",
      "sku": "szuperhos-polo-piros-xl",
      "barcode": "126510305031",
      "productName": "Szuperhős Póló",
      "variantName": "Piros, XL",
      "hasSerial": "no",
      "dutiable": "yes",
      "taricCode": "12345",
      "lowStock": "5",
      "price": "1200.00",
      "vat": "0.27",
      "currency": "HUF",
      "isAdr": "yes",
      "adrCode": "4",
      "adrQuantity": "2",
      "coolingDemand": "none",
      "isFragile": "no",
      "category": "Divat és ruházat",
      "subCategory": "Gyermek divat",
      "keepQuantity": "5",
      "dropshippyWholesalePrice": "1000.00",
      "dropshippyWholesaleVat": "0.27",
      "dropshippyRecommendedPrice": "1200.00",
      "dropshippyPromotion": "no",
      "productDescription": "Szuperhős Póló leírás",
      "type": "product",
      "productType": "clothes",
      "imageUrls": "https://micoedward.com/wp-content/uploads/2018/04/Love-your-product.png;https://www.noto.design/wp-content/uploads/18-06-14_Heritage_Render_Header-1-1100x619.jpg",
      "quantity": "191",
      "available_quantity": "189",
      "reserved_by_orders": "2",
      "updatedAt": "2018-03-12 11:59:35"
    },
    {
      "wspyId": "74211",
      "referenceId": "1232",
      "sku": "cicanaci-one-size",
      "barcode": "126510305032",
      "productName": "CicaNaci - One Size",
      "variantName": "",
      "hasSerial": "no",
      "dutiable": "yes",
      "taricCode": "12345",
      "lowStock": "5",
      "price": "1200.00",
      "vat": "0.27",
      "currency": "HUF",
      "isAdr": "yes",
      "adrCode": "4",
      "adrQuantity": "2",
      "coolingDemand": "none",
      "isFragile": "no",
      "category": "Divat és ruházat",
      "subCategory": "Gyermek divat",
      "subSubCategory": "Overál",
      "keepQuantity": "5",
      "dropshippyWholesalePrice": "1000.00",
      "dropshippyWholesaleVat": "0.27",
      "dropshippyRecommendedPrice": "1200.00",
      "dropshippyPromotion": "no",
      "productDescription": "CicaNaci - One Size",
      "type": "product",
      "productType": "clothes",
      "imageUrls": "",
      "quantity": "197",
      "available_quantity": "196",
      "reserved_by_orders": "1",
      "updatedAt": "2018-03-12 11:59:32"
    }
  ]
}

Hibás kérés esetén (példa):

{
  "status": "error",
  "message": [
    "[field: lastMod]The field must be a valid datetime (eg. yyyy-mm-dd hh:ii:ss)"
  ]
}

Termékek létrehozása, módosítása

Ezzel a funkcióval egyszerre lehet létrehozni és módosítani termékeket. Amennyiben a megadott sku-val még nem szerepel nálunk termék, akkor az API létrehozza, amennyiben már szerepel, akkor módosítja azt. Minden mező szabadon módosítható, kivéve a barcode, ami csak akkor, ha még nincs megadva ez az adat vagy nem volt még belőle árubeszállítás rögzítve. Sikeres létrehozás, vagy módosítás esetén az API visszaadja a rendelés belső azonosítóját.

Egy API hívással egy termék hozható létre vagy módosítható.

Dropshippy felhasználás esetén keresd fel a kapcsolódó help anyagjainkat is.

XML esetén:

Url: https://app.webshippy.com/wspyapi/CreateProduct/xml

Kérés:

<?xml version="1.0" encoding="utf-8"?>
<request>    
  <apiKey>api-key-comes-here</apiKey>    
  <product>        
    <referenceId>1231</referenceId>        
    <sku>szuperhos-polo-piros-xl</sku>        
    <barcode>126510305031</barcode>        
    <productName>Szuperhős Póló</productName>        
    <variantName>Piros, XL</variantName>        
    <type>product</type>        
    <hasSerial>no</hasSerial>        
    <dutiable>yes</dutiable>        
    <productDescription>Szuperhős Póló leírás</productDescription>        
    <taricCode>12345</taricCode>        
    <lowStock>5</lowStock>        
    <price>1200</price>        
    <vat>0.27</vat>        
    <currency>HUF</currency>        
    <isAdr>yes</isAdr>        
    <adrCode>4</adrCode>        
    <adrQuantity>2</adrQuantity>        
    <coolingDemand>none</coolingDemand>        
    <isFragile>no</isFragile>        
    <productType>clothes</productType>        
    <category>3-406</category>        
    <keepQuantity>5</keepQuantity>        
    <dropshippyWholesalePrice>1000</dropshippyWholesalePrice>        
    <dropshippyWholesaleVat>0.27</dropshippyWholesaleVat>        
    <dropshippyRecommendedPrice>1200</dropshippyRecommendedPrice>        
    <dropshippyPromotion>no</dropshippyPromotion>        
    <imageUrls>https://micoedward.com/wp-content/uploads/2018/04/Love-your-product.png;https://www.noto.design/wp-content/uploads/18-06-14_Heritage_Render_Header-1-1100x619.jpg</imageUrls>    
  </product>
</request>

Válasz (példa):

<?xml version="1.0" encoding="utf-8"?>
<response>  
  <status>success</status> 
  <message>    
  <elem>The product creation was successful</elem>  
  </message>  
  <wspyId>74210</wspyId>
</response>

JSON esetén:

Url: https://app.webshippy.com/wspyapi/CreateProduct/json

Kérés:

{
  "apiKey": "api-key-comes-here",
  "product": {
    "referenceId": "1231",
    "sku": "szuperhos-polo-piros-xl",
    "barcode": "126510305031",
    "productName": "Szuperhős Póló",
    "variantName": "Piros, XL",
    "type": "product",
    "hasSerial": "no",
    "dutiable": "yes",
    "productDescription": "Szuperhős Póló leírás",
    "taricCode": "12345",
    "lowStock": "5",
    "price": "1200",
    "vat": "0.27",
    "currency": "HUF",
    "isAdr": "yes",
    "adrCode": "4",
    "adrQuantity": "2",
    "coolingDemand": "none",
    "isFragile": "no",
    "productType": "clothes",
    "category": "3-406",
    "keepQuantity": "5",
    "dropshippyWholesalePrice": "1000",
    "dropshippyWholesaleVat": "0.27",
    "dropshippyRecommendedPrice": "1200",
    "dropshippyPromotion": "no",
    "imageUrls": "https://micoedward.com/wp-content/uploads/2018/04/Love-your-product.png;https://www.noto.design/wp-content/uploads/18-06-14_Heritage_Render_Header-1-1100x619.jpg"
  }
}

Válasz (példa):

{
  "status": "success",
  "message": [
    "The product creation was successful"
  ],
  "wspyId": 74210
}

További válaszlehetőségek:

  • The product creation was successful

  • The product modification was successful

  • No changes detected in product

Termékcsomag létrehozása

Ezzel a funkcióval lehet létrehozni termékcsomagokat. Ha a megadott bundleSku-val még nem szerepel nálunk sem termék, sem termékcsomag akkor az API létrehozza. Sikeres létrehozás, vagy módosítás esetén az API visszaadja a termékcsomag belső azonosítóját

XML esetén:

Url: https://app.webshippy.com/wspyapi/createBundle/xml

Kérés:

<?xml version="1.0" encoding="utf-8"?>
<request>  
  <apiKey>api-key-comes-here</apiKey>
  <bundleSKU>123334</bundleSKU>
  <bundleName>Akciós csomag</bundleName>
  <bundlePriceNet>5000</bundlePriceNet>
  <bundleVat>26</bundleVat>
  <bundleCurrency>HUF</bundleCurrency>  
  <products>    
    <productSku>prod001</productSku>   
    <quantity>3</quantity>  
  </products>
</request>

Válasz (példa):

<?xml version="1.0" encoding="utf-8"?>
<response>  
  <status>error</status>  
  <message>Request format is invalid</message>
</response>

JSON esetén:

Url: https://app.webshippy.com/wspyapi/createBundle/json

Kérés:

{
	"apiKey": "xxx-own-apikey-xxx",  
	"bundleSku": "bundlesku-001",    
	"bundleName": "bundlename-001",
	"bundlePriceNet": "1000",
	"bundleCurrency": "HUF",
	"products": [{    
	"productSku": "09002",
	"quantity": "1"
	},
	{    
	"productSku": "09004",
	"quantity": "1"
	}
	]
	}

Válasz (példa):

{
"status": "error",
"message": [
"Request format is invalid"
]
}

Termék törlése

Hamarosan…

Last updated