Skip Navigation

[Resolved] Update / Post cuszom fields with REST API

This support ticket is created 4 years, 4 months ago. 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.

Our next available supporter will start replying to tickets in about 1.06 hours from now. Thank you for your understanding.

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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Nashaat 4 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#1428303

I am trying to create/update a post using the REST API. I am testing this trought Posman App.

I managed to update custom fields of ACF but never managed to update a custom field of toolset.

Following example can update the field 'publisher' i have created with ACF

{
"title" : "post 1",
"fields": {
         "publisher": "Some Name"
        } 
} 

In the other hand i cant update the custom field 'toolset-field' i have created with toolset
Link to a page where the issue can be seen:

{
"title" : "post 2",
"toolset-meta": {
         "fields-group-for-books": {
                 "toolset-field": {
                   "raw": "New Value"
                } 
         } 
} 
} 

I can see the fields in the JSON but cant update the value.

Are Toolset custom fields able to be updated with REST API?

I have enabled the option in toolset to expose custom fields.

#1430893

Minesh
Supporter

Languages: English (English )

Timezone: 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 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

If you want custom programming for your project, please feel free to contact our certified partners.
=> https://toolset.com/consultant/

Please check the following link that may help you:
=> https://wordpress.stackexchange.com/questions/257628/wp-rest-api-rest-no-route-when-trying-to-update-meta/262088#262088

#1431939

My issue is not resolved. Thank you for now!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.