Need to create shopify FAQ application. what is the best way of store FAQs on Shopify's database

Solved

Need to create shopify FAQ application. what is the best way of store FAQs on Shopify's database

sumedaict
Shopify Partner
4 0 0

I am creating shopify FAQ app. There is full CRUD operation in this application. I dont need to maintain my own database I need to use Shopify's database so how can i do that. what are the endpoints should I use?

Accepted Solution (1)

Moeed
Shopify Partner
7007 1890 2309

This is an accepted solution.

Hey @sumedaict 

To create a Shopify FAQ app and utilize Shopify's database, you can leverage Shopify's built-in resources and APIs. Here are some key components and endpoints you can use:

  1. Use the "Page" resource: Shopify has a "Page" resource that can be used to store frequently asked questions (FAQs) and their corresponding answers. You can create a new page for each FAQ, and the content of the FAQ can be stored in the page's body field.

    • Endpoint: /admin/api/2021-07/pages.json
    • Method: POST to create a new FAQ page
    • Method: PUT to update an existing FAQ page
    • Method: GET to retrieve FAQ pages
  2. Add Metafields to the FAQ pages: Metafields can be used to store additional data associated with the FAQ pages, such as tags, categories, or any other custom information you may require.

    • Endpoint: /admin/api/2021-07/metafields.json
    • Method: POST to create a new metafield for a FAQ page
    • Method: PUT to update an existing metafield for a FAQ page
    • Method: GET to retrieve metafields for a FAQ page
  3. Implement CRUD operations for FAQs: You can build functionality to create, read, update, and delete FAQs using the above-mentioned endpoints.

    • Use the POST method to create a new FAQ page and associated metafields.
    • Use the PUT method to update the content or metafields of an existing FAQ page.
    • Use the GET method to fetch the FAQs and display them to users.
    • Use the DELETE method to remove a FAQ page if needed.

It's important to note that you will need to authenticate your app with the appropriate OAuth scopes to access these endpoints. You can follow Shopify's authentication and authorization documentation to set up the necessary authentication flow.

By utilizing these endpoints and performing CRUD operations on Shopify's database, you can create a robust FAQ app that stores and retrieves FAQs directly from the Shopify platform.

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


View solution in original post

Replies 2 (2)

Moeed
Shopify Partner
7007 1890 2309

This is an accepted solution.

Hey @sumedaict 

To create a Shopify FAQ app and utilize Shopify's database, you can leverage Shopify's built-in resources and APIs. Here are some key components and endpoints you can use:

  1. Use the "Page" resource: Shopify has a "Page" resource that can be used to store frequently asked questions (FAQs) and their corresponding answers. You can create a new page for each FAQ, and the content of the FAQ can be stored in the page's body field.

    • Endpoint: /admin/api/2021-07/pages.json
    • Method: POST to create a new FAQ page
    • Method: PUT to update an existing FAQ page
    • Method: GET to retrieve FAQ pages
  2. Add Metafields to the FAQ pages: Metafields can be used to store additional data associated with the FAQ pages, such as tags, categories, or any other custom information you may require.

    • Endpoint: /admin/api/2021-07/metafields.json
    • Method: POST to create a new metafield for a FAQ page
    • Method: PUT to update an existing metafield for a FAQ page
    • Method: GET to retrieve metafields for a FAQ page
  3. Implement CRUD operations for FAQs: You can build functionality to create, read, update, and delete FAQs using the above-mentioned endpoints.

    • Use the POST method to create a new FAQ page and associated metafields.
    • Use the PUT method to update the content or metafields of an existing FAQ page.
    • Use the GET method to fetch the FAQs and display them to users.
    • Use the DELETE method to remove a FAQ page if needed.

It's important to note that you will need to authenticate your app with the appropriate OAuth scopes to access these endpoints. You can follow Shopify's authentication and authorization documentation to set up the necessary authentication flow.

By utilizing these endpoints and performing CRUD operations on Shopify's database, you can create a robust FAQ app that stores and retrieves FAQs directly from the Shopify platform.

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


sumedaict
Shopify Partner
4 0 0

Thank you ..