Send a test event
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "ping"
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'ping'})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/test"
payload = { "type": "ping" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "webhook_test",
"event_id": "<string>",
"type": "<string>",
"succeeded": true,
"response_status": 123,
"response_body": "<string>",
"error": "<string>",
"duration_ms": 123
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Webhook endpoints
Send a test event
Sends one event straight away with a sample payload. Pass type to send any event type; the default is ping.
Requires the webhooks:write scope.
POST
/
webhook_endpoints
/
{endpointId}
/
test
Send a test event
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "ping"
}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'ping'})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/webhook_endpoints/{endpointId}/test"
payload = { "type": "ping" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "webhook_test",
"event_id": "<string>",
"type": "<string>",
"succeeded": true,
"response_status": 123,
"response_body": "<string>",
"error": "<string>",
"duration_ms": 123
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Your fleet API key, e.g. Authorization: Bearer cxk_live_…. Create keys in the fleet portal under Developers.
Path Parameters
Body
application/json
Available options:
ping, session.started, session.start_failed, session.completed, session.stopped_by_limit, wallet.funded, wallet.funding_failed, wallet.low_balance, invoice.created, invoice.paid, driver.created, driver.updated, driver.removed, vehicle.created, vehicle.updated, vehicle.retired, invitation.accepted, limit.updated, limit.reached 
