Skip to content

๐Ÿš€ Effortlessly connect and manage your Shopify store using Node.js with this robust REST API client. Streamline operations for products, orders, customers, and more with clean, scalable code designed for developers.

Notifications You must be signed in to change notification settings

rahul-hytrox/SHOPIFY_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Shopify REST API Node.js Project

This project sets up a Node.js-based REST API that integrates with the Shopify Admin API. It provides endpoints for handling customers, orders, products, collections, blogs, and blog articles. The API is designed to be used with a mobile application and can be tested using Postman.

Features

  • Customers: CRUD operations for customers.
  • Orders: CRUD operations for orders.
  • Products: CRUD operations for products.
  • Collections: CRUD operations for custom and smart collections.
  • Blogs & Articles: CRUD operations for blogs and blog articles.

Installation

  1. Clone the Repository:

    git clone <repository_url>
    cd shopify-rest-api
    
    

API Endpoints Documentation

Customers

  • GET /customers - Retrieve all customers.
  • GET /customers/:id - Retrieve a specific customer by ID.
  • POST /customers - Create a new customer.
  • PUT /customers/:id - Update a customer.
  • DELETE /customers/:id - Delete a customer.

Orders

  • GET /orders - Retrieve all orders.
  • GET /orders/:id - Retrieve a specific order by ID.
  • POST /orders - Create a new order.
  • PUT /orders/:id - Update an order.
  • DELETE /orders/:id - Delete an order.

Products

  • GET /products - Retrieve all products.
  • GET /products/:id - Retrieve a specific product by ID.
  • POST /products - Create a new product.
  • PUT /products/:id - Update a product.
  • DELETE /products/:id - Delete a product.

Collections

Custom Collections

  • GET /collections/custom - Retrieve all custom collections.
  • GET /collections/custom/:id - Retrieve a custom collection by ID.
  • POST /collections/custom - Create a custom collection.
  • PUT /collections/custom/:id - Update a custom collection.
  • DELETE /collections/custom/:id - Delete a custom collection.

Smart Collections

  • GET /collections/smart - Retrieve all smart collections.
  • GET /collections/smart/:id - Retrieve a smart collection by ID.
  • POST /collections/smart - Create a smart collection.
  • PUT /collections/smart/:id - Update a smart collection.
  • DELETE /collections/smart/:id - Delete a smart collection.

Blogs

  • GET /blogs - Retrieve all blogs.
  • GET /blogs/:id - Retrieve a specific blog by ID.
  • POST /blogs - Create a new blog.
  • PUT /blogs/:id - Update a blog.
  • DELETE /blogs/:id - Delete a blog.

Blog Articles

  • GET /blogs/:blogId/articles - Retrieve all articles for a specific blog.
  • GET /blogs/:blogId/articles/:id - Retrieve a specific article by ID.
  • POST /blogs/:blogId/articles - Create a new article in a blog.
  • PUT /blogs/:blogId/articles/:id - Update an article.
  • DELETE /blogs/:blogId/articles/:id - Delete an article.

Testing with Postman

Setup Postman Collection

  1. Create a new Postman collection and add requests for each endpoint listed above.
  2. Set the base URL: Use http://localhost:3000 (or your server URL) followed by the endpoint path (e.g., {{base_url}}/customers).
  3. Configure request bodies:
    • For POST and PUT requests, set the body type to JSON and include required data fields (e.g., customer name, product details).

Using Environment Variables (Optional)

  1. Create a Postman environment with variables like base_url (e.g., http://localhost:3000).
  2. Reference these variables in your requests using {{variable_name}} syntax.

Run and Validate

  1. Send requests to your server and verify responses.
  2. Ensure proper status codes (e.g., 200 OK, 201 Created, 404 Not Found).
  3. Validate response data matches expectations.

About

๐Ÿš€ Effortlessly connect and manage your Shopify store using Node.js with this robust REST API client. Streamline operations for products, orders, customers, and more with clean, scalable code designed for developers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors