I am trying to connect Worpress CPT and Zapier. First step is to make CPTs / Custom fields created with Toolset available in the API. When I call a CPT post in the API I get the error message: "rest_post_invalid_id" and "status: 404" (see attachment). Default WP post types work fine in the API.
Exposure to API is checked in Toolset settings.
eg:
WP default post type: hidden link
Toolset post type: hidden link
Is there any documentation that you are following?
Toolset post types and custom fields operate as normal WordPress post types and post meta and can be retrieved using the normal REST API routes.
The extra layer of Toolset integration with the REST API is to add a special endpoint to retrieve formatted custom field values (the same as if you output the field using a shortcode or block) rather than the raw values stored in wp_postmeta, which is what the normal WordPress REST API routes return.
There is nothing special required to access custom posts of a post type registered with Toolset (other than having the REST API option enabled for the post type, which it is by default).
The problem appears to be that you are trying to retrieve custom posts via the /posts route, but that is for standard WordPress posts. You should use the route for your post type (e.g. /books for a book post type), as described here:
Thanks for clarifying! It works fine after registering the CPT as described in the url you provided.
However, in Zapier - although I see the CPT in the list - none of the fields are available. I guess there must be an issue on Zapier's side since CPTs and custom fields should be available as long as the post types are accessible in the REST API?
Have you already enable the "REST API" support to expose the toolset-meta with post type from:
=> Toolset => Settings => Custom Content tab => enable the checkbox "Expose custom fields managed by Types for posts, users, and terms through the REST API" from REST API section