hostinger-api-sdk 3.4.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api.ts +869 -268
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +505 -96
- package/dist/api.js +551 -173
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +505 -96
- package/dist/esm/api.js +534 -160
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/EcommerceV1WebhookStoreRequest.md +24 -0
- package/docs/EcommerceV1WebhookUpdateRequest.md +26 -0
- package/docs/EcommerceV1WebhookWebhookCreationResource.md +22 -0
- package/docs/EcommerceV1WebhookWebhookEndpointResource.md +44 -0
- package/docs/EcommerceV1WebhookWebhookListResource.md +20 -0
- package/docs/{VPSV1PublicKeyAttachRequest.md → EcommerceV1WebhookWebhookResource.md} +5 -5
- package/docs/EcommerceV1WebhookWebhookSecretResource.md +22 -0
- package/docs/EcommerceWebhooksApi.md +362 -0
- package/docs/VPSPublicKeysApi.md +0 -59
- package/docs/VPSVirtualMachineApi.md +0 -57
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/3.4.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/3.4.3" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 3.4.
|
|
6
|
+
* API Version: 3.4.3
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 3.4.
|
|
4
|
+
* API Version: 3.4.3
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 3.4.
|
|
7
|
+
* API Version: 3.4.3
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# EcommerceV1WebhookStoreRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**url** | **string** | HTTPS receiver on port 443, without credentials or a fragment. Must be a public destination: localhost, single-label and local-network names (.local, .home.arpa, .internal), Hostinger service domains and loopback, private, link-local or reserved IP addresses are rejected. Merchant-owned domains hosted by Hostinger are allowed. | [default to undefined]
|
|
9
|
+
**events** | **Array<string>** | Event types to subscribe to. - `order.placed`: a customer places an order, before any online payment is completed. Orders paid online may not have an order number yet. - `order.paid`: an order becomes fully paid: an online payment is captured, a free order is placed or the merchant marks it as paid. Partial payments don\'t send it. - `order.cancelled`: an unpaid order is canceled, for example by the merchant, a connected sales channel or after a delayed payment fails. Paid orders can\'t be canceled, so a cancellation never involves a refund. - `order.refunded`: each time a full or partial refund is recorded, through the payment provider or manually. - `order.fulfilled`: a fulfillment leaves every item in the order fulfilled. Partial fulfillments send `fulfillment.created` instead. - `fulfillment.created`: each time items in an order are fulfilled, including partial fulfillments and digital items fulfilled automatically after payment. - `fulfillment.updated`: a fulfillment\'s tracking details change, or a connected shipping service or sales channel reports progress such as delivery. - `fulfillment.cancelled`: a fulfillment is canceled before it ships, for example when it is canceled or its shipping label is voided. - `product.created`: a product is added to the store, including drafts and products created in bulk. - `product.updated`: a product changes, including its details, variants, prices, stock, visibility or collections. Stock changes from orders also send it, so expect frequent events. - `product.deleted`: a product is deleted, individually or in bulk. | [default to undefined]
|
|
10
|
+
**sales_channel_ids** | **Array<string>** | Omit for store-wide delivery. IDs must belong to this store; empty arrays are invalid. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { EcommerceV1WebhookStoreRequest } from '@hostinger/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: EcommerceV1WebhookStoreRequest = {
|
|
18
|
+
url,
|
|
19
|
+
events,
|
|
20
|
+
sales_channel_ids,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# EcommerceV1WebhookUpdateRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**url** | **string** | HTTPS receiver on port 443, without credentials or a fragment. Omit to preserve. A changed URL must be a public destination under the same rules as creation; resending the saved URL unchanged is accepted. | [optional] [default to undefined]
|
|
9
|
+
**events** | **Array<string>** | Replacement event types. Omit to preserve. - `order.placed`: a customer places an order, before any online payment is completed. Orders paid online may not have an order number yet. - `order.paid`: an order becomes fully paid: an online payment is captured, a free order is placed or the merchant marks it as paid. Partial payments don\'t send it. - `order.cancelled`: an unpaid order is canceled, for example by the merchant, a connected sales channel or after a delayed payment fails. Paid orders can\'t be canceled, so a cancellation never involves a refund. - `order.refunded`: each time a full or partial refund is recorded, through the payment provider or manually. - `order.fulfilled`: a fulfillment leaves every item in the order fulfilled. Partial fulfillments send `fulfillment.created` instead. - `fulfillment.created`: each time items in an order are fulfilled, including partial fulfillments and digital items fulfilled automatically after payment. - `fulfillment.updated`: a fulfillment\'s tracking details change, or a connected shipping service or sales channel reports progress such as delivery. - `fulfillment.cancelled`: a fulfillment is canceled before it ships, for example when it is canceled or its shipping label is voided. - `product.created`: a product is added to the store, including drafts and products created in bulk. - `product.updated`: a product changes, including its details, variants, prices, stock, visibility or collections. Stock changes from orders also send it, so expect frequent events. - `product.deleted`: a product is deleted, individually or in bulk. | [optional] [default to undefined]
|
|
10
|
+
**sales_channel_ids** | **Array<string>** | Omit to preserve; null restores store-wide delivery. Empty or foreign-store IDs are invalid. | [optional] [default to undefined]
|
|
11
|
+
**enabled** | **boolean** | Merchant-disabled endpoints can be enabled again; lifecycle-revoked endpoints cannot. | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { EcommerceV1WebhookUpdateRequest } from '@hostinger/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: EcommerceV1WebhookUpdateRequest = {
|
|
19
|
+
url,
|
|
20
|
+
events,
|
|
21
|
+
sales_channel_ids,
|
|
22
|
+
enabled,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# EcommerceV1WebhookWebhookCreationResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**endpoint** | [**EcommerceV1WebhookWebhookEndpointResource**](EcommerceV1WebhookWebhookEndpointResource.md) | | [default to undefined]
|
|
9
|
+
**secret** | **string** | New whsec_ signing secret. Save securely. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { EcommerceV1WebhookWebhookCreationResource } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: EcommerceV1WebhookWebhookCreationResource = {
|
|
17
|
+
endpoint,
|
|
18
|
+
secret,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# EcommerceV1WebhookWebhookEndpointResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Webhook endpoint ID. | [default to undefined]
|
|
9
|
+
**store_id** | **string** | Owning store ID. | [default to undefined]
|
|
10
|
+
**url** | **string** | HTTPS receiver URL. | [default to undefined]
|
|
11
|
+
**events** | **Array<string>** | Subscribed event types. - `order.placed`: a customer places an order, before any online payment is completed. Orders paid online may not have an order number yet. - `order.paid`: an order becomes fully paid: an online payment is captured, a free order is placed or the merchant marks it as paid. Partial payments don\'t send it. - `order.cancelled`: an unpaid order is canceled, for example by the merchant, a connected sales channel or after a delayed payment fails. Paid orders can\'t be canceled, so a cancellation never involves a refund. - `order.refunded`: each time a full or partial refund is recorded, through the payment provider or manually. - `order.fulfilled`: a fulfillment leaves every item in the order fulfilled. Partial fulfillments send `fulfillment.created` instead. - `fulfillment.created`: each time items in an order are fulfilled, including partial fulfillments and digital items fulfilled automatically after payment. - `fulfillment.updated`: a fulfillment\'s tracking details change, or a connected shipping service or sales channel reports progress such as delivery. - `fulfillment.cancelled`: a fulfillment is canceled before it ships, for example when it is canceled or its shipping label is voided. - `product.created`: a product is added to the store, including drafts and products created in bulk. - `product.updated`: a product changes, including its details, variants, prices, stock, visibility or collections. Stock changes from orders also send it, so expect frequent events. - `product.deleted`: a product is deleted, individually or in bulk. | [default to undefined]
|
|
12
|
+
**sales_channel_ids** | **Array<string>** | Channel filter; null means store-wide. | [default to undefined]
|
|
13
|
+
**enabled** | **boolean** | Whether delivery is enabled. | [default to undefined]
|
|
14
|
+
**disabled_reason** | **string** | Reason delivery was disabled. receiver_gone and receiver_failing are automatic health disables that can be resumed with enabled: true; store_* reasons are permanent revocations. | [default to undefined]
|
|
15
|
+
**disabled_at** | **string** | | [default to undefined]
|
|
16
|
+
**failing_since** | **string** | Start of the current failure streak; null after a successful delivery attempt, a URL change or re-enabling. | [default to undefined]
|
|
17
|
+
**last_attempted_at** | **string** | When the latest delivery attempt started, whether or not it reached the receiver; null before any attempt. | [default to undefined]
|
|
18
|
+
**last_succeeded_at** | **string** | When the latest successful delivery completed; null before any success. | [default to undefined]
|
|
19
|
+
**created_at** | **string** | | [default to undefined]
|
|
20
|
+
**updated_at** | **string** | | [default to undefined]
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { EcommerceV1WebhookWebhookEndpointResource } from '@hostinger/sdk';
|
|
26
|
+
|
|
27
|
+
const instance: EcommerceV1WebhookWebhookEndpointResource = {
|
|
28
|
+
id,
|
|
29
|
+
store_id,
|
|
30
|
+
url,
|
|
31
|
+
events,
|
|
32
|
+
sales_channel_ids,
|
|
33
|
+
enabled,
|
|
34
|
+
disabled_reason,
|
|
35
|
+
disabled_at,
|
|
36
|
+
failing_since,
|
|
37
|
+
last_attempted_at,
|
|
38
|
+
last_succeeded_at,
|
|
39
|
+
created_at,
|
|
40
|
+
updated_at,
|
|
41
|
+
};
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# EcommerceV1WebhookWebhookListResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**endpoints** | [**Array<EcommerceV1WebhookWebhookEndpointResource>**](EcommerceV1WebhookWebhookEndpointResource.md) | | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { EcommerceV1WebhookWebhookListResource } from '@hostinger/sdk';
|
|
14
|
+
|
|
15
|
+
const instance: EcommerceV1WebhookWebhookListResource = {
|
|
16
|
+
endpoints,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# EcommerceV1WebhookWebhookResource
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**
|
|
8
|
+
**endpoint** | [**EcommerceV1WebhookWebhookEndpointResource**](EcommerceV1WebhookWebhookEndpointResource.md) | | [default to undefined]
|
|
9
9
|
|
|
10
10
|
## Example
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
13
|
+
import { EcommerceV1WebhookWebhookResource } from '@hostinger/sdk';
|
|
14
14
|
|
|
15
|
-
const instance:
|
|
16
|
-
|
|
15
|
+
const instance: EcommerceV1WebhookWebhookResource = {
|
|
16
|
+
endpoint,
|
|
17
17
|
};
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# EcommerceV1WebhookWebhookSecretResource
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**endpoint** | [**EcommerceV1WebhookWebhookEndpointResource**](EcommerceV1WebhookWebhookEndpointResource.md) | | [default to undefined]
|
|
9
|
+
**secret** | **string** | New whsec_ signing secret, returned only on create or rotation. Save securely. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { EcommerceV1WebhookWebhookSecretResource } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: EcommerceV1WebhookWebhookSecretResource = {
|
|
17
|
+
endpoint,
|
|
18
|
+
secret,
|
|
19
|
+
};
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
# EcommerceWebhooksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://developers.hostinger.com*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**createAnEcommerceWebhookV1**](#createanecommercewebhookv1) | **POST** /api/ecommerce/v1/stores/{store_id}/webhooks | Create an ecommerce webhook|
|
|
8
|
+
|[**deleteAnEcommerceWebhookV1**](#deleteanecommercewebhookv1) | **DELETE** /api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id} | Delete an ecommerce webhook|
|
|
9
|
+
|[**getAnEcommerceWebhookV1**](#getanecommercewebhookv1) | **GET** /api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id} | Get an ecommerce webhook|
|
|
10
|
+
|[**listEcommerceWebhooksV1**](#listecommercewebhooksv1) | **GET** /api/ecommerce/v1/stores/{store_id}/webhooks | List ecommerce webhooks|
|
|
11
|
+
|[**rotateAnEcommerceWebhookSecretV1**](#rotateanecommercewebhooksecretv1) | **POST** /api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id}/rotate-secret | Rotate an ecommerce webhook secret|
|
|
12
|
+
|[**updateAnEcommerceWebhookV1**](#updateanecommercewebhookv1) | **PATCH** /api/ecommerce/v1/stores/{store_id}/webhooks/{endpoint_id} | Update an ecommerce webhook|
|
|
13
|
+
|
|
14
|
+
# **createAnEcommerceWebhookV1**
|
|
15
|
+
> EcommerceV1WebhookWebhookCreationResource createAnEcommerceWebhookV1(ecommerceV1WebhookStoreRequest)
|
|
16
|
+
|
|
17
|
+
Create an enabled subscription for your store to receive ecommerce events in external automation systems. Save the whsec_ signing secret securely; it is returned once. Up to ten endpoints, including disabled endpoints, may exist per store. Deliveries follow Standard Webhooks: verify the webhook-id, webhook-timestamp and webhook-signature headers against the raw body with an official Standard Webhooks library before parsing. Events can arrive out of order or more than once; deduplicate by event id. 400: the URL is not a public destination, or webhook_sales_channel_invalid (a channel ID does not belong to this store). 409 codes: webhook_endpoint_limit_reached, webhook_store_inactive, webhook_endpoint_catalog_busy (a catalog change is in progress; retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import {
|
|
23
|
+
EcommerceWebhooksApi,
|
|
24
|
+
Configuration,
|
|
25
|
+
EcommerceV1WebhookStoreRequest
|
|
26
|
+
} from '@hostinger/sdk';
|
|
27
|
+
|
|
28
|
+
const configuration = new Configuration();
|
|
29
|
+
const apiInstance = new EcommerceWebhooksApi(configuration);
|
|
30
|
+
|
|
31
|
+
let storeId: string; //ID of the store owned by your account. (default to undefined)
|
|
32
|
+
let ecommerceV1WebhookStoreRequest: EcommerceV1WebhookStoreRequest; //
|
|
33
|
+
|
|
34
|
+
const { status, data } = await apiInstance.createAnEcommerceWebhookV1(
|
|
35
|
+
storeId,
|
|
36
|
+
ecommerceV1WebhookStoreRequest
|
|
37
|
+
);
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Parameters
|
|
41
|
+
|
|
42
|
+
|Name | Type | Description | Notes|
|
|
43
|
+
|------------- | ------------- | ------------- | -------------|
|
|
44
|
+
| **ecommerceV1WebhookStoreRequest** | **EcommerceV1WebhookStoreRequest**| | |
|
|
45
|
+
| **storeId** | [**string**] | ID of the store owned by your account. | defaults to undefined|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**EcommerceV1WebhookWebhookCreationResource**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
[apiToken](../README.md#apiToken)
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: application/json
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
|**201** | Created response | - |
|
|
66
|
+
|**400** | Error response | - |
|
|
67
|
+
|**401** | Unauthenticated response | - |
|
|
68
|
+
|**409** | Conflict response. `Retry-After`, when present, is the number of seconds to wait before retrying. | * Retry-After - Seconds to wait before retrying the request <br> |
|
|
69
|
+
|**422** | Validation error response | - |
|
|
70
|
+
|**500** | Error response | - |
|
|
71
|
+
|
|
72
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
73
|
+
|
|
74
|
+
# **deleteAnEcommerceWebhookV1**
|
|
75
|
+
> CommonSuccessEmptyResource deleteAnEcommerceWebhookV1()
|
|
76
|
+
|
|
77
|
+
Delete a subscription owned by your store, retaining delivery audit records.
|
|
78
|
+
|
|
79
|
+
### Example
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import {
|
|
83
|
+
EcommerceWebhooksApi,
|
|
84
|
+
Configuration
|
|
85
|
+
} from '@hostinger/sdk';
|
|
86
|
+
|
|
87
|
+
const configuration = new Configuration();
|
|
88
|
+
const apiInstance = new EcommerceWebhooksApi(configuration);
|
|
89
|
+
|
|
90
|
+
let storeId: string; //ID of the store owned by your account. (default to undefined)
|
|
91
|
+
let endpointId: string; //Webhook endpoint ID belonging to this store. (default to undefined)
|
|
92
|
+
|
|
93
|
+
const { status, data } = await apiInstance.deleteAnEcommerceWebhookV1(
|
|
94
|
+
storeId,
|
|
95
|
+
endpointId
|
|
96
|
+
);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Parameters
|
|
100
|
+
|
|
101
|
+
|Name | Type | Description | Notes|
|
|
102
|
+
|------------- | ------------- | ------------- | -------------|
|
|
103
|
+
| **storeId** | [**string**] | ID of the store owned by your account. | defaults to undefined|
|
|
104
|
+
| **endpointId** | [**string**] | Webhook endpoint ID belonging to this store. | defaults to undefined|
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Return type
|
|
108
|
+
|
|
109
|
+
**CommonSuccessEmptyResource**
|
|
110
|
+
|
|
111
|
+
### Authorization
|
|
112
|
+
|
|
113
|
+
[apiToken](../README.md#apiToken)
|
|
114
|
+
|
|
115
|
+
### HTTP request headers
|
|
116
|
+
|
|
117
|
+
- **Content-Type**: Not defined
|
|
118
|
+
- **Accept**: application/json
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### HTTP response details
|
|
122
|
+
| Status code | Description | Response headers |
|
|
123
|
+
|-------------|-------------|------------------|
|
|
124
|
+
|**200** | Success response | - |
|
|
125
|
+
|**401** | Unauthenticated response | - |
|
|
126
|
+
|**404** | Error response | - |
|
|
127
|
+
|**500** | Error response | - |
|
|
128
|
+
|
|
129
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
130
|
+
|
|
131
|
+
# **getAnEcommerceWebhookV1**
|
|
132
|
+
> EcommerceV1WebhookWebhookResource getAnEcommerceWebhookV1()
|
|
133
|
+
|
|
134
|
+
Get a subscription owned by your store, without signing secrets.
|
|
135
|
+
|
|
136
|
+
### Example
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
import {
|
|
140
|
+
EcommerceWebhooksApi,
|
|
141
|
+
Configuration
|
|
142
|
+
} from '@hostinger/sdk';
|
|
143
|
+
|
|
144
|
+
const configuration = new Configuration();
|
|
145
|
+
const apiInstance = new EcommerceWebhooksApi(configuration);
|
|
146
|
+
|
|
147
|
+
let storeId: string; //ID of the store owned by your account. (default to undefined)
|
|
148
|
+
let endpointId: string; //Webhook endpoint ID belonging to this store. (default to undefined)
|
|
149
|
+
|
|
150
|
+
const { status, data } = await apiInstance.getAnEcommerceWebhookV1(
|
|
151
|
+
storeId,
|
|
152
|
+
endpointId
|
|
153
|
+
);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Parameters
|
|
157
|
+
|
|
158
|
+
|Name | Type | Description | Notes|
|
|
159
|
+
|------------- | ------------- | ------------- | -------------|
|
|
160
|
+
| **storeId** | [**string**] | ID of the store owned by your account. | defaults to undefined|
|
|
161
|
+
| **endpointId** | [**string**] | Webhook endpoint ID belonging to this store. | defaults to undefined|
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
### Return type
|
|
165
|
+
|
|
166
|
+
**EcommerceV1WebhookWebhookResource**
|
|
167
|
+
|
|
168
|
+
### Authorization
|
|
169
|
+
|
|
170
|
+
[apiToken](../README.md#apiToken)
|
|
171
|
+
|
|
172
|
+
### HTTP request headers
|
|
173
|
+
|
|
174
|
+
- **Content-Type**: Not defined
|
|
175
|
+
- **Accept**: application/json
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
### HTTP response details
|
|
179
|
+
| Status code | Description | Response headers |
|
|
180
|
+
|-------------|-------------|------------------|
|
|
181
|
+
|**200** | Success response | - |
|
|
182
|
+
|**401** | Unauthenticated response | - |
|
|
183
|
+
|**404** | Error response | - |
|
|
184
|
+
|**500** | Error response | - |
|
|
185
|
+
|
|
186
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
187
|
+
|
|
188
|
+
# **listEcommerceWebhooksV1**
|
|
189
|
+
> EcommerceV1WebhookWebhookListResource listEcommerceWebhooksV1()
|
|
190
|
+
|
|
191
|
+
List your store\'s subscriptions for external automation systems, without signing secrets.
|
|
192
|
+
|
|
193
|
+
### Example
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
import {
|
|
197
|
+
EcommerceWebhooksApi,
|
|
198
|
+
Configuration
|
|
199
|
+
} from '@hostinger/sdk';
|
|
200
|
+
|
|
201
|
+
const configuration = new Configuration();
|
|
202
|
+
const apiInstance = new EcommerceWebhooksApi(configuration);
|
|
203
|
+
|
|
204
|
+
let storeId: string; //ID of the store owned by your account. (default to undefined)
|
|
205
|
+
|
|
206
|
+
const { status, data } = await apiInstance.listEcommerceWebhooksV1(
|
|
207
|
+
storeId
|
|
208
|
+
);
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Parameters
|
|
212
|
+
|
|
213
|
+
|Name | Type | Description | Notes|
|
|
214
|
+
|------------- | ------------- | ------------- | -------------|
|
|
215
|
+
| **storeId** | [**string**] | ID of the store owned by your account. | defaults to undefined|
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
### Return type
|
|
219
|
+
|
|
220
|
+
**EcommerceV1WebhookWebhookListResource**
|
|
221
|
+
|
|
222
|
+
### Authorization
|
|
223
|
+
|
|
224
|
+
[apiToken](../README.md#apiToken)
|
|
225
|
+
|
|
226
|
+
### HTTP request headers
|
|
227
|
+
|
|
228
|
+
- **Content-Type**: Not defined
|
|
229
|
+
- **Accept**: application/json
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### HTTP response details
|
|
233
|
+
| Status code | Description | Response headers |
|
|
234
|
+
|-------------|-------------|------------------|
|
|
235
|
+
|**200** | Success response | - |
|
|
236
|
+
|**401** | Unauthenticated response | - |
|
|
237
|
+
|**500** | Error response | - |
|
|
238
|
+
|
|
239
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
240
|
+
|
|
241
|
+
# **rotateAnEcommerceWebhookSecretV1**
|
|
242
|
+
> EcommerceV1WebhookWebhookSecretResource rotateAnEcommerceWebhookSecretV1()
|
|
243
|
+
|
|
244
|
+
Explicitly rotate the signing secret of an enabled endpoint on an active store. Save the new secret securely. Prior secrets retain their original 24-hour overlap deadlines. Repeated calls create distinct secrets, up to five live secrets. Wait for an old secret to expire at the limit. After a lost response, explicitly rotate again; stored secrets cannot be retrieved. No daily renewal is required. 409 codes: webhook_endpoint_disabled (endpoint is disabled or revoked), webhook_store_inactive, webhook_secret_rotation_limit_reached (five live secrets). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
245
|
+
|
|
246
|
+
### Example
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
import {
|
|
250
|
+
EcommerceWebhooksApi,
|
|
251
|
+
Configuration
|
|
252
|
+
} from '@hostinger/sdk';
|
|
253
|
+
|
|
254
|
+
const configuration = new Configuration();
|
|
255
|
+
const apiInstance = new EcommerceWebhooksApi(configuration);
|
|
256
|
+
|
|
257
|
+
let storeId: string; //ID of the store owned by your account. (default to undefined)
|
|
258
|
+
let endpointId: string; //Webhook endpoint ID belonging to this store. (default to undefined)
|
|
259
|
+
|
|
260
|
+
const { status, data } = await apiInstance.rotateAnEcommerceWebhookSecretV1(
|
|
261
|
+
storeId,
|
|
262
|
+
endpointId
|
|
263
|
+
);
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Parameters
|
|
267
|
+
|
|
268
|
+
|Name | Type | Description | Notes|
|
|
269
|
+
|------------- | ------------- | ------------- | -------------|
|
|
270
|
+
| **storeId** | [**string**] | ID of the store owned by your account. | defaults to undefined|
|
|
271
|
+
| **endpointId** | [**string**] | Webhook endpoint ID belonging to this store. | defaults to undefined|
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
### Return type
|
|
275
|
+
|
|
276
|
+
**EcommerceV1WebhookWebhookSecretResource**
|
|
277
|
+
|
|
278
|
+
### Authorization
|
|
279
|
+
|
|
280
|
+
[apiToken](../README.md#apiToken)
|
|
281
|
+
|
|
282
|
+
### HTTP request headers
|
|
283
|
+
|
|
284
|
+
- **Content-Type**: Not defined
|
|
285
|
+
- **Accept**: application/json
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
### HTTP response details
|
|
289
|
+
| Status code | Description | Response headers |
|
|
290
|
+
|-------------|-------------|------------------|
|
|
291
|
+
|**200** | Success response | - |
|
|
292
|
+
|**401** | Unauthenticated response | - |
|
|
293
|
+
|**404** | Error response | - |
|
|
294
|
+
|**409** | Conflict response. `Retry-After`, when present, is the number of seconds to wait before retrying. | * Retry-After - Seconds to wait before retrying the request <br> |
|
|
295
|
+
|**500** | Error response | - |
|
|
296
|
+
|
|
297
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
298
|
+
|
|
299
|
+
# **updateAnEcommerceWebhookV1**
|
|
300
|
+
> EcommerceV1WebhookWebhookResource updateAnEcommerceWebhookV1(ecommerceV1WebhookUpdateRequest)
|
|
301
|
+
|
|
302
|
+
Change the receiver, events, channel filter or enabled state. Omitted fields are preserved; a null channel filter restores store-wide delivery. Endpoints disabled automatically after a 410 Gone (receiver_gone) or persistent delivery failures (receiver_failing) resume with enabled: true; events from the disabled period are not sent. Lifecycle-revoked endpoints cannot be enabled again: delete them and create fresh subscriptions after recovery. 400 codes: webhook_destination_not_allowed (the new URL, or the saved URL when enabling, is not a public destination), webhook_sales_channel_invalid. 409 codes: webhook_endpoint_revoked, webhook_store_inactive, webhook_endpoint_catalog_busy (retry). Errors return the upstream code in `message`, as `[Ecommerce:<code>] <reason>`.
|
|
303
|
+
|
|
304
|
+
### Example
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
import {
|
|
308
|
+
EcommerceWebhooksApi,
|
|
309
|
+
Configuration,
|
|
310
|
+
EcommerceV1WebhookUpdateRequest
|
|
311
|
+
} from '@hostinger/sdk';
|
|
312
|
+
|
|
313
|
+
const configuration = new Configuration();
|
|
314
|
+
const apiInstance = new EcommerceWebhooksApi(configuration);
|
|
315
|
+
|
|
316
|
+
let storeId: string; //ID of the store owned by your account. (default to undefined)
|
|
317
|
+
let endpointId: string; //Webhook endpoint ID belonging to this store. (default to undefined)
|
|
318
|
+
let ecommerceV1WebhookUpdateRequest: EcommerceV1WebhookUpdateRequest; //
|
|
319
|
+
|
|
320
|
+
const { status, data } = await apiInstance.updateAnEcommerceWebhookV1(
|
|
321
|
+
storeId,
|
|
322
|
+
endpointId,
|
|
323
|
+
ecommerceV1WebhookUpdateRequest
|
|
324
|
+
);
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Parameters
|
|
328
|
+
|
|
329
|
+
|Name | Type | Description | Notes|
|
|
330
|
+
|------------- | ------------- | ------------- | -------------|
|
|
331
|
+
| **ecommerceV1WebhookUpdateRequest** | **EcommerceV1WebhookUpdateRequest**| | |
|
|
332
|
+
| **storeId** | [**string**] | ID of the store owned by your account. | defaults to undefined|
|
|
333
|
+
| **endpointId** | [**string**] | Webhook endpoint ID belonging to this store. | defaults to undefined|
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
### Return type
|
|
337
|
+
|
|
338
|
+
**EcommerceV1WebhookWebhookResource**
|
|
339
|
+
|
|
340
|
+
### Authorization
|
|
341
|
+
|
|
342
|
+
[apiToken](../README.md#apiToken)
|
|
343
|
+
|
|
344
|
+
### HTTP request headers
|
|
345
|
+
|
|
346
|
+
- **Content-Type**: application/json
|
|
347
|
+
- **Accept**: application/json
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
### HTTP response details
|
|
351
|
+
| Status code | Description | Response headers |
|
|
352
|
+
|-------------|-------------|------------------|
|
|
353
|
+
|**200** | Success response | - |
|
|
354
|
+
|**400** | Error response | - |
|
|
355
|
+
|**401** | Unauthenticated response | - |
|
|
356
|
+
|**404** | Error response | - |
|
|
357
|
+
|**409** | Conflict response. `Retry-After`, when present, is the number of seconds to wait before retrying. | * Retry-After - Seconds to wait before retrying the request <br> |
|
|
358
|
+
|**422** | Validation error response | - |
|
|
359
|
+
|**500** | Error response | - |
|
|
360
|
+
|
|
361
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
362
|
+
|