aid_source_hooks_hid_ping_post
curl --request POST \
--url https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping")
.header("Authorization", "Bearer <token>")
.asString();{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}Webhooks
Subscription ping
This will trigger a ping event to be sent to the subscription URL.
Ping Event Payload
POST /
User-Agent: Dintero-Hook/0c9ad03b
Content-Type: application/json
event: ping
event-delivery: cfedde7e-b088-415e-ad5b-cbe54acbb6f9
{
"created_at": "2017-12-06T15:36:43Z",
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"id": "string",
"updated_at": "2017-12-06T15:36:43Z",
"active": true,
"config": {
"content_type": "application/json",
"insecure_ssl": 0,
"secret": { ... }
"url": "string"
},
"events": ["receipt_add"]
}
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
hooks
/
subscriptions
/
{hid}
/
ping
aid_source_hooks_hid_ping_post
curl --request POST \
--url https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dintero.com/v1/accounts/{aid}/hooks/subscriptions/{hid}/ping")
.header("Authorization", "Bearer <token>")
.asString();{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}Authorizations
Bearer authentication (token authentication) should be used for accessing the API.
Use Get Token to get an access token for client credentials. Pass the token in the request header:
Authorization: Bearer {access_token}
where the access_token is JSON Web Tokens (JWT).
Path Parameters
An id that uniquely identifies the account.
Required string length:
9subscription id
Response
No Content