All URIs are relative to https://api.api2cart.local.com/v1.1
| Method | HTTP request | Description |
|---|---|---|
| webhookCount | GET /webhook.count.json | webhook.count |
| webhookCreate | POST /webhook.create.json | webhook.create |
| webhookDelete | DELETE /webhook.delete.json | webhook.delete |
| webhookEvents | GET /webhook.events.json | webhook.events |
| webhookList | GET /webhook.list.json | webhook.list |
| webhookUpdate | PUT /webhook.update.json | webhook.update |
open class func webhookCount(entity: String? = nil, action: String? = nil, active: Bool? = nil, completion: @escaping (_ data: WebhookCount200Response?, _ error: Error?) -> Void)webhook.count
Count registered webhooks on the store.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let entity = "entity_example" // String | The entity you want to filter webhooks by (e.g. order or product) (optional)
let action = "action_example" // String | The action you want to filter webhooks by (e.g. order or product) (optional)
let active = true // Bool | The webhook status you want to filter webhooks by (optional)
// webhook.count
WebhookAPI.webhookCount(entity: entity, action: action, active: active) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| entity | String | The entity you want to filter webhooks by (e.g. order or product) | [optional] |
| action | String | The action you want to filter webhooks by (e.g. order or product) | [optional] |
| active | Bool | The webhook status you want to filter webhooks by | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func webhookCreate(webhookCreate: WebhookCreate, completion: @escaping (_ data: BasketLiveShippingServiceCreate200Response?, _ error: Error?) -> Void)webhook.create
Create webhook on the store and subscribe to it.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let webhookCreate = WebhookCreate(entity: "entity_example", action: "action_example", callback: "callback_example", label: "label_example", fields: "fields_example", responseFields: "responseFields_example", active: true, langId: "langId_example", storeId: "storeId_example", filteringConditions: ParamDefinition_FilteringConditions_FilterCondition(and: [123], or: [123], not: 123, field: "field_example", _operator: "_operator_example", value: ParamDefinition_FilteringConditions_FilterRule_value()), idempotencyKey: "idempotencyKey_example") // WebhookCreate |
// webhook.create
WebhookAPI.webhookCreate(webhookCreate: webhookCreate) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| webhookCreate | WebhookCreate |
BasketLiveShippingServiceCreate200Response
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func webhookDelete(id: String, completion: @escaping (_ data: AttributeDelete200Response?, _ error: Error?) -> Void)webhook.delete
Delete registered webhook on the store.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let id = "id_example" // String | Webhook id
// webhook.delete
WebhookAPI.webhookDelete(id: id) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Webhook id |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func webhookEvents(completion: @escaping (_ data: WebhookEvents200Response?, _ error: Error?) -> Void)webhook.events
List all Webhooks that are available on this store.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
// webhook.events
WebhookAPI.webhookEvents() { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func webhookList(start: Int? = nil, count: Int? = nil, entity: String? = nil, action: String? = nil, active: Bool? = nil, ids: String? = nil, params: String? = nil, completion: @escaping (_ data: WebhookList200Response?, _ error: Error?) -> Void)webhook.list
List registered webhook on the store.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let start = 987 // Int | This parameter sets the number from which you want to get entities (optional) (default to 0)
let count = 987 // Int | This parameter sets the entity amount that has to be retrieved. Max allowed count=250 (optional) (default to 10)
let entity = "entity_example" // String | The entity you want to filter webhooks by (e.g. order or product) (optional)
let action = "action_example" // String | The action you want to filter webhooks by (e.g. add, update, or delete) (optional)
let active = true // Bool | The webhook status you want to filter webhooks by (optional)
let ids = "ids_example" // String | List of сomma-separated webhook ids (optional)
let params = "params_example" // String | Set this parameter in order to choose which entity fields you want to retrieve (optional) (default to "id,entity,action,callback")
// webhook.list
WebhookAPI.webhookList(start: start, count: count, entity: entity, action: action, active: active, ids: ids, params: params) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| start | Int | This parameter sets the number from which you want to get entities | [optional] [default to 0] |
| count | Int | This parameter sets the entity amount that has to be retrieved. Max allowed count=250 | [optional] [default to 10] |
| entity | String | The entity you want to filter webhooks by (e.g. order or product) | [optional] |
| action | String | The action you want to filter webhooks by (e.g. add, update, or delete) | [optional] |
| active | Bool | The webhook status you want to filter webhooks by | [optional] |
| ids | String | List of сomma-separated webhook ids | [optional] |
| params | String | Set this parameter in order to choose which entity fields you want to retrieve | [optional] [default to "id,entity,action,callback"] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func webhookUpdate(webhookUpdate: WebhookUpdate, completion: @escaping (_ data: ProductImageUpdate200Response?, _ error: Error?) -> Void)webhook.update
Update Webhooks parameters.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let webhookUpdate = WebhookUpdate(id: "id_example", callback: "callback_example", label: "label_example", fields: "fields_example", responseFields: "responseFields_example", active: true, langId: "langId_example", filteringConditions: ParamDefinition_FilteringConditions_FilterCondition(and: [123], or: [123], not: 123, field: "field_example", _operator: "_operator_example", value: ParamDefinition_FilteringConditions_FilterRule_value()), idempotencyKey: "idempotencyKey_example") // WebhookUpdate |
// webhook.update
WebhookAPI.webhookUpdate(webhookUpdate: webhookUpdate) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| webhookUpdate | WebhookUpdate |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]