Create an integration
POSThttps://euwest.api.elasticpath.com/integrations
Create an integration.
Request
Responses
- 200
- 422
- 500
Success. Integration created.
Bad request. The request failed validation.
Internal server error. There was a system failure in the platform.
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
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());
ResponseClear