Skip to content

Latest commit

 

History

History
326 lines (227 loc) · 11.5 KB

File metadata and controls

326 lines (227 loc) · 11.5 KB

WebhookAPI

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

webhookCount

    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.

Example

// 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)
    }
}

Parameters

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]

Return type

WebhookCount200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

webhookCreate

    open class func webhookCreate(webhookCreate: WebhookCreate, completion: @escaping (_ data: BasketLiveShippingServiceCreate200Response?, _ error: Error?) -> Void)

webhook.create

Create webhook on the store and subscribe to it.

Example

// 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)
    }
}

Parameters

Name Type Description Notes
webhookCreate WebhookCreate

Return type

BasketLiveShippingServiceCreate200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

webhookDelete

    open class func webhookDelete(id: String, completion: @escaping (_ data: AttributeDelete200Response?, _ error: Error?) -> Void)

webhook.delete

Delete registered webhook on the store.

Example

// 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)
    }
}

Parameters

Name Type Description Notes
id String Webhook id

Return type

AttributeDelete200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

webhookEvents

    open class func webhookEvents(completion: @escaping (_ data: WebhookEvents200Response?, _ error: Error?) -> Void)

webhook.events

List all Webhooks that are available on this store.

Example

// 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)
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookEvents200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

webhookList

    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.

Example

// 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)
    }
}

Parameters

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"]

Return type

WebhookList200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

webhookUpdate

    open class func webhookUpdate(webhookUpdate: WebhookUpdate, completion: @escaping (_ data: ProductImageUpdate200Response?, _ error: Error?) -> Void)

webhook.update

Update Webhooks parameters.

Example

// 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)
    }
}

Parameters

Name Type Description Notes
webhookUpdate WebhookUpdate

Return type

ProductImageUpdate200Response

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]