Retrieve an object

Retrieve an object and all its field values through the API with a GET request.

1 min read

Send the request

  1. HTTP URL: https://<your-instance>.yooi.io/api/store/object/id/{objectId}
  1. HTTP method: GET

Understand the response

A JSON document representing the object.

Retrieve a country: France

  1. We use the created object id to retrieve the complete France object. See Create an Object.
    curl -X GET \
      'https://<your-instance>.yooi.io/api/store/object/id/936793b5-ca4a-481d-8dcd-756221937e95' \
      -H 'Authorization: Bearer {integrationToken}'
  1. The result of the API call contains all object fields with their values:
    {
      "id": "936793b5-ca4a-481d-8dcd-756221937e95",
      "key": "936793b5-ca4a-481d-8dcd-756221937e95",
      "ee3b77dc-4172-5aae-add8-627a43b06783": "a3a4f8d2-8f88-4398-99b9-37546ec9dfc1",
      "bf040b6b-58be-5194-8f32-4e1c8df24b42": [
        {
          "type": "paragraph",
          "children": [
            {
              "text": "France"
            }
          ]
        }
      ],
      "ae94d0af-526c-458f-b522-7d5653bc492d": 60000000,
      "30e01fe8-841d-43cb-814b-af97098ebfde": "z",
      "e8b10c4a-bae3-57cc-95c7-a22e69b5d4ae": 1632752769966,
      "436095ac-79f2-59c9-afa3-596bb1887f61": 1632752966122
    }

Handle missing values

If no values are returned, it means either:

  • The object has been deleted
  • The integration does not have the rights to see the given object
  • The object has never existed

Read more

Related articles

Was this page helpful?