Passer la navigation

[Résolu] Creating custom posts via REST API

This support ticket is created Il y a 1 year, 9 months. There's a good chance that you are reading advice that it now obsolete.

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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 1 year, 9 months.

Assisté par: Minesh.

Auteur
Publications
#2710797

Tell us what you are trying to do?

How can I create custom posts (a Toolset Type with custom fields) using the REST API (or XML-RPC API)? Previously I have been importing via CSV using the "Ultimate CSV Importer PRO" plugin, but I'd like to migrate to a custom integration using Python and the REST API (or XML-RPC API if that isn't possible).

Is there any documentation that you are following?
We have extensively researched our Plugin and also other means. But mostly unofficial online documentation.

Is there a similar example that we can see?
Unfortunately, we currently have to perform manual imports using the "Ultimate CSV Importer" plugin because the scheduling functionality doesn't work. We are trying to do a "refresh" once per hour.

What is the link to your site?
lien caché

#2710814

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset offers the REST API integration by means of exposing the custom fields created using Types plugin to REST API. Please check the following Doc:
=> https://toolset.com/documentation/programmer-reference/toolset-integration-with-the-rest-api/

To post the custom field, the POST endpoint is required and that needs pure custom programming and that is beyond the scope of our support policy.

Still I have few articles/Docs to share with you which you can use as reference:
=> https://www.gavick.com/blog/adding-custom-fields-in-the-wordpress-rest-api
=> https://code.tutsplus.com/tutorials/wp-rest-api-creating-updating-and-deleting-data--cms-24883
=> https://developer.wordpress.org/rest-api/extending-the-rest-api/routes-and-endpoints/#endpoints
=> https://developer.wordpress.org/rest-api/reference/posts/
=> https://stackoverflow.com/questions/75668223/how-to-create-a-post-having-a-custom-field-meta-value-via-the-wp-rest-api

Please note that this is custom code and that is beyond the scope of our support policy. If you are not sure how to do it, please consult with pro REST API devs. You can even contact Toolset Certified contractors:
=> https://toolset.com/contractors/