All URIs are relative to https://secure.ultracart.com/rest/v2
Method | HTTP request | Description |
---|---|---|
DeleteWebhook | DELETE /webhook/webhooks/{webhookOid} | Delete a webhook |
DeleteWebhookByUrl | DELETE /webhook/webhooks | Delete a webhook by URL |
GetWebhookLog | GET /webhook/webhooks/{webhookOid}/logs/{requestId} | Retrieve an individual log |
GetWebhookLogSummaries | GET /webhook/webhooks/{webhookOid}/logs | Retrieve the log summaries |
GetWebhooks | GET /webhook/webhooks | Retrieve webhooks |
InsertWebhook | POST /webhook/webhooks | Add a webhook |
ResendEvent | POST /webhook/webhooks/{webhookOid}/reflow/{eventName} | Resend events to the webhook endpoint. |
UpdateWebhook | PUT /webhook/webhooks/{webhookOid} | Update a webhook |
void DeleteWebhook (int? webhookOid)
Delete a webhook
Delete a webhook on the UltraCart account.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class DeleteWebhookExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhookOid = 56; // int? | The webhook oid to delete.
try
{
// Delete a webhook
apiInstance.DeleteWebhook(webhookOid);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.DeleteWebhook: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookOid | int? | The webhook oid to delete. |
void (empty response body)
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse DeleteWebhookByUrl (Webhook webhook)
Delete a webhook by URL
Delete a webhook based upon the URL on the webhook_url matching an existing webhook.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class DeleteWebhookByUrlExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhook = new Webhook(); // Webhook | Webhook to delete
try
{
// Delete a webhook by URL
WebhookResponse result = apiInstance.DeleteWebhookByUrl(webhook);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.DeleteWebhookByUrl: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhook | Webhook | Webhook to delete |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookLogResponse GetWebhookLog (int? webhookOid, string requestId)
Retrieve an individual log
Retrieves an individual log for a webhook given the webhook oid the request id.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetWebhookLogExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhookOid = 56; // int? | The webhook oid that owns the log.
var requestId = requestId_example; // string | The request id associated with the log to view.
try
{
// Retrieve an individual log
WebhookLogResponse result = apiInstance.GetWebhookLog(webhookOid, requestId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.GetWebhookLog: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookOid | int? | The webhook oid that owns the log. | |
requestId | string | The request id associated with the log to view. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookLogSummariesResponse GetWebhookLogSummaries (int? webhookOid, int? limit = null, int? offset = null, string since = null)
Retrieve the log summaries
Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetWebhookLogSummariesExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhookOid = 56; // int? | The webhook oid to retrieve log summaries for.
var limit = 56; // int? | The maximum number of records to return on this one API call. (optional) (default to 100)
var offset = 56; // int? | Pagination of the record set. Offset is a zero based index. (optional) (default to 0)
var since = since_example; // string | Fetch log summaries that have been delivered since this date/time. (optional)
try
{
// Retrieve the log summaries
WebhookLogSummariesResponse result = apiInstance.GetWebhookLogSummaries(webhookOid, limit, offset, since);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.GetWebhookLogSummaries: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookOid | int? | The webhook oid to retrieve log summaries for. | |
limit | int? | The maximum number of records to return on this one API call. | [optional] [default to 100] |
offset | int? | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
since | string | Fetch log summaries that have been delivered since this date/time. | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhooksResponse GetWebhooks (int? limit = null, int? offset = null, string sort = null, bool? placeholders = null)
Retrieve webhooks
Retrieves the webhooks associated with this application.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class GetWebhooksExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var limit = 56; // int? | The maximum number of records to return on this one API call. (optional) (default to 100)
var offset = 56; // int? | Pagination of the record set. Offset is a zero based index. (optional) (default to 0)
var sort = sort_example; // string | The sort order of the webhooks. See documentation for examples (optional)
var placeholders = true; // bool? | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. (optional)
try
{
// Retrieve webhooks
WebhooksResponse result = apiInstance.GetWebhooks(limit, offset, sort, placeholders);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.GetWebhooks: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int? | The maximum number of records to return on this one API call. | [optional] [default to 100] |
offset | int? | Pagination of the record set. Offset is a zero based index. | [optional] [default to 0] |
sort | string | The sort order of the webhooks. See documentation for examples | [optional] |
placeholders | bool? | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse InsertWebhook (Webhook webhook, bool? placeholders = null)
Add a webhook
Adds a new webhook on the account. If you add a new webhook with the authentication_type set to basic, but do not specify the basic_username and basic_password, UltraCart will automatically generate random ones and return them. This allows your application to have simpler logic on the setup of a secure webhook.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class InsertWebhookExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhook = new Webhook(); // Webhook | Webhook to create
var placeholders = true; // bool? | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. (optional)
try
{
// Add a webhook
WebhookResponse result = apiInstance.InsertWebhook(webhook, placeholders);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.InsertWebhook: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhook | Webhook | Webhook to create | |
placeholders | bool? | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSampleRequestResponse ResendEvent (int? webhookOid, string eventName)
Resend events to the webhook endpoint.
This method will resend events to the webhook endpoint. This method can be used for example to send all the existing items on an account to a webhook.
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class ResendEventExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhookOid = 56; // int? | The webhook oid that is receiving the reflowed events.
var eventName = eventName_example; // string | The event to reflow.
try
{
// Resend events to the webhook endpoint.
WebhookSampleRequestResponse result = apiInstance.ResendEvent(webhookOid, eventName);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.ResendEvent: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookOid | int? | The webhook oid that is receiving the reflowed events. | |
eventName | string | The event to reflow. |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookResponse UpdateWebhook (Webhook webhook, int? webhookOid, bool? placeholders = null)
Update a webhook
Update a webhook on the account
using System;
using System.Diagnostics;
using com.ultracart.admin.v2.Api;
using com.ultracart.admin.v2.Client;
using com.ultracart.admin.v2.Model;
namespace Example
{
public class UpdateWebhookExample
{
public void main()
{
// Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
const string simpleKey = "109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00";
var api = new WebhookApi(simpleKey);
var webhook = new Webhook(); // Webhook | Webhook to update
var webhookOid = 56; // int? | The webhook oid to update.
var placeholders = true; // bool? | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. (optional)
try
{
// Update a webhook
WebhookResponse result = apiInstance.UpdateWebhook(webhook, webhookOid, placeholders);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling WebhookApi.UpdateWebhook: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhook | Webhook | Webhook to update | |
webhookOid | int? | The webhook oid to update. | |
placeholders | bool? | Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional] |
ultraCartOauth, ultraCartSimpleApiKey
- Content-Type: application/json; charset=UTF-8
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]