All URIs are relative to https://api.getlago.com/api/v1
Method | HTTP request | Description |
---|---|---|
apply_coupon | POST /applied_coupons | Apply a coupon to a customer |
create_coupon | POST /coupons | Create a new coupon |
destroy_coupon | DELETE /coupons/{code} | Delete a coupon |
find_all_applied_coupons | GET /applied_coupons | Find Applied Coupons |
find_all_coupons | GET /coupons | Find Coupons |
find_coupon | GET /coupons/{code} | Find coupon by code |
update_coupon | PUT /coupons/{code} | Update an existing coupon |
crate::models::AppliedCoupon apply_coupon(applied_coupon_input) Apply a coupon to a customer
Apply a coupon to a customer
Name | Type | Description | Required | Notes |
---|---|---|---|---|
applied_coupon_input | AppliedCouponInput | Apply coupon payload | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Coupon create_coupon(coupon_input) Create a new coupon
Create a new coupon
Name | Type | Description | Required | Notes |
---|---|---|---|---|
coupon_input | CouponInput | Coupon payload | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Coupon destroy_coupon(code) Delete a coupon
Delete a coupon
Name | Type | Description | Required | Notes |
---|---|---|---|---|
code | String | Code of the existing coupon | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::AppliedCouponsPaginated find_all_applied_coupons(page, per_page, status, external_customer_id) Find Applied Coupons
Find all applied coupons
Name | Type | Description | Required | Notes |
---|---|---|---|---|
page | Option<i32> | Number of page | ||
per_page | Option<i32> | Number of records per page | ||
status | Option<String> | Applied coupon status | ||
external_customer_id | Option<String> | External customer ID |
crate::models::AppliedCouponsPaginated
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::CouponsPaginated find_all_coupons(page, per_page) Find Coupons
Find all coupons in certain organisation
Name | Type | Description | Required | Notes |
---|---|---|---|---|
page | Option<i32> | Number of page | ||
per_page | Option<i32> | Number of records per page |
crate::models::CouponsPaginated
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Coupon find_coupon(code) Find coupon by code
Return a single coupon
Name | Type | Description | Required | Notes |
---|---|---|---|---|
code | String | Code of the existing coupon | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
crate::models::Coupon update_coupon(code, coupon_input) Update an existing coupon
Update an existing coupon by code
Name | Type | Description | Required | Notes |
---|---|---|---|---|
code | String | Code of the existing coupon | [required] | |
coupon_input | CouponInput | Update an existing coupon | [required] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]