• Resolved danielwerner23

    (@danielwerner23)


    Hi there,

    i’ve added the endpoint products and product-categories with acf and activated it via the api-switch. Now i can get all my products with /wp-json/wp/v2/products?_fields=title – fine. My questions is, how i can extend this request, to get only products, where has product-category=slug/id (slug or id from product-categories).

    My only idea is to do a pre request with a custom endpoint (eg. get_product_ids_by_category_slug) and after that the normal request like /wp-json/wp/v2/products?_fields=title&include=55,56

    Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter danielwerner23

    (@danielwerner23)

    Hi there. This is NOT a special ACF question/problem. There are 2 existing CPTs: products and products-category. It doesnt matter if you are create these 2 with acf or manualy in your functions.php. So please move the question into the normal support forum. Thanks a lot.

    You can edit my question and remove the “acf wording”.

    Hi @danielwerner23

    ACF Support Team here. This forum is generally used by ACF users to help each other out.

    Unfortunately, we do not have a way to move the conversation to the main forum, I’d request you to post it once more there.

    Please don’t hesitate to reach out to us in case anything else comes up, we are happy to help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Extend cpt api endpoint’ is closed to new replies.