Skip to main content

Create an integration

POST 

https://euwest.api.elasticpath.com/integrations

Create an integration.

Request

Body

    data IntegrationCreaterequired
    typestringrequired

    The type represents the object being returned. Always integration.

    Possible values: [integration]

    Default value: integration
    Example: integration
    namestringrequired

    The name of the integration.

    Example: Order shipping notification
    descriptionstring

    A description of what the integration is for.

    Example: Send a shipping notification via email with discount code
    enabledboolean

    Whether the integration is enabled.

    Example: true
    integration_typestringrequired

    Specifies how the event is delivered. The options are webhook, aws-sqs, or stomp.

    Possible values: [webhook, aws_sqs, stomp]

    Default value: webhook
    Example: webhook
    observesstring[]

    The list of events you want to observe. See Observable Events.

    configuration objectrequired

    The content of the configuration object depends on the value of integration_type.

    oneOf

Responses

Success. Integration created.

Schema
    data object
    idstring

    The unique identifier of the integration.

    Example: 2da46671-b4c2-44ac-b133-d1221aafc77b
    typestring

    The type represents the object being returned. Always integration.

    Possible values: [integration]

    Default value: integration
    Example: integration
    namestring

    The name of the integration.

    Example: Order shipping notification
    descriptionstring

    A description of what the integration is for.

    Example: Send a shipping notification via email with discount code
    enabledboolean

    Whether the integration is enabled.

    Example: true
    integration_typestring

    Specifies how the event is delivered. The options are webhook, aws-sqs, or stomp.

    Possible values: [webhook, aws_sqs, stomp]

    Default value: webhook
    Example: webhook
    observesstring[]

    The list of events you want to observe. See Observable Events.

    configuration object
    oneOf
    links object

    Links are used to allow you to move between requests.

    selfuri

    Single entities use a self parameter with a link to that specific resource.

    Example: ?page[offset]=0&page[limit]=25
    meta object
    timestamps Timestamps

    The date and time a transaction is created.

    created_atdate-time

    The date and time an integration is updated.

    Example: 2017-07-21T17:32:28Z
    updated_atdate-time

    The date and time an integration is updated.

    Example: 2017-07-21T17:32:28Z

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://euwest.api.elasticpath.com/integrations");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"integration\",\n \"name\": \"Order shipping notification\",\n \"description\": \"Send a shipping notification via email with discount code\",\n \"enabled\": true,\n \"integration_type\": \"webhook\",\n \"observes\": [\n \"string\"\n ],\n \"configuration\": {\n \"url\": \"https://sqs.eu-west-1.amazonaws.com/123456789/epcc-external-queue\",\n \"aws_access_key_id\": \"****************JIMB\",\n \"aws_secret_access_key\": \"************************************HK4o\",\n \"region\": \"eu-west-1\"\n }\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Body
{
  "data": {
    "type": "integration",
    "name": "Order shipping notification",
    "description": "Send a shipping notification via email with discount code",
    "enabled": true,
    "integration_type": "webhook",
    "observes": [
      "string"
    ],
    "configuration": {
      "url": "https://sqs.eu-west-1.amazonaws.com/123456789/epcc-external-queue",
      "aws_access_key_id": "****************JIMB",
      "aws_secret_access_key": "************************************HK4o",
      "region": "eu-west-1"
    }
  }
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.