For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhooks

Resend a webhook event

post

Sends a previously delivered event again, to your current webhook URL, signed with your current signing secret and rendered in your pinned version. The payload is rebuilt from the stored event, so it carries the status the event originally announced, not the order's current status, and a fresh timestamp. The event keeps its event_id: an endpoint that dedupes on it treats the resend as the event it already processed. Delivery is asynchronous, so 202 means the event was queued, not that it arrived; find the outcome with GET /api/v1/webhook-deliveries, where the resend replaces the event's earlier outcome. A delivered event can be resent for 30 days; an older one, or one delivered before Vantage began keeping delivered events, returns 404 with code event_not_resendable. Pass dry_run=true to check that an event can be resent without sending it.

Authorizations
AuthorizationstringRequired

Authenticate with your Terra API credentials: username = your Terra dev-id, password = your Terra API key — the same credentials used for every other Terra API. The header pair dev-id + x-api-key is also accepted. Suspended credentials receive 403; accounts without the Vantage entitlement receive 403 once entitlement enforcement is enabled. Once the credential validator is configured, backfilled keys also honor current token expiry, revocation, audience and Vantage scopes. Invalid tokens receive 401, insufficient scopes 403 and an unavailable validator 503. These checks remain active when product policy is off.

Query parameters
dry_runbooleanOptional

When true, run every check and return what the operation would do, with 200, without doing it.

Default: false
Header parameters
X-Terra-Versionstring · enumOptional

The API version to serve this request in. Defaults to your account's pinned version; an account is pinned to the latest version on its first request.

Possible values:
Body
event_idstringRequired

The event_id of the delivered webhook (also its X-Terra-Trace-Id).

Example: 249956485092777984
event_typestringOptional

Optional; when set it must match the stored event's type.

Example: order.status_changed
Responses
200

dry_run=true: the event can be resent; nothing was queued.

application/json
post/api/v1/webhook-events/resend
POST /api/v1/webhook-events/resend HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "event_id": "249956485092777984",
  "event_type": "order.status_changed"
}
{
  "dry_run": true,
  "would": "text",
  "preview": {
    "event_id": "249956485092777984",
    "event_type": "order.status_changed",
    "dispatched": true
  }
}

Send a test webhook event

post

Sends a generated event of one webhook type to your current webhook URL, through the same delivery as real events: signed with X-Terra-Signature, rendered in your pinned version, and retried the same way. A generated event carries "test": true and describes no real order: every order, order item, variant and test-taker id in it is "0", and the test taker is a placeholder. It changes no order or result. Selected product enforcement delivers it only while the environment has a current Vantage grant. The response carries the latest-shape payload; the delivery is stamped with its own timestamp when sent. Pass dry_run=true to get the payload without sending it.

Authorizations
AuthorizationstringRequired

Authenticate with your Terra API credentials: username = your Terra dev-id, password = your Terra API key — the same credentials used for every other Terra API. The header pair dev-id + x-api-key is also accepted. Suspended credentials receive 403; accounts without the Vantage entitlement receive 403 once entitlement enforcement is enabled. Once the credential validator is configured, backfilled keys also honor current token expiry, revocation, audience and Vantage scopes. Invalid tokens receive 401, insufficient scopes 403 and an unavailable validator 503. These checks remain active when product policy is off.

Query parameters
dry_runbooleanOptional

When true, run every check and return what the operation would do, with 200, without doing it.

Default: false
Header parameters
X-Terra-Versionstring · enumOptional

The API version to serve this request in. Defaults to your account's pinned version; an account is pinned to the latest version on its first request.

Possible values:
Body
event_typestring · enumRequiredPossible values:
statusstringOptional

The data.status (for order.status_changed) or data.results_status (for order_item.results_status_change) the event carries, from that webhook's enum. Defaults to order.delivery_fulfilled and results.results_ready.

Example: results.results_ready
Responses
200

dry_run=true: the payload that would be sent; nothing was queued.

application/json
post/api/v1/webhook-events/generate
POST /api/v1/webhook-events/generate HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "event_type": "order.status_changed",
  "status": "results.results_ready"
}
{
  "dry_run": true,
  "would": "text",
  "preview": {
    "event_id": "333410942627700999",
    "event_type": "order_item.results_status_change",
    "dispatched": true,
    "payload": {
      "event_type": "text",
      "event_id": "249956485092777984",
      "timestamp": 1763661470,
      "test": true,
      "data": {
        "order_id": "333410942627700736",
        "status": "order.payment_processing",
        "tracking_number": "KnD3d5PMZyq5ulNcWkrq",
        "supplier_item_id": "249602021676720128"
      }
    }
  }
}

Last updated

Was this helpful?