Webhooks

Webhooks allow your applications to receive real-time notifications from Digital River whenever certain events occur in your account. By configuring webhook URLs, your systems can be automatically alerted with detailed information, enabling timely and efficient responses to significant activities without continuous polling. This capability ensures your application remains in sync with account events, enhancing integration and operational workflow.

Returns a list of webhooks

get

Get all webhooks.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
typestringOptional

A string containing a specific webhook endpoint name, or a group of events using * as a wildcard. The list will be filtered to include only webhooks with a matching webhook property.

typesstringOptional

An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either type or types, but not both.

Responses
get
/webhooks
GET /webhooks HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "createdTime": {
      "offset": {
        "totalSeconds": 0,
        "id": "Z",
        "rules": {
          "fixedOffset": true,
          "transitions": [],
          "transitionRules": []
        }
      },
      "nano": 1000000,
      "year": 2018,
      "monthValue": 8,
      "dayOfMonth": 29,
      "hour": 9,
      "minute": 12,
      "second": 33,
      "dayOfWeek": "WEDNESDAY",
      "dayOfYear": 241,
      "month": "AUGUST"
    },
    "updatedTime": {
      "offset": {
        "totalSeconds": 0,
        "id": "Z",
        "rules": {
          "fixedOffset": true,
          "transitions": [],
          "transitionRules": []
        }
      },
      "nano": 1000000,
      "year": 2018,
      "monthValue": 8,
      "dayOfMonth": 29,
      "hour": 9,
      "minute": 12,
      "second": 33,
      "dayOfWeek": "WEDNESDAY",
      "dayOfYear": 241,
      "month": "AUGUST"
    },
    "types": [
      "order.created"
    ],
    "apiVersion": "default",
    "enabled": true,
    "address": "https://company.com",
    "transportType": "HTTP",
    "oauth": {
      "tokenEndPoint": "text",
      "userName": "text",
      "password": "text",
      "clientID": "text",
      "clientSecret": "text",
      "grantType": "password"
    },
    "authentication": {
      "username": "text",
      "password": "text"
    }
  }
]

Creates a new webhook

post

Creates a new webhook

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
typesstring[]Optional

Each element of the array represents the name of an event type.

Example: order.created
apiVersionstring · enumOptional

Indicates whether to use the current default version of the API or the latest version of the API.

Default: defaultExample: defaultPossible values:
enabledbooleanOptional

Indicates whether the webhook is enabled and receives notifications.

Default: trueExample: true
addressstringRequired

URL of the webhook endpoint on your server you have set up to receive webhook notifications. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.

Example: https://company.com
transportTypestring · enumOptionalDefault: HTTPPossible values:
Responses
201

201 Created

application/json
post
/webhooks
POST /webhooks HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 307

{
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com",
  "transportType": "HTTP",
  "oauth": {
    "tokenEndPoint": "text",
    "userName": "text",
    "password": "text",
    "clientID": "text",
    "clientSecret": "text",
    "grantType": "password"
  },
  "authentication": {
    "username": "text",
    "password": "text"
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 1000000,
    "year": 2018,
    "monthValue": 8,
    "dayOfMonth": 29,
    "hour": 9,
    "minute": 12,
    "second": 33,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 241,
    "month": "AUGUST"
  },
  "updatedTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 1000000,
    "year": 2018,
    "monthValue": 8,
    "dayOfMonth": 29,
    "hour": 9,
    "minute": 12,
    "second": 33,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 241,
    "month": "AUGUST"
  },
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com",
  "transportType": "HTTP",
  "oauth": {
    "tokenEndPoint": "text",
    "userName": "text",
    "password": "text",
    "clientID": "text",
    "clientSecret": "text",
    "grantType": "password"
  },
  "authentication": {
    "username": "text",
    "password": "text"
  }
}

Gets a webhook endpoint by ID.

get

Retrieves the details of a webhook endpoint. Supply the unique identifier of the webhook endpoint.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Webhook ID

Responses
get
/webhooks/{id}
GET /webhooks/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 1000000,
    "year": 2018,
    "monthValue": 8,
    "dayOfMonth": 29,
    "hour": 9,
    "minute": 12,
    "second": 33,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 241,
    "month": "AUGUST"
  },
  "updatedTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 1000000,
    "year": 2018,
    "monthValue": 8,
    "dayOfMonth": 29,
    "hour": 9,
    "minute": 12,
    "second": 33,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 241,
    "month": "AUGUST"
  },
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com",
  "transportType": "HTTP",
  "oauth": {
    "tokenEndPoint": "text",
    "userName": "text",
    "password": "text",
    "clientID": "text",
    "clientSecret": "text",
    "grantType": "password"
  },
  "authentication": {
    "username": "text",
    "password": "text"
  }
}

Deletes a webhook endpoint by ID.

delete

Permanently deletes a webhook endpoint. Supply the unique identifier of the webhook.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Webhook ID

Responses
delete
/webhooks/{id}
DELETE /webhooks/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Updates an existing webhook endpoint

patch

Updates a existing webhook endpoint.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Webhook ID.

Body
typesstring[]Optional

The name of the event type.

Example: order.created
apiVersionstring · enumOptional

Indicates whether to use the current default version of the API or the latest version of the API

Default: defaultExample: defaultPossible values:
enabledbooleanOptional

Indicate that webhook is enabled and receives notifications or is not enabled and does not receive notifications

Default: trueExample: true
addressstringOptional

URL of the webhook endpoint on your server you have set up to receive webhook notifications. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.

Example: https://company.com
transportTypestring · enumOptionalDefault: HTTPPossible values:
Responses
patch
/webhooks/{id}
PATCH /webhooks/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 307

{
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com",
  "transportType": "HTTP",
  "oauth": {
    "tokenEndPoint": "text",
    "userName": "text",
    "password": "text",
    "clientID": "text",
    "clientSecret": "text",
    "grantType": "password"
  },
  "authentication": {
    "username": "text",
    "password": "text"
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 1000000,
    "year": 2018,
    "monthValue": 8,
    "dayOfMonth": 29,
    "hour": 9,
    "minute": 12,
    "second": 33,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 241,
    "month": "AUGUST"
  },
  "updatedTime": {
    "offset": {
      "totalSeconds": 0,
      "id": "Z",
      "rules": {
        "fixedOffset": true,
        "transitions": [],
        "transitionRules": []
      }
    },
    "nano": 1000000,
    "year": 2018,
    "monthValue": 8,
    "dayOfMonth": 29,
    "hour": 9,
    "minute": 12,
    "second": 33,
    "dayOfWeek": "WEDNESDAY",
    "dayOfYear": 241,
    "month": "AUGUST"
  },
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com",
  "transportType": "HTTP",
  "oauth": {
    "tokenEndPoint": "text",
    "userName": "text",
    "password": "text",
    "clientID": "text",
    "clientSecret": "text",
    "grantType": "password"
  },
  "authentication": {
    "username": "text",
    "password": "text"
  }
}

Last updated