Webhooks
List Webhooks
GET https://api.idol.io/api/v2/webhooks
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
{
  "data": [
    {
      "id": "<ID>",
      "type": "webhooks",
      "links": {
        "self": "https://api.idol.io/api/v2/webhooks/<ID>"
      },
      "attributes": {
        "created-at": "2023-11-18T16:45:54.074+01:00",
        "updated-at": "2024-09-13T08:26:46.651+02:00",
        "action": "product_create",
        "url": "https://yourdomain.com/callbacks"
      },
      "relationships": {
        "distributor": {
          "links": {
            "self": "https://api.idol.io/api/v2/webhooks/<ID>/relationships/distributor",
            "related": "https://api.idol.io/api/v2/webhooks/<ID>/distributor"
          },
          "data": {
            "type": "distributors",
            "id": "<ID>"
          }
        }
      }
    }
  ],
  "meta": {
    "record-count": 1,
    "page-count": 1
  },
  "links": {
    "first": "https://api.idol.io/api/v2/webhooks?page%5Bnumber%5D=1&page%5Bsize%5D=3"
  }
}Get Webhook
GET https://api.idol.io/api/v2/webhooks/:id
Path Parameters
id*
number
ID of the Webhook
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
{
  "data": {
    "id": "<ID>",
    "type": "webhooks",
    "links": {
        "self": "https://api.idol.io/api/v2/webhooks/<ID>"
    },
    "attributes": {
        "created-at"=>"2022-07-08T15:23:35.465+02:00",
        "updated-at"=>"2022-07-08T15:23:35.465+02:00",
        "action"=>"product_create",
        "url"=>"https://yourdomain.com/callbacks",
    },
    "relationships": {
        "distributors"=>{
            "links"=>{
                "self"=>"https://api.idol.io/api/v2/webhooks/<ID>/relationships/distributor",
                "related"=>"https://api.idol.io/api/v2/webhooks/<ID>/distributor"
            },
        "data"=>{
            "type"=>"distributors",
            "id"=>"<distributor id>"
            }
        }
    }
  }
}Create a Webhook
POST https://api.idol.io/api/v2/webhooks
Available actions are :
- product_create : when a Product is created - import_task_status_update : when the status of ImportTask changes - dsp_state_status_update : when the availability of a DspState changes - send_task_status_update : when the status of a SendTask changes
URL : you need to provide an unauthorized url which responds to POST request. We will provide the following JSON : - <id> : the id of the object - <value> : the new value for the object - <time> : the timestamp when the property of the object changed.
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
Request Body
action*
string
import_task_status_update, dsp_state_status_update, send_task_status_update or product_create
url*
string
an unauthorized url where our system will perform HTTP POST
distributor*
object
Distributor Object
{
  "data": {
    "id": "<ID>",
    "type": "webhooks",
    "links": {
        "self": "https://api.idol.io/api/v2/webhooks/<ID>"
    },
    "attributes": {
        "created-at"=>"2022-07-08T15:23:35.465+02:00",
        "updated-at"=>"2022-07-08T15:23:35.465+02:00",
        "action"=>"product_create",
        "url"=>"https://yourdomain.com/callbacks",
    },
    "relationships": {
        "distributors"=>{
            "links"=>{
                "self"=>"https://api.idol.io/api/v2/webhooks/<ID>/relationships/distributor",
                "related"=>"https://api.idol.io/api/v2/webhooks/<ID>/distributor"
            },
        "data"=>{
            "type"=>"distributors",
            "id"=>"<distributor id>"
            }
        }
    }
  }
}Delete a Webhook
DELETE https::/api.idol/io/api/v2/webhooks/:id
Path Parameters
id*
number
ID of the Record
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
Last updated