Skip Navigation

[Resolved] REST API usage for connecting different linked custom post types

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2524537

Tell us what you are trying to do?
I need to access a custom post type (opticians) with the REST API.. I am able to get this data with all the related fields to opticians.. but I need to also get the brands that the optician has which is another custom post type (eyewear-brand) and there's a relationship between them but I am confused about the best way to get this data in a combined way to one external website using the REST API

Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/toolset-integration-with-the-rest-api/
But there's not much for my requirement

Is there a similar example that we can see?
Not really

What is the link to your site?
It's under construction

#2524659

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

In order to access related posts information we offer post relationship API functions:
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/

This will require pure custom programming and that is eventually out of the scope of our support policy.

However - here are the few links that might help you:
- https://toolset.com/forums/topic/relationship-in-api-rest/
- https://toolset.com/forums/topic/how-to-show-post-relationships-in-wordpress-rest-api/#post-1105621

As shared with above reference ticket you might want to check the plugin:
- hidden link