All URIs are relative to https://api.getlago.com/api/v1
Method | HTTP request | Description |
---|---|---|
CreateCustomer | POST /customers | Create a customer |
DeleteAppliedCoupon | DELETE /customers/{customer_external_id}/applied_coupons/{applied_coupon_id} | Delete customer's appplied coupon |
DestroyCustomer | DELETE /customers/{external_id} | Delete a customer |
FindAllCustomers | GET /customers | Find customers |
FindCustomer | GET /customers/{external_id} | Find customer by external ID |
FindCustomerCurrentUsage | GET /customers/{customer_external_id}/current_usage | Find customer current usage |
GetCustomerPortalUrl | GET /customers/{customer_external_id}/portal_url | Get customer portal URL |
Customer CreateCustomer (CustomerInput customerInput)
Create a customer
Create a new customer
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateCustomerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var customerInput = new CustomerInput(); // CustomerInput | Customer payload
try
{
// Create a customer
Customer result = apiInstance.CreateCustomer(customerInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.CreateCustomer: " + 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
{
// Create a customer
ApiResponse<Customer> response = apiInstance.CreateCustomerWithHttpInfo(customerInput);
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 CustomersApi.CreateCustomerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
customerInput | CustomerInput | Customer payload |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request error | - |
401 | Unauthorized error | - |
422 | Unprocessable entity error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AppliedCoupon DeleteAppliedCoupon (string customerExternalId, string appliedCouponId)
Delete customer's appplied coupon
Delete customer's appplied coupon
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DeleteAppliedCouponExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var customerExternalId = 12345; // string | External ID of the existing customer
var appliedCouponId = 54321; // string | Applied Coupon Lago ID
try
{
// Delete customer's appplied coupon
AppliedCoupon result = apiInstance.DeleteAppliedCoupon(customerExternalId, appliedCouponId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.DeleteAppliedCoupon: " + 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
{
// Delete customer's appplied coupon
ApiResponse<AppliedCoupon> response = apiInstance.DeleteAppliedCouponWithHttpInfo(customerExternalId, appliedCouponId);
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 CustomersApi.DeleteAppliedCouponWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
customerExternalId | string | External ID of the existing customer | |
appliedCouponId | string | Applied Coupon Lago ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized error | - |
404 | Not Found error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Customer DestroyCustomer (string externalId)
Delete a customer
Return the deleted customer
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DestroyCustomerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var externalId = 12345; // string | External ID of the existing customer
try
{
// Delete a customer
Customer result = apiInstance.DestroyCustomer(externalId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.DestroyCustomer: " + 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
{
// Delete a customer
ApiResponse<Customer> response = apiInstance.DestroyCustomerWithHttpInfo(externalId);
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 CustomersApi.DestroyCustomerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
externalId | string | External ID of the existing customer |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized error | - |
404 | Not Found error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomersPaginated FindAllCustomers (int? page = null, int? perPage = null)
Find customers
Find all customers in certain organisation
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindAllCustomersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var page = 2; // int? | Number of page (optional)
var perPage = 20; // int? | Number of records per page (optional)
try
{
// Find customers
CustomersPaginated result = apiInstance.FindAllCustomers(page, perPage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.FindAllCustomers: " + 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
{
// Find customers
ApiResponse<CustomersPaginated> response = apiInstance.FindAllCustomersWithHttpInfo(page, perPage);
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 CustomersApi.FindAllCustomersWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Number of page | [optional] |
perPage | int? | Number of records per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Customer FindCustomer (string externalId)
Find customer by external ID
Return a single customer
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindCustomerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var externalId = 12345; // string | External ID of the existing customer
try
{
// Find customer by external ID
Customer result = apiInstance.FindCustomer(externalId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.FindCustomer: " + 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
{
// Find customer by external ID
ApiResponse<Customer> response = apiInstance.FindCustomerWithHttpInfo(externalId);
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 CustomersApi.FindCustomerWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
externalId | string | External ID of the existing customer |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized error | - |
404 | Not Found error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CustomerUsage FindCustomerCurrentUsage (string customerExternalId, string externalSubscriptionId)
Find customer current usage
Return a customer current usage
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindCustomerCurrentUsageExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var customerExternalId = 12345; // string | External ID of the existing customer
var externalSubscriptionId = 54321; // string | External subscription ID
try
{
// Find customer current usage
CustomerUsage result = apiInstance.FindCustomerCurrentUsage(customerExternalId, externalSubscriptionId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.FindCustomerCurrentUsage: " + 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
{
// Find customer current usage
ApiResponse<CustomerUsage> response = apiInstance.FindCustomerCurrentUsageWithHttpInfo(customerExternalId, externalSubscriptionId);
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 CustomersApi.FindCustomerCurrentUsageWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
customerExternalId | string | External ID of the existing customer | |
externalSubscriptionId | string | External subscription ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized error | - |
404 | Not Found error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCustomerPortalUrl200Response GetCustomerPortalUrl (string customerExternalId)
Get customer portal URL
Get customer portal URL
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetCustomerPortalUrlExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.getlago.com/api/v1";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new CustomersApi(config);
var customerExternalId = 12345; // string | External ID of the existing customer
try
{
// Get customer portal URL
GetCustomerPortalUrl200Response result = apiInstance.GetCustomerPortalUrl(customerExternalId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomersApi.GetCustomerPortalUrl: " + 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
{
// Get customer portal URL
ApiResponse<GetCustomerPortalUrl200Response> response = apiInstance.GetCustomerPortalUrlWithHttpInfo(customerExternalId);
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 CustomersApi.GetCustomerPortalUrlWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
customerExternalId | string | External ID of the existing customer |
GetCustomerPortalUrl200Response
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
401 | Unauthorized error | - |
403 | Forbidden | - |
404 | Not Found error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]