Integration field Write API Authentication

Hello,

I have configured an Integration Field and have chosen "Push data to Prismic". I tried to search the user guides, this community forum, but could not find any information about the following requirements:

  • Which HTTP verb should I use?
  • Which data schema is expected by the endpoint?
  • What Authentication approach should be used?

Thank you for clarification.

Hello @mikhail.smal,

Welcome to the Prismic Forum and thanks for posting to us.

Regarding your questions, please find respectively:

  1. You will need to use POST request to add or modify items to your IF endpoint.

  2. Here is an example of the JSON schema. The "blob" attribute is where you add the data for your items that will be returned in the Prismic API.

You can read more about the required fields in our Custom API documentation.

  {
    "id": "0",
    "title": "My Item number 0",
    "description": "Lorem ipsum",
    "image_url": "https://if-test-custom-api.herokuapp.com/asset/0",
    "last_update": 1591670070,
    "blob": {
      "lorem": "ipsum",
      "dolor": "sit"
    }
  },
  1. You'll need to include a Bearer token authorization header when sending the POST request. Your Bearer token can be found by viewing the Integration Field settings.

Let me know if I understood your question correctly or you are looking for something else.

Thanks,
Priyanka

1 Like

Thank you for explanation. It was very useful.
One more question in this regard.
Is it possible to delete items?

You are welcome @mikhail.smal. Yes, It's possible to delete items from the catalog. You can find complete detail here.
Let me know if you have any other doubts.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.