|
| 1 | +# BuiltByBitApi.ResourcesCreatorCouponsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.builtbybit.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**getV2ResourcesCreatorCoupons**](ResourcesCreatorCouponsApi.md#getV2ResourcesCreatorCoupons) | **GET** /v2/resources/creator/coupons | Fetch a list of your coupons |
| 8 | +[**getV2ResourcesCreatorCouponsEntries**](ResourcesCreatorCouponsApi.md#getV2ResourcesCreatorCouponsEntries) | **GET** /v2/resources/creator/coupons/entries | Fetch a list of your coupon entries |
| 9 | +[**postV2ResourcesCreatorCoupons**](ResourcesCreatorCouponsApi.md#postV2ResourcesCreatorCoupons) | **POST** /v2/resources/creator/coupons | Create a new coupon |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +## getV2ResourcesCreatorCoupons |
| 14 | + |
| 15 | +> GetV2ResourcesCreatorCoupons200Response getV2ResourcesCreatorCoupons(opts) |
| 16 | +
|
| 17 | +Fetch a list of your coupons |
| 18 | + |
| 19 | +### Example |
| 20 | + |
| 21 | +```javascript |
| 22 | +import BuiltByBitApi from 'built_by_bit_api'; |
| 23 | +let defaultClient = BuiltByBitApi.ApiClient.instance; |
| 24 | +// Configure API key authorization: token |
| 25 | +let token = defaultClient.authentications['token']; |
| 26 | +token.apiKey = 'YOUR API KEY'; |
| 27 | +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 28 | +//token.apiKeyPrefix = 'Token'; |
| 29 | + |
| 30 | +let apiInstance = new BuiltByBitApi.ResourcesCreatorCouponsApi(); |
| 31 | +let opts = { |
| 32 | + 'couponIds': null // Array | A comma-separated list of coupon IDs to filter on. No filter is applied if empty. |
| 33 | +}; |
| 34 | +apiInstance.getV2ResourcesCreatorCoupons(opts, (error, data, response) => { |
| 35 | + if (error) { |
| 36 | + console.error(error); |
| 37 | + } else { |
| 38 | + console.log('API called successfully. Returned data: ' + data); |
| 39 | + } |
| 40 | +}); |
| 41 | +``` |
| 42 | + |
| 43 | +### Parameters |
| 44 | + |
| 45 | + |
| 46 | +Name | Type | Description | Notes |
| 47 | +------------- | ------------- | ------------- | ------------- |
| 48 | + **couponIds** | [**Array**](.md)| A comma-separated list of coupon IDs to filter on. No filter is applied if empty. | [optional] |
| 49 | + |
| 50 | +### Return type |
| 51 | + |
| 52 | +[**GetV2ResourcesCreatorCoupons200Response**](GetV2ResourcesCreatorCoupons200Response.md) |
| 53 | + |
| 54 | +### Authorization |
| 55 | + |
| 56 | +[token](../README.md#token) |
| 57 | + |
| 58 | +### HTTP request headers |
| 59 | + |
| 60 | +- **Content-Type**: Not defined |
| 61 | +- **Accept**: application/json |
| 62 | + |
| 63 | + |
| 64 | +## getV2ResourcesCreatorCouponsEntries |
| 65 | + |
| 66 | +> GetV2ResourcesCreatorCouponsEntries200Response getV2ResourcesCreatorCouponsEntries(opts) |
| 67 | +
|
| 68 | +Fetch a list of your coupon entries |
| 69 | + |
| 70 | +### Example |
| 71 | + |
| 72 | +```javascript |
| 73 | +import BuiltByBitApi from 'built_by_bit_api'; |
| 74 | +let defaultClient = BuiltByBitApi.ApiClient.instance; |
| 75 | +// Configure API key authorization: token |
| 76 | +let token = defaultClient.authentications['token']; |
| 77 | +token.apiKey = 'YOUR API KEY'; |
| 78 | +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 79 | +//token.apiKeyPrefix = 'Token'; |
| 80 | + |
| 81 | +let apiInstance = new BuiltByBitApi.ResourcesCreatorCouponsApi(); |
| 82 | +let opts = { |
| 83 | + 'couponIds': null // Array | A comma-separated list of coupon IDs to filter on. No filter is applied if empty. |
| 84 | +}; |
| 85 | +apiInstance.getV2ResourcesCreatorCouponsEntries(opts, (error, data, response) => { |
| 86 | + if (error) { |
| 87 | + console.error(error); |
| 88 | + } else { |
| 89 | + console.log('API called successfully. Returned data: ' + data); |
| 90 | + } |
| 91 | +}); |
| 92 | +``` |
| 93 | + |
| 94 | +### Parameters |
| 95 | + |
| 96 | + |
| 97 | +Name | Type | Description | Notes |
| 98 | +------------- | ------------- | ------------- | ------------- |
| 99 | + **couponIds** | [**Array**](.md)| A comma-separated list of coupon IDs to filter on. No filter is applied if empty. | [optional] |
| 100 | + |
| 101 | +### Return type |
| 102 | + |
| 103 | +[**GetV2ResourcesCreatorCouponsEntries200Response**](GetV2ResourcesCreatorCouponsEntries200Response.md) |
| 104 | + |
| 105 | +### Authorization |
| 106 | + |
| 107 | +[token](../README.md#token) |
| 108 | + |
| 109 | +### HTTP request headers |
| 110 | + |
| 111 | +- **Content-Type**: Not defined |
| 112 | +- **Accept**: application/json |
| 113 | + |
| 114 | + |
| 115 | +## postV2ResourcesCreatorCoupons |
| 116 | + |
| 117 | +> PostV2ResourcesCreatorCoupons200Response postV2ResourcesCreatorCoupons(opts) |
| 118 | +
|
| 119 | +Create a new coupon |
| 120 | + |
| 121 | +This endpoint is currently limited to percent-based coupons with a maximum discount of 50%. |
| 122 | + |
| 123 | +### Example |
| 124 | + |
| 125 | +```javascript |
| 126 | +import BuiltByBitApi from 'built_by_bit_api'; |
| 127 | +let defaultClient = BuiltByBitApi.ApiClient.instance; |
| 128 | +// Configure API key authorization: token |
| 129 | +let token = defaultClient.authentications['token']; |
| 130 | +token.apiKey = 'YOUR API KEY'; |
| 131 | +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) |
| 132 | +//token.apiKeyPrefix = 'Token'; |
| 133 | + |
| 134 | +let apiInstance = new BuiltByBitApi.ResourcesCreatorCouponsApi(); |
| 135 | +let opts = { |
| 136 | + 'postV2ResourcesCreatorCouponsRequest': new BuiltByBitApi.PostV2ResourcesCreatorCouponsRequest() // PostV2ResourcesCreatorCouponsRequest | |
| 137 | +}; |
| 138 | +apiInstance.postV2ResourcesCreatorCoupons(opts, (error, data, response) => { |
| 139 | + if (error) { |
| 140 | + console.error(error); |
| 141 | + } else { |
| 142 | + console.log('API called successfully. Returned data: ' + data); |
| 143 | + } |
| 144 | +}); |
| 145 | +``` |
| 146 | + |
| 147 | +### Parameters |
| 148 | + |
| 149 | + |
| 150 | +Name | Type | Description | Notes |
| 151 | +------------- | ------------- | ------------- | ------------- |
| 152 | + **postV2ResourcesCreatorCouponsRequest** | [**PostV2ResourcesCreatorCouponsRequest**](PostV2ResourcesCreatorCouponsRequest.md)| | [optional] |
| 153 | + |
| 154 | +### Return type |
| 155 | + |
| 156 | +[**PostV2ResourcesCreatorCoupons200Response**](PostV2ResourcesCreatorCoupons200Response.md) |
| 157 | + |
| 158 | +### Authorization |
| 159 | + |
| 160 | +[token](../README.md#token) |
| 161 | + |
| 162 | +### HTTP request headers |
| 163 | + |
| 164 | +- **Content-Type**: application/json |
| 165 | +- **Accept**: application/json |
| 166 | + |
0 commit comments