All URIs are relative to https://api.getlago.com/api/v1
Method | HTTP request | Description |
---|---|---|
ApplyCoupon | POST /applied_coupons | Apply a coupon to a customer |
CreateCoupon | POST /coupons | Create a new coupon |
DestroyCoupon | DELETE /coupons/{code} | Delete a coupon |
FindAllAppliedCoupons | GET /applied_coupons | Find Applied Coupons |
FindAllCoupons | GET /coupons | Find Coupons |
FindCoupon | GET /coupons/{code} | Find coupon by code |
UpdateCoupon | PUT /coupons/{code} | Update an existing coupon |
AppliedCoupon ApplyCoupon (AppliedCouponInput appliedCouponInput)
Apply a coupon to a customer
Apply a coupon to a customer
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApplyCouponExample
{
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 CouponsApi(config);
var appliedCouponInput = new AppliedCouponInput(); // AppliedCouponInput | Apply coupon payload
try
{
// Apply a coupon to a customer
AppliedCoupon result = apiInstance.ApplyCoupon(appliedCouponInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.ApplyCoupon: " + 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
{
// Apply a coupon to a customer
ApiResponse<AppliedCoupon> response = apiInstance.ApplyCouponWithHttpInfo(appliedCouponInput);
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 CouponsApi.ApplyCouponWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
appliedCouponInput | AppliedCouponInput | Apply coupon payload |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request error | - |
401 | Unauthorized error | - |
404 | Not Found error | - |
422 | Unprocessable entity error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Coupon CreateCoupon (CouponInput couponInput)
Create a new coupon
Create a new coupon
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class CreateCouponExample
{
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 CouponsApi(config);
var couponInput = new CouponInput(); // CouponInput | Coupon payload
try
{
// Create a new coupon
Coupon result = apiInstance.CreateCoupon(couponInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.CreateCoupon: " + 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 new coupon
ApiResponse<Coupon> response = apiInstance.CreateCouponWithHttpInfo(couponInput);
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 CouponsApi.CreateCouponWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
couponInput | CouponInput | Coupon 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]
Coupon DestroyCoupon (string code)
Delete a coupon
Delete a coupon
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class DestroyCouponExample
{
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 CouponsApi(config);
var code = example_code; // string | Code of the existing coupon
try
{
// Delete a coupon
Coupon result = apiInstance.DestroyCoupon(code);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.DestroyCoupon: " + 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 coupon
ApiResponse<Coupon> response = apiInstance.DestroyCouponWithHttpInfo(code);
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 CouponsApi.DestroyCouponWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing coupon |
- 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]
AppliedCouponsPaginated FindAllAppliedCoupons (int? page = null, int? perPage = null, string status = null, string externalCustomerId = null)
Find Applied Coupons
Find all applied coupons
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindAllAppliedCouponsExample
{
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 CouponsApi(config);
var page = 2; // int? | Number of page (optional)
var perPage = 20; // int? | Number of records per page (optional)
var status = "active"; // string | Applied coupon status (optional)
var externalCustomerId = 12345; // string | External customer ID (optional)
try
{
// Find Applied Coupons
AppliedCouponsPaginated result = apiInstance.FindAllAppliedCoupons(page, perPage, status, externalCustomerId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.FindAllAppliedCoupons: " + 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 Applied Coupons
ApiResponse<AppliedCouponsPaginated> response = apiInstance.FindAllAppliedCouponsWithHttpInfo(page, perPage, status, externalCustomerId);
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 CouponsApi.FindAllAppliedCouponsWithHttpInfo: " + 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] |
status | string | Applied coupon status | [optional] |
externalCustomerId | string | External customer ID | [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]
CouponsPaginated FindAllCoupons (int? page = null, int? perPage = null)
Find Coupons
Find all coupons 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 FindAllCouponsExample
{
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 CouponsApi(config);
var page = 2; // int? | Number of page (optional)
var perPage = 20; // int? | Number of records per page (optional)
try
{
// Find Coupons
CouponsPaginated result = apiInstance.FindAllCoupons(page, perPage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.FindAllCoupons: " + 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 Coupons
ApiResponse<CouponsPaginated> response = apiInstance.FindAllCouponsWithHttpInfo(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 CouponsApi.FindAllCouponsWithHttpInfo: " + 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]
Coupon FindCoupon (string code)
Find coupon by code
Return a single coupon
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class FindCouponExample
{
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 CouponsApi(config);
var code = example_code; // string | Code of the existing coupon
try
{
// Find coupon by code
Coupon result = apiInstance.FindCoupon(code);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.FindCoupon: " + 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 coupon by code
ApiResponse<Coupon> response = apiInstance.FindCouponWithHttpInfo(code);
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 CouponsApi.FindCouponWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing coupon |
- 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]
Coupon UpdateCoupon (string code, CouponInput couponInput)
Update an existing coupon
Update an existing coupon by code
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class UpdateCouponExample
{
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 CouponsApi(config);
var code = example_code; // string | Code of the existing coupon
var couponInput = new CouponInput(); // CouponInput | Update an existing coupon
try
{
// Update an existing coupon
Coupon result = apiInstance.UpdateCoupon(code, couponInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CouponsApi.UpdateCoupon: " + 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
{
// Update an existing coupon
ApiResponse<Coupon> response = apiInstance.UpdateCouponWithHttpInfo(code, couponInput);
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 CouponsApi.UpdateCouponWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | Code of the existing coupon | |
couponInput | CouponInput | Update an existing coupon |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request error | - |
401 | Unauthorized error | - |
404 | Not Found error | - |
422 | Unprocessable entity error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]