v1

latestOpenAPI 3.0.12026-07-24310590875.6 KB
subscriptions

Generate a test event notification

Generate a new test event notification. After you create a subscription, use this endpoint for BILL to send a test event notification to your specified notification URL.

In your request, all the fields are optional. To see specific information in the test event notification, you can set eventType, version, and any details. You can get the BILL events catalog with GET /v3/events/catalog.

Note: All the fields in the test event notification are test values. You cannot use any of the test values for any other operation.

See Webhooks in the Guides section for more information, sample requests, and notification payloads for BILL events.

post/v3/subscriptions/{subscriptionId}/test

Path parameters

subscriptionIdstring required

BILL-generated ID of the subscription

Example:{{webhook_subscription_id}}

Headers

sessionIdstring nullable

API session ID generated with /v3/login

Example:{{session_id}}
devKeystring nullable

Developer key sent to you by BILL when you create a developer account. Set sessionId and devKey for organization-level BILL v3 API webhook events.

Example:{{developer_key}}
appKeystring nullable

Application key sent to you by BILL when you create a partner account. Set sessionId and appKey for partner-level BILL v3 API webhook events.

Example:{{app_key}}
apiTokenstring nullable

Access token for Spend & Expense API authentication. Set apiToken for Spend & Expense webhook events.

Example:{{api_token}}

Request body

eventTypestring

Event type. You can get the BILL events catalog with GET /v3/events/catalog.

versionstring

Event type version

Example request

{
  "eventType": "bill.created",
  "version": "1",
  "bill": {
    "id": "test-bill-id",
    "vendorId": "test-vendor-id",
    "amount": 100
  }
}

Response

sendTestEvent 200 response

idstring

BILL-generated ID of the event

typestring

Event type

versionstring

Event type version

subscriptionIdstring

BILL-generated ID of the subscription

payloadstring

Event payload. The payload is JSON escaped and presented as a string.

createdTimestring date-time

Event created date and time

statusCodeinteger

HTTP status code received from the notification URL