GOCheap Developers

Sửa webhook

PATCH
/webhooks/{webhook_id}

Authorization

ApiKeyAuth
headerAuthorization<token>

Authorization: ApiKey <key>. Key sandbox bắt đầu bằng gc_test_, production bằng gc_live_. Key chỉ hiện một lần lúc tạo. Không dùng key trong app di động hay trình duyệt.

Path Parameters

webhook_id*string

Request Body

application/json
  1. body
Properties1 <= properties
title?string
Lengthlength <= 100
url?string
Formaturi
events?array<>
Items1 <= items
headers?array<>
Itemsitems <= 10
is_active?boolean

Response Body

OK

application/json
  1. response
success*boolean
data*
Example Request
curl -X PATCH 'https://api-stag.gocheap.vn/open-api/v1/webhooks/string' \  -H 'Content-Type: application/json' \  -d '{  "is_active": false}'
Example Response
{  "success": true,  "data": {    "id": "string",    "title": "string",    "url": "http://example.com",    "events": [      "booking.created"    ],    "headers": [      {        "key": "string",        "value": "string"      }    ],    "is_active": true,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}