Vendors
The vendor model
Properties
- Name
type- Type
- string
- Description
Type of Vendor
- Name
webhook_url- Type
- string
- Description
Webhook URL for the vendor.
- Name
preferences- Type
- json
- Description
Communication preferences for the vendor.
GET/v1/vendor
Get a vendor
This endpoint allows you to retrieve specific details about the vendor associated with the API credentials used in the request. Note that this endpoint only returns communication preferences and webhook configuration.
Request
GET
/v1/vendorcurl -G https://vendor.trr-apps.com/v1/vendor \
-H "Authorization: Bearer {token}" \
Response
{
"type": "Post-Sale Auth Ship",
"webhook_url": "http://example.com/webhook",
"preferences": {
"email_enabled": true,
"webhook_enabled": true
}
}
PATCH/v1/vendor
Update a vendor
This endpoint allows you to update the communication preferences and the webhook url for the vendor associated with the API credentials used in the request.
Optional attributes
- Name
webhook_enabled- Type
- boolean
- Description
Enable or disable webhook notifications.
- Name
webhook_url- Type
- string
- Description
The URL where webhook notifications will be sent.
When enabling webhooks, make sure to provide a valid webhook_url that can handle the webhook notifications as described in the Notifications section.
Request
PATCH
/v1/vendorcurl -X PATCH https://vendor.trr-apps.com/v1/vendor \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"webhook_url": "https://your-endpoint.com/webhooks",
"webhook_enabled": true
}'
200 Response
{}

