{"id":30170,"date":"2022-11-04T21:15:59","date_gmt":"2022-11-04T21:15:59","guid":{"rendered":"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-getting-and-updating-relation-data-via-rest-api\/"},"modified":"2026-05-12T12:41:29","modified_gmt":"2026-05-12T12:41:29","slug":"jetengine-getting-and-updating-relation-data-via-rest-api","status":"publish","type":"article","link":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/","title":{"rendered":"How to Get and Update Relation Data via REST API"},"content":{"rendered":"\n<p>The <strong>Public REST API<\/strong> for <strong>Relations <\/strong>feature allows you to get and update relations data through <strong>REST API<\/strong> with the help of the <em>JetEngine <\/em>WordPress plugin.<\/p>\n\n\n<div class=\"note-banner d-flex border-bold border-jetthemecore rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M9 21C9 21.5 9.4 22 10 22H14C14.6 22 15 21.5 15 21V20H9V21ZM12 2C8.1 2 5 5.1 5 9C5 11.4 6.2 13.5 8 14.7V17C8 17.5 8.4 18 9 18H15C15.6 18 16 17.5 16 17V14.7C17.8 13.4 19 11.3 19 9C19 5.1 15.9 2 12 2Z\" fill=\"#F2D23C\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Things to know<\/div><p class=\"m-0\">In this tutorial, we work with the Advanced REST Client application, but you can use any application that works with REST API.<\/p><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"public-rest-api-for-relations-settings-overview\"><strong>Public REST API for Relations Settings Overview<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>Navigate to the <strong><em>WordPress Dashboard &gt; JetEngine &gt; Relations <\/em><\/strong>tab and click the \u201c<strong>Edit<\/strong>\u201d button next to the needed relation.<\/p>\n\n\n\n<p>We will work with the \u201cUsers (Guides) &gt; Posts (Tours)\u201d relation.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-1024x640.webp\" alt=\"list of relations\" class=\"wp-image-44306\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Go to the <strong>Register get items\/item REST API Endpoint <\/strong>toggle and enable it.<\/p>\n\n\n\n<p>In the <strong>Endpoint URL<\/strong> field, you will see three URLs that can be copied and used for the connection between two websites:<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint-1024x640.webp\" alt=\"register get items rest api endpoint\" class=\"wp-image-44307\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-get-items-rest-api-endpoint.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<ul>\n<li><strong>GET \u2013 \/wp-json\/jet-rel\/&lt;relation ID&gt;<\/strong> \u2014 retrieve all data for the selected relation;<\/li>\n\n\n\n<li><strong>GET \u2013 \/wp-json\/jet-rel\/&lt;relation ID&gt;\/children\/&lt;item ID&gt;<\/strong> \u2014 retrieve child items for the selected item ID;<\/li>\n\n\n\n<li><strong>GET \u2013 \/wp-json\/jet-rel\/&lt;relation ID&gt;\/parents\/&lt;item ID&gt;<\/strong> \u2014 retrieve parent items for the selected item ID.<\/li>\n<\/ul>\n\n\n<div class=\"note-banner d-flex border-bold border-jetthemecore rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M9 21C9 21.5 9.4 22 10 22H14C14.6 22 15 21.5 15 21V20H9V21ZM12 2C8.1 2 5 5.1 5 9C5 11.4 6.2 13.5 8 14.7V17C8 17.5 8.4 18 9 18H15C15.6 18 16 17.5 16 17V14.7C17.8 13.4 19 11.3 19 9C19 5.1 15.9 2 12 2Z\" fill=\"#F2D23C\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Things to know<\/div><p class=\"m-0\">In the <strong>Access Capability<\/strong> field, you can choose who will be allowed to access these related items. By default, there are no restrictions, but if you enter, for example, the \u201cedit_pages\u201d capability, only editors and admins can edit them.<\/p><\/div><\/div>\n\n\n\n<p>Enable the <strong>Register update REST API Endpoint <\/strong>toggle.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint-1024x640.webp\" alt=\"register update items rest api endpoint\" class=\"wp-image-44308\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/register-update-items-rest-api-endpoint.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p><strong>POST \u2013 \/wp-json\/jet-rel\/&lt;relation ID&gt;<\/strong> \u2014 specify the required data. The body of the query post must contain the following data:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n\tparent_id: ID\/IDs,\n\tchild_id: ID\/IDs,\n\tcontext: child\/parent,\n\tstore_items_type: replace\/update\/disconnect\n}\n<\/code><\/pre>\n\n\n\n<p>In this piece of code, you need to enter the ID\/IDs of the parent item\/items, ID\/IDs of the child item\/items; the context can be \u201cchild\u201d or \u201cparent,\u201d where \u201cchild\u201d means updating the child item from the parent and \u201cparent\u201d \u2013 updating the parent item from the child. The store_items_type row can be \u201creplace\u201d or \u201cupdate,\u201d where \u201creplace\u201d deletes existing elements and inserts the new ones instead when updating, \u201cupdate\u201d adds the new elements to the existing ones, and &#8220;disconnect&#8221; removes the specified elements from the relation without adding new ones.<\/p>\n\n\n\n<p>When you finish, hit the <strong>\u201cUpdate Relation\u201d <\/strong>button.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"update-relation-data-via-rest-api\"><strong>Update Relation Data via REST API<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\"><div class=\"wp-block-group__inner-container\">\n<p>We will show how to update and replace related items using the Advanced REST Client application as an example.<\/p>\n\n\n\n<p>We select the \u201cPOST\u201d <strong>Method <\/strong>and enter the relation endpoint URL in the <strong>Request URL <\/strong>field.<\/p>\n\n\n\n<p>In the <strong>Headers <\/strong>tab, we add a <strong>Header <\/strong>with the \u201cContent-Type\u201d <strong>Name<\/strong> and \u201capplication\/json\u201d <strong>Value<\/strong>. If you want, you can also add the \u201cAuthorization\u201d <strong>Header<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client-1024x550.webp\" alt=\"headers tab of the advanced rest client\" class=\"wp-image-44309\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client-1024x550.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client-300x161.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client-768x412.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client-1536x824.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client-600x322.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/headers-tab-of-the-advanced-rest-client.webp 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"updating-the-child-item-from-the-parent\"><strong>Updating the child item from the parent<\/strong><\/h3>\n\n\n\n<p>We decided to add a new child tour to the parent guide. Now, the current user doesn\u2019t have any related posts.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected-1024x640.webp\" alt=\"related posts not connected\" class=\"wp-image-44310\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-posts-not-connected.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>In the <strong>Body <\/strong>tab, we leave the default \u201cJSON\u201d <strong>Body content type <\/strong>and \u201cRaw input\u201d <strong>Editor view<\/strong>.<\/p>\n\n\n\n<p>In the following textarea, we enter such a JSON code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"parent_id\": 2,\n  \"child_id\": 1310,\n  \"context\": \"child\",\n  \"store_items_type\": \"update\"\n}\n<\/code><\/pre>\n\n\n\n<p>Where \u201c2\u201d is an ID of a parent guide; \u201c1310\u201d is an ID of a child tour that has been created earlier and we want to add to the guide; \u201cchild\u201d indicates that we want to update the child item from the parent. Lastly,&nbsp; \u201cupdate\u201d is a command that will update the relation and add a new item instead of replacing the old one.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code-1024x550.webp\" alt=\"succesful update code\" class=\"wp-image-44311\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code-1024x550.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code-300x161.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code-768x412.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code-1536x824.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code-600x322.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-update-code.webp 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Click the <strong>\u201cSend the request\u201d <\/strong>button. The request is successful, so we add a new child item to the parent object.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected-1024x640.webp\" alt=\"related post connected\" class=\"wp-image-44312\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/related-post-connected.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"updating-relation-meta-fields\"><strong>Updating relation meta fields<\/strong><\/h3>\n\n\n\n<p>You can also update the relation <a href=\"https:\/\/crocoblock.com\/knowledge-base\/articles\/jetengine-wordpress-relations-feature-settings-overview\/#metafields\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>meta field<\/strong><\/a> via the REST API.<\/p>\n\n\n\n<p>We add a new stroke to the code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"meta\": {\"tour_start_date\" : \"2024-06-24\", \"_pricing\": \"300\"}<\/code><\/pre>\n\n\n\n<p>Where \u201ctour_start_date\u201d and \u201c_pricing\u201d are \u201cText\u201d and \u201cDate\u201d meta fields from the relation, and \u201c2024-06-24\u201d and \u201c300\u201d are values. You can update all types of meta fields that are available for relations.<\/p>\n\n\n\n<p>Click the \u201c<strong>Send the request<\/strong>\u201d button.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code-1024x550.webp\" alt=\"meta update code\" class=\"wp-image-44313\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code-1024x550.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code-300x161.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code-768x412.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code-1536x824.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code-600x322.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-update-code.webp 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>To check the results, hit the \u201c<strong>Edit Meta\u201d <\/strong>button next to the connected child post.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button-1024x640.webp\" alt=\"edit meta button\" class=\"wp-image-44314\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/edit-meta-button.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>As we can see, values have been saved via the REST API.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated-1024x640.webp\" alt=\"meta fields updated\" class=\"wp-image-44315\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/meta-fields-updated.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n<div class=\"note-banner d-flex border-bold border-jetsmartfilters rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z\" fill=\"#FA5450\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Warning<\/div><p class=\"m-0\">The <i>JetEngine<\/i> plugin usually saves dates into the database in the YYYY-MM-DD format. Before updating, you can check it by adding value to the date meta field on the website by clicking the \u201c<strong>Edit Meta<\/strong>\u201d button. Then you will be sure in what format you should enter dates.<\/p><\/div><\/div>\n\n\n\n<p>Save the meta data and enter the <strong>Endpoint URL <\/strong>into the search bar.<\/p>\n\n\n\n<p>Here you can see in what format the date is saved. So, when updating or replacing the relation items, enter the value in the same format.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url-1024x640.webp\" alt=\"endpoint url\" class=\"wp-image-44316\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/endpoint-url.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"replacing-relation-items\"><strong>Replacing relation items<\/strong><\/h3>\n\n\n\n<p>If you want to replace all related items with a new one, you need to enter \u201creplace\u201d instead of \u201cupdate\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"store_items_type\": \"replace\",<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code-1024x550.webp\" alt=\"succesful replace code\" class=\"wp-image-44317\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code-1024x550.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code-300x161.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code-768x412.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code-1536x824.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code-600x322.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-replace-code.webp 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>After the \u201c<strong>Send the request<\/strong>\u201d button is pressed, the new related item will replace the old ones.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced-1024x640.webp\" alt=\"connected child replaced\" class=\"wp-image-44318\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/connected-child-replaced.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"updating-the-parent-item-from-the-child\"><strong>Updating the parent item from the child<\/strong><\/h3>\n\n\n\n<p>Now, we want to add a new guide to the tour; in other words, update the parent items (users) for the child object (post).<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected-1024x640.webp\" alt=\"post with related users not connected\" class=\"wp-image-44319\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-users-not-connected.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>JSON code is similar to the one that we used for adding a child item to the parent object, but you need to change the context:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"parent_id\": 3,\n  \"child_id\": 710,\n  \"context\": \"parent\",\n  \"store_items_type\": \"update\",\n  \"meta\": {\"tour_start_date\" : \"2024-08-13\", \"_price_\": \"400\"}\n}\n<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code-1024x550.webp\" alt=\"succesful parent update code\" class=\"wp-image-44320\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code-1024x550.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code-300x161.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code-768x412.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code-1536x824.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code-600x322.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/succesful-parent-update-code.webp 1919w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Parent user with the \u201c3\u201d ID has been added to the post with the \u201c710\u201d ID.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected-1024x640.webp\" alt=\"post with related user connected\" class=\"wp-image-44321\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/post-with-related-user-connected.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"adding-several-children-to-the-parent-or-vice-versa\"><strong>Adding several children to the parent or vice versa<\/strong><\/h3>\n\n\n\n<p>To add several children to the parent, you need to put IDs into the array:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"child_id\": &#091;710, 1174, 653, 1221, 649],<\/code><\/pre>\n\n\n<div class=\"note-banner d-flex border-bold border-jetthemecore rounded overflow-hidden p-20\"><div class=\"mr-12\"><svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M9 21C9 21.5 9.4 22 10 22H14C14.6 22 15 21.5 15 21V20H9V21ZM12 2C8.1 2 5 5.1 5 9C5 11.4 6.2 13.5 8 14.7V17C8 17.5 8.4 18 9 18H15C15.6 18 16 17.5 16 17V14.7C17.8 13.4 19 11.3 19 9C19 5.1 15.9 2 12 2Z\" fill=\"#F2D23C\"\/><\/svg><\/div><div class=\"d-flex flex-column\"><div class=\"text-900 mb-12\">Things to know<\/div><p class=\"m-0\">Relation meta can be updated only for a single parent-child pair. When using multiple IDs in arrays, relation meta update is not supported.<\/p><\/div><\/div>\n\n\n\n<p>When ready, click the <strong>\u201cSend the request\u201d<\/strong> button and proceed to the parent page.<\/p>\n\n\n\n<p>New children items have been successfully added to the parent object.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user-1024x640.webp\" alt=\"several related posts connected to the user\" class=\"wp-image-44323\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user-1024x640.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user-300x188.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user-768x480.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user-1536x960.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user-600x375.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/several-related-posts-connected-to-the-user.webp 1824w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>You can also add several parents to one child by putting several parent IDs in the array.<\/p>\n\n\n\n<p>It\u2019s also possible to connect several parents and children, so each parent in the code will have five children.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"disconnecting-relation-items\">Disconnecting relation items<\/h3>\n\n\n\n<p>If you want to remove the specific relation items without adding new ones, use the &#8220;disconnect&#8221; option:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"parent_id\": 2,\n  \"child_id\": 1310,\n  \"context\": \"child\",\n  \"store_items_type\": \"disconnect\"\n}\n<\/code><\/pre>\n\n\n\n<p>In this code snippet, the child item with the &#8220;1310&#8221; ID will be disconnected from the parent with the &#8220;2&#8221; ID.<\/p>\n\n\n\n<div class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"595\" src=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request-1024x595.webp\" alt=\"disconnect request\" class=\"wp-image-49604\" srcset=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request-1024x595.webp 1024w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request-300x174.webp 300w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request-768x447.webp 768w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request-1536x893.webp 1536w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request-600x349.webp 600w, https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/09\/disconnect-request.webp 1840w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/div>\n\n\n\n<p>Click the &#8220;<strong>Send request<\/strong>&#8221; button to save the changes.<\/p>\n<\/div><\/div>\n\n\n\n<p>That\u2019s all. Now you know how to get the relation data list and update or replace the children or parent items via REST API with the <em>JetEngine <\/em>WordPress plugin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Discover how to get the relation data list and update or replace the children or parent items via REST API with the JetEngine WordPress plugin.<\/p>\n","protected":false},"author":1,"featured_media":0,"template":"","format":"standard","builder-category":[],"article-category":[399,407],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Get and Update Relation Data via REST API \u2014 JetEngine | Crocoblock<\/title>\n<meta name=\"description\" content=\"Discover all the details about how to get and update relation data via the REST API feature of JetEngine on your WordPress website.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get and Update Relation Data via REST API \u2014 JetEngine | Crocoblock\" \/>\n<meta property=\"og:description\" content=\"Discover all the details about how to get and update relation data via the REST API feature of JetEngine on your WordPress website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Help Center\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-12T12:41:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-1024x640.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/\",\"name\":\"How to Get and Update Relation Data via REST API \u2014 JetEngine | Crocoblock\",\"isPartOf\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\"},\"datePublished\":\"2022-11-04T21:15:59+00:00\",\"dateModified\":\"2026-05-12T12:41:29+00:00\",\"description\":\"Discover all the details about how to get and update relation data via the REST API feature of JetEngine on your WordPress website.\",\"breadcrumb\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/crocoblock.com\/knowledge-base\/articles\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Get and Update Relation Data via REST API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#website\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"name\":\"Help Center\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#organization\",\"name\":\"Help Center\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"contentUrl\":\"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg\",\"caption\":\"Help Center\"},\"image\":{\"@id\":\"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Get and Update Relation Data via REST API \u2014 JetEngine | Crocoblock","description":"Discover all the details about how to get and update relation data via the REST API feature of JetEngine on your WordPress website.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/","og_locale":"en_US","og_type":"article","og_title":"How to Get and Update Relation Data via REST API \u2014 JetEngine | Crocoblock","og_description":"Discover all the details about how to get and update relation data via the REST API feature of JetEngine on your WordPress website.","og_url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/","og_site_name":"Help Center","article_modified_time":"2026-05-12T12:41:29+00:00","og_image":[{"url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2024\/05\/list-of-relations-1024x640.webp"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/","url":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/","name":"How to Get and Update Relation Data via REST API \u2014 JetEngine | Crocoblock","isPartOf":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#website"},"datePublished":"2022-11-04T21:15:59+00:00","dateModified":"2026-05-12T12:41:29+00:00","description":"Discover all the details about how to get and update relation data via the REST API feature of JetEngine on your WordPress website.","breadcrumb":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/crocoblock.com\/knowledge-base\/jetengine\/jetengine-getting-and-updating-relation-data-via-rest-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crocoblock.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/crocoblock.com\/knowledge-base\/articles\/"},{"@type":"ListItem","position":3,"name":"How to Get and Update Relation Data via REST API"}]},{"@type":"WebSite","@id":"https:\/\/crocoblock.com\/knowledge-base\/#website","url":"https:\/\/crocoblock.com\/knowledge-base\/","name":"Help Center","description":"","publisher":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crocoblock.com\/knowledge-base\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crocoblock.com\/knowledge-base\/#organization","name":"Help Center","url":"https:\/\/crocoblock.com\/knowledge-base\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/","url":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","contentUrl":"https:\/\/crocoblock.com\/knowledge-base\/wp-content\/uploads\/2025\/04\/invert-crocoblock-logo.svg","caption":"Help Center"},"image":{"@id":"https:\/\/crocoblock.com\/knowledge-base\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article\/30170"}],"collection":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=30170"}],"wp:term":[{"taxonomy":"builder-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/builder-category?post=30170"},{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/crocoblock.com\/knowledge-base\/wp-json\/wp\/v2\/article-category?post=30170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}