Outlet WP: differenze tra le versioni
Da Webmobili Wiki.
| Riga 23: | Riga 23: | ||
=== Products === | === Products === | ||
Per aggiungere un prodotto ad un Vendor, dobbiamo chiamare la seguente API autenticati con i dati del vendor. | Per aggiungere un prodotto ad un Vendor, dobbiamo chiamare la seguente API autenticati con i dati del vendor.</br> | ||
<code>POST -> /wp-json/dokan/v1/products/</code> | <code>POST -> /wp-json/dokan/v1/products/</code> | ||
Versione delle 11:13, 28 ott 2022
DOKAN Multi-Vendor
Pagina ufficiale https://wedevs.com/
REST API DOKAN
Link alla documentazione per le REST API https://wedevsofficial.github.io/dokan/
Vendors
Per creare un utente Vendor
POST -> /wp-json/wp/v2/users
{
"username": "slm001",
"email": "salumi@gnam.prova",
"password": "650",
"roles": "seller"
}
Dobbiamo trovare come settare il campo Store Name
Products
Per aggiungere un prodotto ad un Vendor, dobbiamo chiamare la seguente API autenticati con i dati del vendor.
POST -> /wp-json/dokan/v1/products/
{
"name": "Sedia chiappona",
"type": "simple",
"regular_price": "299",
"description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
"short_description": "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
"categories": [
{
"id": 67
}
],
"images": [
{
"src": "http://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_front.jpg",
"position": 0
}
]
}