All URIs are relative to https://public-api.closelink.net
Method | HTTP request | Description |
---|---|---|
CreateAgent | POST /v1/agents | Create agent |
CreateAgentBulk | POST /v1/agents/bulk | Create multiple agents |
FindAgentByExternalId | GET /v1/agents/external/{externalId} | Find agent by external ID |
FindAgentById | GET /v1/agents/{id} | Find agent by ID |
FindAgents | GET /v1/agents | Find agents |
UpdateAgent | PUT /v1/agents/{id} | Update agent |
UpdateAgentBulk | PUT /v1/agents/bulk | Update multiple agents |
UpdateAgentByExternalId | PUT /v1/agents/external/{externalId} | Update agent by external ID |
AgentMessage CreateAgent (AgentMessage body)
Create agent
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var body = new AgentMessage(
"Agent 1",
new AddressMessage(
"Street",
"1",
"12344",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 1",
"customerId1"
);
try
{
// Create agent
ApiResponse<AgentMessage> response = apiInstance.CreateAgent(body);
Console.WriteLine("StatusCode: " + response.StatusCode);
Console.WriteLine(response.Data);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.CreateAgent: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | AgentMessage |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentsMessage CreateAgentBulk (AgentsMessage body)
Create multiple agents
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var body = new AgentsMessage(
new List<AgentMessage>{
new AgentMessage(
"Agent 1",
new AddressMessage(
"Street",
"1",
"12344",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 1",
"customerId1"
),
new AgentMessage(
"Agent 2",
new AddressMessage(
"Street",
"2",
"25654",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 2",
"customerId2"
)
});
try
{
// Create multiple agents
ApiResponse<AgentsMessage> response = apiInstance.CreateAgentBulk(body);
Console.WriteLine("StatusCode: " + response.StatusCode);
response.Data.Agents.ForEach(Console.WriteLine);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.CreateAgentBulk: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | AgentsMessage |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentMessage FindAgentByExternalId (string externalId)
Find agent by external ID
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var externalId = "externalId1";
try
{
// Find agent by external ID
ApiResponse<AgentMessage> response = apiInstance.FindAgentByExternalId(externalId);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Data);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.FindAgentByExternalId: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
externalId | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentMessage FindAgentById (string id)
Find agent by ID
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var id = id_example; // string |
try
{
// Find agent by ID
ApiResponse<AgentMessage> response = apiInstance.FindAgentById(id);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Data);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.FindAgentById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentsMessage FindAgents (List customerIds, string searchQuery, List loCodes)
Find agents
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
try
{
// Find agents
ApiResponse<AgentsMessage> response = apiInstance.FindAgents();
Console.WriteLine("StatusCode: " + response.StatusCode);
response.Data.Agents.ForEach(Console.WriteLine);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.FindAgents: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
customerIds | List<string> | List of customer IDs | [optional] |
searchQuery | string | Search query | [optional] |
loCodes | List<string> | List of port IDs | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentMessage UpdateAgent (string id, AgentMessage body)
Update agent
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var id = "id1";
var body = new AgentMessage(
"Agent 1",
new AddressMessage(
"Street",
"1",
"12344",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 1",
"customerId1"
);
try
{
// Update agent
ApiResponse<AgentMessage> response = apiInstance.UpdateAgent(id, body);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Data);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.UpdateAgent: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Agent ID | |
body | AgentMessage |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentsMessage UpdateAgentBulk (AgentsMessage body)
Update multiple agents
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var body = return new AgentsMessage(
new List<AgentMessage>{
new AgentMessage(
"Agent 1",
new AddressMessage(
"Street",
"1",
"12344",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 1",
"customerId1",
"externalId1"
),
new AgentMessage(
"Agent 2",
new AddressMessage(
"Street",
"2",
"25654",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 2",
"customerId2",
"externalId1"
)
});
try
{
// Update multiple agents
ApiResponse<AgentsMessage> response = apiInstance.UpdateAgentBulk(body);
Console.WriteLine("StatusCode: " + response.StatusCode);
response.Data.Agents.ForEach(Console.WriteLine);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.UpdateAgentBulk: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | AgentsMessage |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AgentMessage UpdateAgentByExternalId (string externalId, AgentMessage body)
Update agent by external ID
using System;
using CloselinkAPI.Api;
using CloselinkAPI.Client;
using CloselinkAPI.Model;
namespace Example
{
class Program
{
static void Main(string[] args)
{
// Configure API key authorization
Configuration.Default.ApiKey = "YOUR_API_KEY";
var apiInstance = new AgentsApi();
var externalId = "externalId1";
var body = new AgentMessage(
"Agent 1",
new AddressMessage(
"Street",
"1",
"12344",
"Hamburg",
"Germany"
),
new ContactMessage(
"Joe Doe",
"+49 5454 45 45 4",
"[email protected]",
"+49 45 5454 554 5"
),
new List<string> { "loCode1", "loCode2" },
"Note 1",
"customerId1"
);
try
{
// Update agent by external ID
ApiResponse<AgentMessage> response = apiInstance.UpdateAgentByExternalId(externalId, body);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Data);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling AgentsApi.UpdateAgentByExternalId: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
externalId | string | ||
body | AgentMessage |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]