All URIs are relative to https://public-api.closelink.net
Method | HTTP request | Description |
---|---|---|
Create | POST /v1/schedule | Creates new Schedules |
Get | GET /v1/schedule/{scheduleId} | Finds a Schedule by id |
GetList | GET /v1/schedule/list | Finds a List of Schedules |
Update | PUT /v1/schedule | Updates future Schedules (Overrides all future Schedules) |
List Create(List body)
Creates new Schedules
using System;
using System.Collections.Generic;
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 ScheduleApi();
var schedules = new List<Schedule>
{
new Schedule(
"imo1",
DateTime.Parse("2020-09-01T00:00:00.000Z"),
DateTime.Parse("2020-09-04T00:00:00.000Z"),
"DEHAM"
),
new Schedule(
"imo1",
DateTime.Parse("2020-09-06T00:00:00.000Z"),
DateTime.Parse("2020-09-07T00:00:00.000Z"),
"AUSYD"
)
};
try
{
// Creates new Schedule data
ApiResponse<List<Schedule>> response = apiInstance.Create(schedules);
Console.WriteLine("StatusCode: " + response.StatusCode);
var scheduleResult = response.Data;
scheduleResult.ForEach(Console.WriteLine);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling ScheduleApi.Create: " + e.Message );
}
}
}
}
Name | Type | Description |
---|---|---|
body | List<Schedule> | List of Schedule data to create. |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Schedule Get (string scheduleId)
Finds a Schedule 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 ScheduleApi();
var scheduleId = "exampleId";
try
{
// Creates new Schedule data
ApiResponse<Schedule> response = apiInstance.Get(scheduleId);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Data);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling ScheduleApi.Get: " + e.Message );
}
}
}
}
Name | Type | Description |
---|---|---|
scheduleId | string | scheduleId of searched Schedule |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List GetList (string imo = null, DateTime? etaFrom = null, DateTime? etaTo = null)
Finds a List of Schedules
using System;
using System.Collections.Generic;
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 ScheduleApi();
var imo = "9703291"; // string | Optional imo filter (optional)
var etaFrom = DateTime.Parse("2020-08-31T00:00:00.000Z"); // DateTime? | Optional eta from date filter (optional)
var etaTo = DateTime.Parse("2020-09-10T00:00:00.000Z"); // DateTime? | Optional eta to date filter (optional)
try
{
// Creates new Schedule data
ApiResponse<List<Schedule>> response = apiInstance.GetList(imo, etaFrom, etaTo);
Console.WriteLine("StatusCode: " + response.StatusCode);
var scheduleResult = response.Data;
scheduleResult.ForEach(Console.WriteLine);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling ScheduleApi.GetList: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
imo | string | Optional imo filter | [optional] |
etaFrom | DateTime? | Optional eta from date filter | [optional] |
etaTo | DateTime? | Optional eta to date filter | [optional] |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List Update (List body)
Updates future Schedules (Overrides all future Schedules)
using System;
using System.Collections.Generic;
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 ScheduleApi();
var schedules = new List<Schedule>
{
new Schedule(
"imo1",
DateTime.Parse("2020-09-01T00:00:00.000Z"),
DateTime.Parse("2020-09-04T00:00:00.000Z"),
"DEHAM"
),
new Schedule(
"imo1",
DateTime.Parse("2020-09-06T00:00:00.000Z"),
DateTime.Parse("2020-09-07T00:00:00.000Z"),
"AUSYD"
)
};
try
{
// Updates new Schedule data
ApiResponse<List<Schedule>> response = apiInstance.Update(schedules);
Console.WriteLine("StatusCode: " + response.StatusCode);
var scheduleResult = response.Data;
scheduleResult.ForEach(Console.WriteLine);
}
catch (Exception e)
{
Console.WriteLine("Exception when calling ScheduleApi.Update: " + e.Message );
}
}
}
}
Name | Type | Description |
---|---|---|
body | List<Schedule> | List of Schedule data to create. |
- Content-Type: application/json, application/xml
- Accept: application/json, application/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]