Support

Account

Home Forums General Issues How to use ACF relationship field with the WordPress REST API?

Helping

How to use ACF relationship field with the WordPress REST API?

  • Hello,

    I have a custom post type “Merchant”, and another custom post type “Book”.

    I will need to use the WordPress REST API to create books, and for each book, my plan is to use a relationship field where i can link a merchant to a book. However. I need to know how the relationship field works with the REST API.

    Since i will be automatically, via a Python script, creating these book product pages, I need to be able to select the merchant somehow using a search string or an ID. But I can see that when I manually use the relationship custom field, I first need to search and then select. This process can’t be done using the REST API, so I need to know how to use the relationship field using the REST API.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.