All URIs are relative to https://app.shipmondo.com/api/public/v3
Method | HTTP request | Description |
---|---|---|
ShipmentTemplateGet | GET /shipment_templates/{id} | Retrieve a shipment template |
ShipmentTemplatesGet | GET /shipment_templates | List all shipment templates |
ShipmentTemplate ShipmentTemplateGet (int id)
Retrieve a shipment template
Returns the details of a shipment template.
using System.Collections.Generic;
using System.Diagnostics;
using ShipmondoApi.Dotnet.Api;
using ShipmondoApi.Dotnet.Client;
using ShipmondoApi.Dotnet.Model;
namespace Example
{
public class ShipmentTemplateGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://app.shipmondo.com/api/public/v3";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new ShipmentTemplatesApi(config);
var id = 56; // int | ID for the shipment template to be included in the filter
try
{
// Retrieve a shipment template
ShipmentTemplate result = apiInstance.ShipmentTemplateGet(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ShipmentTemplatesApi.ShipmentTemplateGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Retrieve a shipment template
ApiResponse<ShipmentTemplate> response = apiInstance.ShipmentTemplateGetWithHttpInfo(id);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ShipmentTemplatesApi.ShipmentTemplateGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID for the shipment template to be included in the filter |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful. | - |
401 | Unauthorized. | - |
404 | Resource not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<ShipmentTemplate> ShipmentTemplatesGet (int? id = null, string senderCountry = null, string receiverCountry = null, int? perPage = null, int? page = null)
List all shipment templates
Returns a list of shipment templates.
using System.Collections.Generic;
using System.Diagnostics;
using ShipmondoApi.Dotnet.Api;
using ShipmondoApi.Dotnet.Client;
using ShipmondoApi.Dotnet.Model;
namespace Example
{
public class ShipmentTemplatesGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://app.shipmondo.com/api/public/v3";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
var apiInstance = new ShipmentTemplatesApi(config);
var id = 56; // int? | ID for the shipment template to be included in the filter (optional)
var senderCountry = DK; // string | Country code (ISO Alpha-2) to be included in the filter. (optional)
var receiverCountry = DK; // string | Country code (ISO Alpha-2) to be included in the filter. (optional)
var perPage = 20; // int? | For pagination. Defines how many entries are returned per page. (optional) (default to 20)
var page = 1; // int? | For pagination. Defines which page the results are fetched from. (optional) (default to 1)
try
{
// List all shipment templates
List<ShipmentTemplate> result = apiInstance.ShipmentTemplatesGet(id, senderCountry, receiverCountry, perPage, page);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ShipmentTemplatesApi.ShipmentTemplatesGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List all shipment templates
ApiResponse<List<ShipmentTemplate>> response = apiInstance.ShipmentTemplatesGetWithHttpInfo(id, senderCountry, receiverCountry, perPage, page);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ShipmentTemplatesApi.ShipmentTemplatesGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | int? | ID for the shipment template to be included in the filter | [optional] |
senderCountry | string | Country code (ISO Alpha-2) to be included in the filter. | [optional] |
receiverCountry | string | Country code (ISO Alpha-2) to be included in the filter. | [optional] |
perPage | int? | For pagination. Defines how many entries are returned per page. | [optional] [default to 20] |
page | int? | For pagination. Defines which page the results are fetched from. | [optional] [default to 1] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful. | * X-Current-Page - Pagination - Current Page. * X-Per-Page - Pagination - Per Page. * X-Total-Count - Pagination - Total Count. * X-Total-Pages - Pagination - Total Pages Count. |
401 | Unauthorized. | - |
404 | Resource not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]