Giter VIP home page Giter VIP logo

wc-customrestapi's Introduction

Wpc Ecom API

This plugin will provide you API routes which will help you to build your own e-commerce platform.

How To Upload this plugin

  • Download the plugin
  • remove readme.md file and showcase folder
  • Zip the file and don't change it's name
  • Go to plugin section in your wordpress site and click on add new
  • upload from zip

upload-plugin

GET /wp-json/wpc/v1/products

Returns all published products with following data.

Attribute type example
id number 45
name string product one
slug string product-one
price number 45 (without curreny)
sale_price number 45
featuredImage string https://localhost/wordpress/img.png
ratings number 4 (avg)
seller string john doe

GET /wp-json/wpc/v1/categories

Returns all Categories with following data.

Attribute type example
id number 45
name string Laptops
slug string laptops
totalProducts number 5
featuredImage string https://localhost/wordpress/img.png

GET /wp-json/wpc/v1/categories/<category-slug>

Returns all products in that category with following data

Attribute type example
id number 45
name string product one
slug string product-one
price number 45 (without curreny)
sale_price number 45
featuredImage string https://localhost/wordpress/img.png
ratings number 4 (avg)
seller string john doe

GET /wp-json/wpc/v1/check-coupon?couponcode=<yourcode>

Returns true or false depending upon validity of the coupon

POST /wp-json/wpc/v1/cart/products

Returns data of the products provided through post request as shown in the example

example

Attribute type example
items array [{id,name,price,quantity,total}]
discountData object {amount,code,isValid,type,msg}

example 2

GET /wp-json/wpc/v1/cart/available-payment-gateways

Returns all the available payment gateways with following data

Attribute type example
id number 4
title string Stripe (credit Card)
description string pay with credit card

GET /wp-json/wpc/v1/cart/orders-id?cid=<customer id>

Returns all the order id of customer given the id of customer

Attribute type example
ids array [117,185,114]

wc-customrestapi's People

Contributors

sarthak090 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.