Introduction
Welcome to the JUDO Cart API Documentation! This documentation will guide you on how to use the JUDO Cart API.
Authentication
To authorize, use this code:
# This example is to show how to use Bearer Authorization header
curl "judo_cart_api_endpoint"
-H "Authorization: Bearer 123123123123"
# This example is to show how to use X-API-Key header
curl "judo_cart_api_endpoint"
-H "X-API-Key: 123123123123"
Make sure to replace
123123123123
with your API key.
JUDO Cart API uses X-API-KEY header as an authorization to access the endpoints (use either one depends on the application).
Please send
X-API-Key
header when accessing the endpoint. To get this key, please contact the administrator, and use it fordashboard login
. Afterward, use the token data returned fromdashboard login
. It should be included in all API requests in a header that looks like the following:X-API-Key: 123123123123
Dashboard Roles
Dashboard Role Types
Type | Description |
---|---|
1 | Admin |
2 | Staff |
3 | Superadmin |
Get Dashboard Roles List
curl -X GET "https://cart-api.lovecoach.id/content/dashboard/roles"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 2,
"name": "Admin"
},
{
"id": 3,
"name": "Staff"
}
],
"pagination": {
"has_next": false,
"has_previous": false,
"page": 1,
"per_page": 25,
"total_items": 2,
"total_pages": 1
}
}
}
This endpoint retrieves list of dashboard roles.
HTTP Request
GET https://cart-api.lovecoach.id/content/dashboard/roles
Query Parameters
Parameter | Description |
---|---|
role_name | role name to be filtered |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
Dashboard Users
Dashboard User's Statuses
Status | Description |
---|---|
1 | Active |
2 | Inactive |
3 | Deleted |
Dashboard Login
curl -X POST "https://cart-api.lovecoach.id/content/dashboard/users/auth"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"username": "test",
"password": "abc12345"
}
Sample JSON successful response:
{
"success": true,
"data": {
"id": 1,
"name": "Dashboard user",
"username": "test",
"email": "test@mail.com",
"id_token": "abc123161723182hkajdn",
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
},
"roles": [
{
"id": 1,
"role": {
"id": 1,
"name": "Admin"
}
}
]
}
}
Sample JSON response with errors:
{
"success": false,
"error": "Invalid username or password"
}
This endpoint will logged in given username to dashboard.
HTTP Request
POST https://cart-api.lovecoach.id/content/dashboard/users/auth
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
username (Required) | string | dashboard user's username |
password (Required) | string | dashboard user's password |
Promo Codes
Promo Codes Statuses
Type | Description |
---|---|
1 | Active |
2 | Inactive |
Get Promo Code List
curl -X GET "https://cart-api.lovecoach.id/content/promo-codes"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 4,
"code": "123123",
"value": 10000,
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
},
"promo_code_type": {
"id": 1,
"name": "%"
},
"trx_count": 1
},
{
"id": 3,
"code": "123124",
"value": 10000,
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
},
"promo_code_type": {
"id": 1,
"name": "%"
},
"trx_count": 0
}
],
"pagination": {
"has_next": false,
"has_previous": false,
"page": 1,
"per_page": 10,
"total_items": 2,
"total_pages": 1
}
}
}
This endpoint retrieves list of promo codes.
HTTP Request
GET https://cart-api.lovecoach.id/content/promo-codes
Query Parameters
Parameter | Description |
---|---|
promo_code | promo code to be filtered |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
Get Promo Code Detail
curl -X GET "https://cart-api.lovecoach.id/content/promo-codes/{promoCodeID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 3,
"code": "123124",
"description": "test2",
"value": 10000,
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
},
"promo_code_type": {
"id": 1,
"name": "%"
},
"product_promos": [
{
"id": 1,
"promo_id": 55,
"product_id": 30,
"product": {
"id": 30,
"sku_no": "SKU000030 220715",
"product_name": "test product bump1"
},
"promo": null
},
{
"id": 2,
"promo_id": 55,
"product_id": 31,
"product": {
"id": 31,
"sku_no": "SKU000031 220716",
"product_name": "test product course2"
},
"promo": null
},
{
"id": 3,
"promo_id": 55,
"product_id": 32,
"product": {
"id": 32,
"sku_no": "SKU000032 220716",
"product_name": "test product course with bump course"
},
"promo": null
}
]
}
}
This endpoint will get promo code's detail
HTTP Request
GET https://cart-api.lovecoach.id/content/promo-codes/{promoCodeID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
promoCodeID (Required) | uint64 | ID of the promo code |
Create Promo Codes
curl -X POST "https://cart-api.lovecoach.id/content/promo-codes"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"code": "123123",
"description": "test4",
"code_type_id": 1,
"value": 10000,
"status": 1,
"product_ids": [1,2,3]
}
Sample JSON successful response:
{
"success": true,
"data": "Promo Code created successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "promo code has already been used"
}
This endpoint will create a new promo code.
HTTP Request
POST https://cart-api.lovecoach.id/content/promo-codes
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
code (Required) | string | promo code |
description (Required) | string | description of the promo code |
code_type_id (Required) | uint | promo code type id |
value (Required) | float64 | promo code's value |
status | uint8 | promo code's status |
product_ids | []uint64 | promo's product IDs (array of product IDs) |
Update Promo Codes
curl -X PUT "https://cart-api.lovecoach.id/content/promo-codes/{promoCodeID}"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"code": "123123",
"description": "test4",
"code_type_id": 1,
"value": 10000,
"status": 1,
"product_ids": [1,2,3]
}
Sample JSON successful response:
{
"success": true,
"data": "Promo Code updated successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "promo code has already been used"
}
This endpoint will update promo code with given promoCodeID.
HTTP Request
PUT https://cart-api.lovecoach.id/content/promo-codes/{promoCodeID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
promoCodeID (Required) | uint64 | ID of the promo code |
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
code | string | promo code |
description | string | description of the promo code |
code_type_id | uint | promo code type id |
value | float64 | promo code's value |
status | uint8 | promo code's status |
product_ids | []uint64 | promo's product IDs (array of product IDs) |
Delete Promo Code
curl -X DELETE "https://cart-api.lovecoach.id/content/promo-codes/{promoCodeID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": "Promo Code deleted successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "You're not allowed to perform this action"
}
This endpoint will delete promo code with given promoCodeID.
HTTP Request
DELETE https://cart-api.lovecoach.id/content/promo-codes/{promoCodeID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
promoCodeID (Required) | uint64 | ID of the promo code |
Get Promo Code Types
curl -X GET "https://cart-api.lovecoach.id/content/promo-code-types"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"name": "%"
},
{
"id": 2,
"name": "Rp"
},
{
"id": 3,
"name": "Ongkir"
}
]
}
This endpoint retrieves list of promo code types.
HTTP Request
GET https://cart-api.lovecoach.id/content/promo-code-types
Verify Promo Code
curl -X POST "https://cart-api.lovecoach.id/content/promo-codes/verify"
-H "X-API-KEY: 123123123123"
Sample Request Payload w/ only Code:
{
"code": "123123"
}
Sample Request Payload w/ user WP ID:
{
"code": "123123",
"user_wp_id": 1234,
"product_ids":[32,1]
}
Sample Request Payload w/ email:
{
"code": "123123",
"email":"foo@mail.com",
"product_ids":[32,1]
}
Sample JSON successful response:
{
"success": true,
"data": {
"id": 1,
"code": "123123",
"description": "test",
"value": 10,
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
},
"promo_code_type": {
"id": 1,
"name": "%"
},
"product_promos": [
{
"id": 1,
"promo_id": 55,
"product_id": 30,
"product": {
"id": 30,
"sku_no": "SKU000030 220715",
"product_name": "test product bump1"
},
"promo": null
},
{
"id": 2,
"promo_id": 55,
"product_id": 31,
"product": {
"id": 31,
"sku_no": "SKU000031 220716",
"product_name": "test product course2"
},
"promo": null
},
{
"id": 3,
"promo_id": 55,
"product_id": 32,
"product": {
"id": 32,
"sku_no": "SKU000032 220716",
"product_name": "test product course with bump course"
},
"promo": null
}
]
}
}
Sample JSON response with errors:
{
"success": false,
"error": "promo code is invalid"
}
This endpoint will verify given promo code.
HTTP Request
POST https://cart-api.lovecoach.id/content/promo-codes/verify
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
code (Required) | string | promo code |
user_wp_id | uint64 | User Word Press ID |
string | User's email | |
product_ids | []uint64 | array of product IDs from main product and product bumps |
Product Types
Get Promo Type List
curl -X GET "https://cart-api.lovecoach.id/content/product-types"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"name": "Digital",
"payment_types": [
{
"id": 1,
"name": "One Time"
},
{
"id": 2,
"name": "Recurring"
}
]
},
{
"id": 2,
"name": "Physical",
"payment_types": [
{
"id": 1,
"name": "One Time"
}
]
}
]
}
This endpoint retrieves list of product types including their payment types.
HTTP Request
GET https://cart-api.lovecoach.id/content/product-types
Product Categories
Product Category's Statuses
Status | Description |
---|---|
1 | Active |
2 | Inactive |
3 | Deleted |
Get Product Category List
curl -X GET "https://cart-api.lovecoach.id/content/product-categories"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 1,
"name": "Event",
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
}
}
],
"pagination": {
"has_next": true,
"has_previous": false,
"page": 1,
"per_page": 1,
"total_items": 9,
"total_pages": 9
}
}
}
This endpoint retrieves list of product categories
HTTP Request
GET https://cart-api.lovecoach.id/content/product-categories
Query Parameters
Parameter | Description |
---|---|
category_name | category name to be filtered |
status | category status to be filtered (uint) |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
Get Product Category Detail
curl -X GET "https://cart-api.lovecoach.id/content/product-categories/{categoryID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 2,
"name": "LRPS",
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
}
}
}
This endpoint will get product's category detail
HTTP Request
GET https://cart-api.lovecoach.id/content/product-categories/{categoryID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
categoryID (Required) | uint64 | ID of the category |
Create Product Category
curl -X POST "https://cart-api.lovecoach.id/content/product-categories"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"name": "test categ1",
"status": 1
}
Sample JSON successful response:
{
"success": true,
"data": "Product category created Successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "product category name already exists"
}
This endpoint will create a new product category.
HTTP Request
POST https://cart-api.lovecoach.id/content/product-categories
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
name (Required) | string | product category name |
status (Required) | uint8 | product category status |
Update Product Category
curl -X POST "https://cart-api.lovecoach.id/content/product-categories/{categoryID}"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"name": "test categ1",
"status": 1
}
Sample JSON successful response:
{
"success": true,
"data": "Product category updated Successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "product category name already exists"
}
This endpoint will update product category with given categoryID
.
HTTP Request
PUT https://cart-api.lovecoach.id/content/product-categories/{categoryID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
categoryID (Required) | uint64 | ID of the product category |
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
name (Required) | string | product category name |
status (Required) | uint8 | product category status |
Delete Product Category
curl -X DELETE "https://cart-api.lovecoach.id/content/product-categories/{categoryID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": "Product category deleted successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "You're not allowed to perform this action"
}
This endpoint will delete product category with given categoryID
.
HTTP Request
DELETE https://cart-api.lovecoach.id/content/product-categories/{categoryID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
categoryID (Required) | uint64 | ID of the product category |
Subscription Types
Get Subscription Type List
curl -X GET "https://cart-api.lovecoach.id/content/subscription-types"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"subscription_name": "1 month"
},
{
"id": 2,
"subscription_name": "3 months"
},
{
"id": 3,
"subscription_name": "6 months"
},
{
"id": 4,
"subscription_name": "12 months"
}
]
}
This endpoint retrieves list of subscription types.
HTTP Request
GET https://cart-api.lovecoach.id/content/subscription-types
Products
Product's Statuses
Status | Description |
---|---|
1 | Active |
2 | Inactive |
3 | Deleted |
Get Product Bump List
curl -X GET "https://cart-api.lovecoach.id/content/product-bumps"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"product_name": "Test"
}
]
}
This endpoint retrieves list of products for product bumps.
HTTP Request
GET https://cart-api.lovecoach.id/content/product-bumps
Query Parameters
Parameter | Description |
---|---|
product_name | product name to be filtered |
exclude_product_id | product id to be excluded from the list (should be sent for product update) |
is_exclude_learndash_group | flag to exclude products with learndash group ID |
Get Product List
curl -X GET "https://cart-api.lovecoach.id/content/products"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 8,
"sku_no": "SKU000008 211207",
"product_name": "test product digital 2",
"display_name": "test display name",
"slug": "test-product-digital-2",
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"product_price": 100000,
"gem_price": 1900,
"formatted_price": "Rp. 100.000,00",
"subscription_type": null,
"product_type": {
"id": 1,
"name": "Digital",
"payment_types": null
},
"payment_type": null,
"images": null,
"product_bumps": null,
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
},
"start_date": "09 Jan 2022 09:40:23",
"end_date": "08 Feb 2021 09:40:23",
"ac_product_tags": null,
"ac_product_automations": null,
"ac_product_list": null,
"product_category": {
"id": 1,
"name": "Event"
}
}
],
"pagination": {
"has_next": true,
"has_previous": false,
"page": 1,
"per_page": 1,
"total_items": 8,
"total_pages": 8
}
}
}
This endpoint retrieves list of products.
HTTP Request
GET https://cart-api.lovecoach.id/content/products
Query Parameters
Parameter | Description |
---|---|
product_name | product name to be filtered |
product_type | product type to be filtered (uint) |
status | product status to be filtered (uint) |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
Get Product Detail
curl -X GET "https://cart-api.lovecoach.id/content/products/{productID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 4,
"sku_no": "SKU000004 211207",
"product_name": "test product physical",
"display_name": "test display name",
"description": "test description",
"slug": "test-product-physical",
"product_url": "https://cart.lovecoach.id/test-product-physical",
"items": "item1|item2|item3",
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": "1,2,3",
"lesson_ids": "7,8",
"topic_ids": "100,101",
"short_video_ids": "1,3",
"product_price": 100000,
"gem_price": null,
"formatted_price": "Rp. 100.000,00",
"weight": 1000,
"subscription_type": null,
"product_type": {
"id": 2,
"name": "Physical",
"payment_types": null
},
"payment_type": {
"id": 1,
"name": "One Time"
},
"images": [
{
"id": 3,
"product_id": 4,
"image_path": "https://google.com"
}
],
"origin_city": {
"id": 5,
"province_id": 21,
"name": "Aceh Selatan"
},
"product_bumps": [
{
"id": 5,
"product": {
"id": 1,
"sku_no": "",
"product_name": "Test",
"description": "lbajdbaskdjbaskdjabsdkj",
"slug": "",
"learndash_id": 642,
"trulav_subscription_plan_id": 642,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"product_price": 10000,
"formatted_price": "",
"subscription_type": null,
"product_type": null,
"payment_type": null,
"images": null,
"product_bumps": null,
"status": null,
"product_category": {
"id": 1,
"name": "Event"
}
}
}
],
"status": {
"id": 2,
"label_idn": "Tidak Aktif",
"label_en": "Inactive"
},
"start_date": "09 Jan 2022 09:40:23",
"end_date": "08 Feb 2021 09:40:23",
"ac_product_tags": [
{
"id": 5,
"product_id": 4,
"ac_tag_id": 776,
"ac_tag_name": "test tag jdo product digital2"
},
{
"id": 6,
"product_id": 4,
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_product_automations": [
{
"id": 7,
"product_id": 4,
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression"
},
{
"id": 8,
"product_id": 4,
"ac_automation_id": 6,
"ac_automation_name": "Peserta The GLAM BETA"
}
],
"ac_product_list": [
{
"id": 7,
"product_id": 4,
"ac_list_id": 4,
"ac_list_name": "Subscriber List"
},
{
"id": 8,
"product_id": 4,
"ac_list_id": 5,
"ac_list_name": "Customer List"
}
],
"product_category": {
"id": 1,
"name": "Event"
}
}
}
This endpoint will get product's detail
HTTP Request
GET https://cart-api.lovecoach.id/content/products/{productID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
productID (Required) | uint64 | ID of the product |
Create Product
curl -X POST "https://cart-api.lovecoach.id/content/products"
-H "X-API-KEY: 123123123123"
Sample Request Payload for Physical Product:
{
"name": "test product physical 3",
"display_name": "test display name",
"description": "test description",
"items": "item1|item2|item3",
"product_type_id": 2,
"payment_type_id": 1,
"price": 100000,
"weight": 1000,
"origin_city_id": 5,
"image_urls":["https://google.com"],
"product_bumps":[1],
"start": 1638839565,
"end": 1670375565,
"ac_tags": [
{
"ac_tag_name": " test tag jdo product digital2 "
},
{
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_automations": [
{
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression "
},
{
"ac_automation_id": 6,
"ac_automation_name": " Peserta The GLAM BETA "
}
],
"ac_list": [
{
"ac_list_id": 4,
"ac_list_name": "Subscriber List "
},
{
"ac_list_id": 5,
"ac_list_name": " Customer List "
}
],
"product_category_id": 1
}
Sample Request Payload for Digital Product w/ Learndash Course Group/TRULAV Subscription Plan ID:
{
"name": "test product digital",
"display_name": "test display name",
"description": "test description",
"items": "item1|item2|item3",
"product_type_id": 1,
"payment_type_id": 2,
"subscription_type_id": 2,
"learndash_course_group_id": 1,
"price": 100000,
"gem_price": 1900,
"image_urls":["https://google.com"],
"product_bumps":[1],
"start": 1638839805,
"end": 1670375805,
"ac_tags": [
{
"ac_tag_name": " test tag jdo product digital2 "
},
{
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_automations": [
{
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression "
},
{
"ac_automation_id": 6,
"ac_automation_name": " Peserta The GLAM BETA "
}
],
"ac_list": [
{
"ac_list_id": 4,
"ac_list_name": "Subscriber List "
},
{
"ac_list_id": 5,
"ac_list_name": " Customer List "
}
],
"product_category_id": 1
}
Sample Request Payload for Digital Product w/ Learndash/TRULAV Course, Lesson, Topic, Short Video IDs:
{
"name": "test product digital",
"display_name": "test display name",
"description": "test description",
"items": "item1|item2|item3",
"product_type_id": 1,
"payment_type_id": 1,
"course_ids": [1,2,3],
"lesson_ids":[7,8],
"topic_ids": [100,101],
"short_video_ids": [4,5],
"price": 100000,
"gem_price": 1900,
"image_urls":["https://google.com"],
"product_bumps":[1],
"start": 1638839805,
"end": 1670375805,
"ac_tags": [
{
"ac_tag_name": " test tag jdo product digital2 "
},
{
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_automations": [
{
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression "
},
{
"ac_automation_id": 6,
"ac_automation_name": " Peserta The GLAM BETA "
}
],
"ac_list": [
{
"ac_list_id": 4,
"ac_list_name": "Subscriber List "
},
{
"ac_list_id": 5,
"ac_list_name": " Customer List "
}
],
"product_category_id": 1
}
Sample JSON successful response:
{
"success": true,
"data": "Product Created Successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "product name already exists"
}
This endpoint will create a new products.
HTTP Request
POST https://cart-api.lovecoach.id/content/products
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
name (Required) | string | product name |
display_name (Required) | string | product display name |
description (Required) | string | description of the product |
items (Required) | string | "what will you get" field, should be seperated by " |
product_type_id (Required) | uint64 | product type ID (digital or physical) |
payment_type_id (Required) | uint64 | payment type ID (one time or recurring) |
subscription_type_id | uint64 | subscription type ID (1 month, 3 months, etc) NOTE: Required if recurring payment |
learndash_course_group_id | uint64 | learndash course group/TRULAV subscription plan ID NOTE: Required if digital product. Either this or course_ids |
course_ids | []uint64 | array of learndash/TRULAV course IDs NOTE: Required if digital product. Either this or learndash_course_group_id |
lesson_ids | []uint64 | array of learndash/TRULAV lesson IDs NOTE: Required if digital product and required with course_ids. Either this or learndash_course_group_id |
topic_ids | []uint64 | array of learndash/TRULAV topic IDs NOTE: Required if digital product and required with course_ids. Either this or learndash_course_group_id |
short_video_ids | []uint64 | array of TRULAV short video IDs NOTE: Required if digital product. |
price (Required) | float64 | product's price |
gem_price | float64 | product's gem price NOTE: Required if digital product |
image_urls (Required) | []string | product's image URLs |
product_bumps | []uint64 | product's bumps (array of product IDs) |
start (Required) | uint64 | start time to set this product active (Unix timestamp) |
end (Required) | uint64 | time to set this product inactive (Unix timestamp) |
ac_tags | array of objects | list of Active Campaign's Tags to be added |
ac_tag_id | uint64 | Active Campaign tag ID if any. If it's not present, it will create new tag to AC |
ac_tag_name | string | Active Campaign tag name |
ac_automations | array of objects | list of Active Campaign's Automations to be added |
ac_automation_id (Required) | uint64 | Active Campaign automation ID |
ac_automation_name (Required) | string | Active Campaign automation name |
ac_list | array of objects | list of Active Campaign's List to be added |
ac_list_id (Required) | uint64 | Active Campaign list ID |
ac_list_name (Required) | string | Active Campaign list name |
product_category_id (Required) | uint64 | product category id |
Get Product Detail By Slug
curl -X GET "https://cart-api.lovecoach.id/content/products/detail/{productSlug}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 4,
"sku_no": "SKU000004 211207",
"product_name": "test product physical",
"display_name": "test display name",
"description": "test description",
"slug": "test-product-physical",
"product_url": "https://cart.lovecoach.id/test-product-physical",
"items": "item1|item2|item3",
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": "1,2,3",
"lesson_ids": "7,8",
"topic_ids": "100,101",
"short_video_ids": "1,3",
"product_price": 100000,
"gem_price": 1900,
"formatted_price": "Rp. 100.000,00",
"weight": 1000,
"subscription_type": null,
"product_type": {
"id": 2,
"name": "Physical",
"payment_types": null
},
"payment_type": {
"id": 1,
"name": "One Time"
},
"images": [
{
"id": 3,
"product_id": 4,
"image_path": "https://google.com"
}
],
"origin_city": {
"id": 5,
"province_id": 21,
"name": "Aceh Selatan"
},
"product_bumps": [
{
"id": 5,
"product": {
"id": 1,
"sku_no": "",
"product_name": "Test",
"description": "lbajdbaskdjbaskdjabsdkj",
"slug": "",
"learndash_id": 642,
"trulav_subscription_plan_id": 642,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"product_price": 10000,
"formatted_price": "",
"subscription_type": null,
"product_type": null,
"payment_type": null,
"images": null,
"product_bumps": null,
"status": null,
"product_category": {
"id": 2,
"name": "LRPS"
}
}
}
],
"status": {
"id": 2,
"label_idn": "Tidak Aktif",
"label_en": "Inactive"
},
"start_date": "09 Jan 2022 09:40:23",
"end_date": "08 Feb 2021 09:40:23"
}
}
This endpoint will get product's detail with given slug.
HTTP Request
GET https://cart-api.lovecoach.id/content/products/detail/{productSlug}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
productSlug (Required) | string | product slug |
Update Product
curl -X PUT "https://cart-api.lovecoach.id/content/products/{productID}"
-H "X-API-KEY: 123123123123"
Sample Request Payload for Physical Product:
{
"name": "test product physical 3",
"display_name":"test update display name",
"description": "test description",
"items": "item1|item2|item3",
"product_type_id": 2,
"payment_type_id": 1,
"price": 100000,
"weight": 1000,
"origin_city_id": 5,
"image_urls":["https://google.com"],
"product_bumps":[1],
"start": 1638839565,
"end": 1670375565,
"ac_tags": [
{
"ac_tag_name": " test tag jdo product digital2 "
},
{
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_automations": [
{
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression "
},
{
"ac_automation_id": 6,
"ac_automation_name": " Peserta The GLAM BETA "
}
],
"ac_list": [
{
"ac_list_id": 4,
"ac_list_name": "Subscriber List "
},
{
"ac_list_id": 5,
"ac_list_name": " Customer List "
}
],
"product_category_id": 2
}
Sample Request Payload for Digital Product w/ Learndash Course Group ID/TRULAV Subscription Plan ID:
{
"name": "test product digital",
"display_name":"test update display name",
"description": "test description",
"items": "item1|item2|item3",
"product_type_id": 1,
"payment_type_id": 2,
"subscription_type_id": 2,
"learndash_course_group_id": 1,
"price": 100000,
"gem_price": 1900,
"image_urls":["https://google.com"],
"product_bumps":[1],
"start": 1638839805,
"end": 1670375805,
"ac_tags": [
{
"ac_tag_name": " test tag jdo product digital2 "
},
{
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_automations": [
{
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression "
},
{
"ac_automation_id": 6,
"ac_automation_name": " Peserta The GLAM BETA "
}
],
"ac_list": [
{
"ac_list_id": 4,
"ac_list_name": "Subscriber List "
},
{
"ac_list_id": 5,
"ac_list_name": " Customer List "
}
],
"product_category_id": 2
}
Sample Request Payload for Digital Product w/ Learndash Course, Lesson, Topic, Short Video IDs:
{
"name": "test product digital",
"display_name":"test update display name",
"description": "test description",
"items": "item1|item2|item3",
"product_type_id": 1,
"payment_type_id": 1,
"course_ids": [1,2,3],
"lesson_ids":[7,8],
"topic_ids": [100,101],
"short_video_ids": [1,3],
"price": 100000,
"gem_price": 1900,
"image_urls":["https://google.com"],
"product_bumps":[1],
"start": 1638839805,
"end": 1670375805,
"ac_tags": [
{
"ac_tag_name": " test tag jdo product digital2 "
},
{
"ac_tag_id": 687,
"ac_tag_name": "ilaunchtrulav"
}
],
"ac_automations": [
{
"ac_automation_id": 3,
"ac_automation_name": "Lead First Impression "
},
{
"ac_automation_id": 6,
"ac_automation_name": " Peserta The GLAM BETA "
}
],
"ac_list": [
{
"ac_list_id": 4,
"ac_list_name": "Subscriber List "
},
{
"ac_list_id": 5,
"ac_list_name": " Customer List "
}
],
"product_category_id": 2
}
Sample JSON successful response:
{
"success": true,
"data": "Product Updated Successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "product name already exists"
}
This endpoint will update product with given productID
.
HTTP Request
PUT https://cart-api.lovecoach.id/content/products/{productID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
productID (Required) | uint64 | ID of the product |
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
name (Required) | string | product name |
display_name (Required) | string | product display name |
description (Required) | string | description of the product |
items (Required) | string | "what will you get" field, should be seperated by " |
product_type_id (Required) | uint64 | product type ID (digital or physical) |
payment_type_id (Required) | uint64 | payment type ID (one time or recurring) |
subscription_type_id | uint64 | subscription type ID (1 month, 3 months, etc) NOTE: Required if recurring payment |
learndash_course_group_id | uint64 | learndash course group/TRULAV subscription plan ID NOTE: Required if digital product. Either this or course_ids |
course_ids | []uint64 | array of learndash/TRULAV course IDs NOTE: Required if digital product. Either this or learndash_course_group_id |
lesson_ids | []uint64 | array of learndash/TRULAV lesson IDs NOTE: Required if digital product and required with course_ids. Either this or learndash_course_group_id |
topic_ids | []uint64 | array of learndash/TRULAV topic IDs NOTE: Required if digital product and required with course_ids. Either this or learndash_course_group_id |
short_video_ids | []uint64 | array of TRULAV short video IDs NOTE: Required if digital product. |
price (Required) | float64 | product's price |
gem_price | float64 | product's gem price NOTE: Required if digital product |
image_urls (Required) | []string | product's image URLs |
product_bumps | []uint64 | product's bumps (array of product IDs) |
start (Required) | uint64 | start time to set this product active (Unix timestamp) |
end (Required) | uint64 | time to set this product inactive (Unix timestamp) |
ac_tags | array of objects | list of Active Campaign's Tags to be added |
ac_tag_id | uint64 | Active Campaign tag ID if any. If it's not present, it will create new tag to AC |
ac_tag_name | string | Active Campaign tag name |
ac_automations | array of objects | list of Active Campaign's Automations to be added |
ac_automation_id (Required) | uint64 | Active Campaign automation ID |
ac_automation_name (Required) | string | Active Campaign automation name |
ac_list | array of objects | list of Active Campaign's List to be added |
ac_list_id (Required) | uint64 | Active Campaign list ID |
ac_list_name (Required) | string | Active Campaign list name |
product_category_id (Required) | uint64 | product category id |
Delete Product
curl -X DELETE "https://cart-api.lovecoach.id/content/products/{productID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": "Product deleted successfully"
}
Sample JSON response with errors:
{
"success": false,
"error": "You're not allowed to perform this action"
}
This endpoint will delete product with given productID
.
HTTP Request
DELETE https://cart-api.lovecoach.id/content/products/{productID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
productID (Required) | uint64 | ID of the product |
Locations
Get Province List
curl -X GET "https://cart-api.lovecoach.id/content/location/provinces"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"name": "Bali"
}
]
}
This endpoint retrieves list of provinces in Indonesia.
HTTP Request
GET https://cart-api.lovecoach.id/content/location/provinces
Query Parameters
Parameter | Description |
---|---|
province_name | province name to be filtered |
Get City List
curl -X GET "https://cart-api.lovecoach.id/content/location/cities/{provID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"province_id": 21,
"name": "Kabupaten Aceh Barat"
},
{
"id": 2,
"province_id": 21,
"name": "Kabupaten Aceh Barat Daya"
}
]
}
This endpoint retrieves list of cities.
HTTP Request
GET https://cart-api.lovecoach.id/content/location/cities/{provID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
provID (Required) | uint64 | province ID |
Query Parameters
Parameter | Description |
---|---|
city_name | city name to be filtered |
Get District List
curl -X GET "https://cart-api.lovecoach.id/content/location/districts/{cityID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": 1,
"province_id": 21,
"city_id": 1,
"name": "Kabupaten Arongan Lambalek"
},
{
"id": 2,
"province_id": 21,
"city_id": 1,
"name": "Kabupaten Bubon"
}
]
}
This endpoint retrieves list of districts in Indonesia.
HTTP Request
GET https://cart-api.lovecoach.id/content/location/districts/{cityID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
cityID (Required) | uint64 | city ID |
Query Parameters
Parameter | Description |
---|---|
district_name | district name to be filtered |
Shippings
Get Shipping Cost
curl -X POST "https://cart-api.lovecoach.id/content/shippings/cost"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"name": "Jalur Nugraha Ekakurir (JNE)",
"code": "jne",
"costs": [
{
"cost": [
{
"etd": "6-7",
"note": "",
"value": 24000
}
],
"description": "Ongkos Kirim Ekonomis",
"service": "OKE"
},
{
"cost": [
{
"etd": "4-5",
"note": "",
"value": 30000
}
],
"description": "Layanan Reguler",
"service": "REG"
}
]
},
{
"name": "POS Indonesia (POS)",
"code": "pos",
"costs": [
{
"cost": [
{
"etd": "3 HARI",
"note": "",
"value": 26000
}
],
"description": "Paket Kilat Khusus",
"service": "Paket Kilat Khusus"
},
{
"cost": [
{
"etd": "1 HARI",
"note": "",
"value": 38000
}
],
"description": "Express Next Day Barang",
"service": "Express Next Day Barang"
}
]
},
{
"name": "Citra Van Titipan Kilat (TIKI)",
"code": "tiki",
"costs": [
{
"cost": [
{
"etd": "4",
"note": "",
"value": 30000
}
],
"description": "Economy Service",
"service": "ECO"
},
{
"cost": [
{
"etd": "3",
"note": "",
"value": 36000
}
],
"description": "Regular Service",
"service": "REG"
}
]
},
{
"name": "RPX Holding (RPX)",
"code": "rpx",
"costs": [
{
"cost": [
{
"etd": "",
"note": "",
"value": 48000
}
],
"description": "Regular Package",
"service": "RGP"
}
]
},
{
"name": "Pandu Express",
"code": "pandu",
"costs": []
}
]
}
This endpoint retrieves shipping cost based on the given input.
HTTP Request
POST https://cart-api.lovecoach.id/content/shippings/cost
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
origin_id (Required) | uint64 | origin ID of origin type (city ID or subdistrict ID) |
origin_type (Required) | string | origin type (city or subdistrict) |
destination_id (Required) | uint64 | destination ID of destination type (city ID or subdistrict ID) |
destination_type (Required) | string | destination type (city or subdistrict) |
weight (Required) | uint | weight of the goods |
Get Waybill Tracking
curl -X POST "https://cart-api.lovecoach.id/content/shippings/tracking"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"courier": "jne",
"waybill": "123456789"
}
Sample JSON successful response:
{
"success": true,
"data": {
"transaction_no": "JDPRDINV-230317-123123123-1",
"summary": {
"courier_code": "jne",
"courier_name": "JNE",
"waybill_number": "123456789",
"service_code": "REG",
"waybill_date": "07 Mar 2023",
"shipper_name": "bestdeal official",
"receiver_name": "Some Buyer",
"origin": "12345",
"destination": "15143",
"status": "DELIVERED"
},
"details": {
"waybill_number": "123456789",
"waybill_date": "07 Mar 2023",
"waybill_time": "11:59:11",
"origin": "12345",
"destination": "15143",
"shipper_name": "",
"shipper_address1": "",
"shipper_address2": "",
"shipper_address3": "",
"shipper_city": "10150",
"receiver_name": "Ivan Lie",
"receiver_address1": "",
"receiver_address2": "",
"receiver_address3": "",
"receiver_city": "15143"
},
"delivery_status": {
"status": "DELIVERED",
"pod_receiver": "pos Scurity (Drop box )",
"pod_date": "08 Mar 2023",
"pod_time": "18:05:00"
},
"manifest": [
{
"manifest_code": 250,
"manifest_description": "Delivery sukses oleh Someone dan paket telah diterima oleh pos Scurity(Drop box ). Terima kasih sudah menggunakan jasa JNE.",
"manifest_date": "08 Mar 2023",
"manifest_time": "18:05:00",
"city_name": "City Name"
}
]
}
}
This endpoint retrieves transaction waybill tracking on the given input.
HTTP Request
POST https://cart-api.lovecoach.id/content/shippings/tracking
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
courier (Required) | string | shipping courier POSSIBLE VALUES: jne pos jnt |
waybill (Required) | string | tracking number to be tracked |
Upload Transaction Waybills
curl -X POST "https://cart-api.lovecoach.id/content/shippings/upload-waybills"
-H "X-API-KEY: 123123123123"
--form 'waybill_file=@"./waybill.csv"'
Sample JSON successful response:
{
"success": true,
"data": "Upload waybills successful"
}
This endpoint will upload transaction waybills with the given waybill file and set the tracking number to corresponding transaction in it.
Example CSV File Contents
transaction_id, | transaction_no, | waybill_no |
---|---|---|
1, | jdpr-123123, | nba12345 |
HTTP Request
POST https://cart-api.lovecoach.id/content/shippings/upload-waybills
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
waybill_file (Required) | Multipart File | waybill csv file |
Gems
Gems Statuses
Type | Description |
---|---|
1 | Active |
2 | Inactive |
Get Gem List
curl -X GET "https://cart-api.lovecoach.id/content/gems"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 1,
"thumbnail_url": null,
"amount": 10,
"price": 10000,
"formatted_price": "Rp. 10.000,00",
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
}
},
{
"id": 2,
"thumbnail_url": null,
"amount": 50,
"price": 50000,
"formatted_price": "Rp. 50.000,00",
"status": {
"id": 1,
"label_idn": "Aktif",
"label_en": "Active"
}
}
],
"pagination": {
"has_next": false,
"has_previous": false,
"page": 1,
"per_page": 10,
"total_items": 2,
"total_pages": 1
}
}
}
This endpoint retrieves list of gems.
HTTP Request
GET https://cart-api.lovecoach.id/content/gems
Query Parameters
Parameter | Description |
---|---|
amount | gem amount to be filtered |
price | gem price to be filtered |
status | gem status to be filtered |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
Wordpress
Get WP User Detail
curl -X GET "https://cart-api.lovecoach.id/content/wp/user-detail/{userID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 1,
"name": "WP User",
"link": "https://trulav.id/author/wpuser/",
"slug": "wpuser",
"member_rest": {
"id": 5,
"user_email": "wpuser@gmail.com",
"display_name": "WP User",
"cover_image": "https://trulav.id/wp-content/uploads/buddypress/members/0/cover-image/61fcaa00d4088-bp-cover-image.jpg"
},
"avatar_url": "https://trulav.id/wp-content/uploads/avatars/2197/628b7507ae67f-bpfull.jpg"
}
}
Sample JSON response with errors:
{
"success": false,
"error": "Failed to get WP user detail. Error: rest_user_invalid_id"
}
This endpoint retrieves WP user detail with given userID.
HTTP Request
GET https://cart-api.lovecoach.id/content/wp/user-detail/{userID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
userID (Required) | uint64 | WP user ID/TRULAV User ID |
Get WP User Point
curl -X GET "https://cart-api.lovecoach.id/content/wp/user-point/{userID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"raw": 0,
"formatted": "0 Credits"
}
}
Sample JSON response with errors:
{
"success": false,
"error": "Failed to get WP user point. Error: rest_invalid_field"
}
This endpoint retrieves WP user point with given userID.
HTTP Request
GET https://cart-api.lovecoach.id/content/wp/user-point/{userID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
userID (Required) | uint64 | WP user ID/TRULAV user ID |
Query Parameters
Parameter | Description |
---|---|
point_type | WP point type. default: "credit" |
Get WP User Group
curl -X GET "https://cart-api.lovecoach.id/content/wp/user-group/{userID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 2056,
"slug": "vip",
"title": {
"rendered": "VIP"
}
}
}
Sample JSON response with errors:
{
"success": false,
"error": "failed to check user WP learndash group. error: data doesn't exist"
}
This endpoint retrieves WP Learndash user group with given userID.
HTTP Request
GET https://cart-api.lovecoach.id/content/wp/user-group/{userID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
userID (Required) | uint64 | WP user ID /TRULAV user ID |
Transactions
Top Up Gem Transaction Statuses
Status | Description |
---|---|
1 | Unpaid |
2 | Paid |
3 | Expired |
Product Transaction Statuses
Status | Description |
---|---|
1 | Unpaid |
2 | Payment In Progress |
3 | Paid |
4 | Expired |
5 | Payment Subscription In Progress |
6 | Inactive |
7 | Preparing Order |
8 | On Shipping |
9 | Delivered |
Create Top Up Gem Transaction
curl -X POST "https://cart-api.lovecoach.id/content/transaction-gems/top-up"
-H "X-API-KEY: 123123123123"
Sample Request Payload for Top Up Gem With VA Payment Method:
{
"user_wp_id": 1,
"user_name": " Foo Bar ",
"email":"foo@mail.id",
"gem_id": 1,
"gem_amount": 1200,
"price": 120000,
"total": 120000,
"payment_method": "VA",
"bank_code":"BCA"
}
Sample Request Payload for Top Up Gem With E-Wallet OVO Payment Method:
{
"user_wp_id": 1,
"user_name": " Foo Bar ",
"email":"foo@mail.id",
"gem_id": 1,
"gem_amount": 1200,
"price": 120000,
"total": 120000,
"payment_method": "EWALLET",
"ewallet_type":"OVO",
"phone_number":"+62812323123"
}
Sample Request Payload for Top Up Gem With E-Wallet SHOPEE_PAY, LINK_AJA, DANA Payment Method:
{
"user_wp_id": 1,
"user_name": " Foo Bar ",
"email":"foo@mail.id",
"gem_id": 1,
"gem_amount": 1200,
"price": 120000,
"total": 120000,
"payment_method": "EWALLET",
"ewallet_type":"DANA"
}
Sample Request Payload for Top Up Gem With TRANSFER Payment Method:
{
"user_wp_id": 1,
"user_name": " Foo Bar ",
"email":"foo@mail.id",
"gem_id": 1,
"gem_amount": 1200,
"price": 120000,
"total": 120000,
"payment_method": "TRANSFER"
}
Sample Request Payload for Top Up Gem With QRIS Payment Method:
{
"user_wp_id": 1,
"user_name": " Foo Bar ",
"email":"foo@mail.id",
"gem_id": 1,
"gem_amount": 1200,
"price": 120000,
"total": 120000,
"payment_method": "QRIS"
}
Sample JSON successful response With E-Wallet SHOPEE_PAY, LINK_AJA, DANA Payment Method:
{
"success": true,
"data": {
"id": 10,
"transaction_no": "JDGEMINV5-220122-1642830602-4",
"user_wp_id": 5,
"user_name": "Foo",
"user_email": "foo@mail.id",
"gem_amount": 100,
"price": "Rp. 100.000,00",
"total": "Rp. 100.000,00",
"transaction_date": "22 Jan 2022",
"expired_date": "22 Jan 2022 13:20:02",
"payment_info": {
"payment_method": {
"id": 4,
"type_idn": "E-wallet",
"type_en": "E-wallet"
},
"ewallet_payment_info": {
"id": 2,
"ewallet_type": "SHOPEE_PAY",
"ewallet_actions": {
"desktop_checkout_url": null,
"mobile_checkout_url": "https://ewallet-mock-connector.xendit.co/v1/ewallet_connector/checkouts?token=b3b7a7f2-4b7f-4488-9549-66b371fa8335"
}
},
"price": "Rp. 100.000,00"
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"expires_in": 0
}
}
Sample JSON successful response With E-Wallet OVO Payment Method:
{
"success": true,
"data": {
"id": 10,
"transaction_no": "JDGEMINV5-220122-1642830602-4",
"user_wp_id": 5,
"user_name": "Foo",
"user_email": "foo@mail.id",
"gem_amount": 100,
"price": "Rp. 100.000,00",
"total": "Rp. 100.000,00",
"transaction_date": "22 Jan 2022",
"expired_date": "22 Jan 2022 13:20:02",
"payment_info": {
"payment_method": {
"id": 4,
"type_idn": "E-wallet",
"type_en": "E-wallet"
},
"ewallet_payment_info": {
"id": 2,
"ewallet_type": "OVO",
"ewallet_actions": {
"desktop_checkout_url": null,
"mobile_checkout_url": null
}
},
"price": "Rp. 100.000,00"
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"expires_in": 0
}
}
Sample JSON successful response With VA Payment Method:
{
"success": true,
"data": {
"id": 10,
"transaction_no": "JDGEMINV5-220122-1642832135-5",
"user_wp_id": 5,
"user_name": "Foo Bar",
"user_email": "fooy@mail.id",
"gem_amount": 100,
"price": "Rp. 100.000,00",
"total": "Rp. 100.000,00",
"transaction_date": "22 Jan 2022",
"expired_date": "22 Jan 2022 19:15:35",
"payment_info": {
"payment_method": {
"id": 1,
"type_idn": "Virtual Account",
"type_en": "Virtual Account"
},
"bank_code": "BCA",
"account_number": "107669999406898",
"account_user_name": "Rinaldy",
"price": "Rp. 100.000,00"
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"expires_in": 0
}
}
Sample JSON successful response With TRANSFER Payment Method:
{
"success": true,
"data": {
"id": 12,
"transaction_no": "JDGEMINV5-220122-1642832286-6",
"user_wp_id": 5,
"user_name": "Foo Bar",
"user_email": "foo@mail.id",
"gem_amount": 100,
"price": "Rp. 100.000,00",
"total": "Rp. 100.000,00",
"transaction_date": "22 Jan 2022",
"expired_date": "25 Jan 2022 13:18:06",
"payment_info": {
"payment_method": {
"id": 3,
"type_idn": "Transfer",
"type_en": "Transfer"
},
"price": "Rp. 100.000,00"
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"expires_in": 0
}
}
Sample JSON successful response With QRIS Payment Method:
{
"success": true,
"data": {
"id": 653,
"transaction_no": "JDGEMINV2197-230123-1674454970819-6",
"user_wp_id": 5,
"user_name": "Foo Bar",
"user_email": "foo@mail.com",
"gem_amount": 10,
"price": "Rp. 100.000,00",
"total": "Rp. 100.000,00",
"transaction_date": "23 Jan 2023",
"expired_date": "23 Jan 2023 13:23:50",
"payment_info": {
"payment_method": {
"id": 6,
"type_idn": "QRIS",
"type_en": "QRIS"
},
"qris_payment_info": {
"id": 13,
"qris_type": "DYNAMIC",
"qr_string": "some-random-qr-string",
"expired_at": "23 Jan 2023 13:23:50 WIB"
},
"price": "Rp. 100.000,00",
"gem_price": null
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"expires_in": 57
}
}
Sample JSON response with errors:
{
"success": false,
"error": "payment method must be one of [VA EWALLET TRANSFER QRIS]"
}
This endpoint will create a top up gem transaction.
HTTP Request
POST https://cart-api.lovecoach.id/content/transaction-gems/top-up
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
user_wp_id (Required) | uint64 | wordpress user ID *NOTE: since September 2023 this will be TRULAV user ID * |
user_name (Required) | string | wordpress user name |
email (Required) | string | wordpress user email |
gem_id (Required) | uint64 | gem ID |
gem_amount (Required) | uint64 | gem amount |
price (Required) | float64 | gem's price |
total (Required) | float64 | total price. NOTE: Required if digital product |
payment_method (Required) | string | payment method. POSSIBLE VALUES: VA EWALLET TRANSFER QRIS |
bank_code | string | bank code. NOTE: Required if payment method is VA. POSSIBLE VALUES: BCA BRI BNI MANDIRI PERMATA |
ewallet_type | string | e-wallet type. NOTE: Required if payment method is EWALLET. POSSIBLE VALUES: OVO DANA LINK_AJA SHOPEE_PAY |
phone_number | string | user's phone number in E164 Format (+628121234). NOTE: Required if payment method is EWALLET OVO |
Create Product Transaction - TruLav
curl -X POST "https://cart-api.lovecoach.id/content/transaction-products/trulav"
-H "X-API-KEY: 123123123123"
Sample Request Payload for Trulav Product Transaction:
{
"product_id":3,
"user_wp_id": 8,
"user_name": "Foo Bar",
"email": "foobar@mail.com",
"credit_price": 1820,
"total": 1820,
"payment_method": "CREDIT",
"subscription_type_id": 5,
"subscription_type": "0 lifetime"
}
Sample Request Payload for Trulav Product Transaction w/ Promo:
{
"product_id":3,
"user_wp_id": 8,
"user_name": "Foo Bar",
"email": "foobar@mail.com",
"credit_price": 1820,
"total": 1820,
"payment_method": "CREDIT",
"subscription_type_id": 5,
"subscription_type": "0 lifetime",
"promo_code": "ABC88817",
"promo_price": 100,
"total_without_promo": 1920
}
Sample Request Payload for Trulav Product Transaction w/ Product Bumps:
{
"product_id":3,
"user_wp_id": 8,
"user_name": "Foo Bar",
"email": "foobar@mail.com",
"credit_price": 1820,
"total": 1820,
"payment_method": "CREDIT",
"subscription_type_id": 5,
"subscription_type": "0 lifetime",
"product_bumps": [
{
"product_id": 1,
"product_name": "Product Name",
"product_sku_no": "SKU 123123123",
"product_price": 80000,
"product_credit_price": 800,
"trulav_subscription_plan_id": 123,
"course_ids": "1234,4567",
"lesson_ids": "1,2",
"topic_ids": "3,4",
"short_video_ids": "1,3",
"subscription_type_id": 5,
"subscription_type": "0 lifetime"
}
]
}
Sample JSON successful response With CREDIT Payment Method:
{
"success": true,
"data": {
"id": 9,
"transaction_no": "JDPRDINV824640506288-220131-1643608795-7",
"user_wp_id": 8,
"user_name": "Foo Bar",
"user_email": "foo@mail.com",
"address": null,
"gem_price": 990,
"price": "Rp. 0,00",
"total": "990 Credit/s",
"transaction_date": "31 Jan 2022",
"payment_info": {
"payment_method": {
"id": 5,
"type_idn": "Credit",
"type_en": "Credit"
},
"price": "",
"gem_price": 990
},
"status": {
"id": 2,
"label_idn": "Dalam Proses",
"label_en": "Waiting For Confirmation"
},
"shipping_data": null,
"expires_in": 0
}
}
Sample JSON response with errors:
{
"success": false,
"error": "payment method must be one of [VA EWALLET TRANSFER CREDIT]"
}
This endpoint will create a TruLav product transaction.
HTTP Request
POST https://cart-api.lovecoach.id/content/transaction-products/trulav
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
product_id (Required) | uint64 | product ID |
user_wp_id | uint64 | wordpress user ID *NOTE: since September 2023 this will be TRULAV user ID * |
user_name (Required) | string | user name |
email (Required) | string | user email |
credit_price | uint64 | product's credit price NOTE: Required if digital product |
total (Required) | float64 | gem amount |
payment_method (Required) | string | payment method. POSSIBLE VALUES: VA EWALLET TRANSFER CREDIT |
subscription_type_id | uint64 | subscription type ID. NOTE: Required if digital product |
subscription_type | string | subscription type. NOTE: Required if digital product |
payment_method (Required) | string | payment method. POSSIBLE VALUES: VA EWALLET TRANSFER CREDIT |
bank_code | string | bank code. NOTE: Required if payment method is VA. POSSIBLE VALUES: BCA BRI BNI MANDIRI PERMATA |
ewallet_type | string | e-wallet type. NOTE: Required if payment method is EWALLET. POSSIBLE VALUES: OVO DANA LINK_AJA SHOPEE_PAY |
phone_number | string | user's phone number in E164 Format (+628121234). NOTE: Required if payment method is EWALLET OVO |
promo_code | string | promo code |
promo_price | float64 | promo price |
total_without_promo | float64 | total without promo price |
product_bumps | array of objects | list of product bumps |
product_id (Required) | string | product ID of product bump |
product_name (Required) | string | product's name |
product_sku_no (Required) | string | product's SKU No. |
product_price (Required) | string | product's price |
product_credit_price (Required) | string | product's credit price |
trulav_subscription_plan_id | string | product's Trulav subscription plan ID |
course_ids | string | product's LearnDash/Trulav Course IDs separated by comma with no spaces before and after the comma ("1,2,3") |
lesson_ids | string | product's LearnDash/Trulav Lesson IDs separated by comma with no spaces before and after the comma ("1,2,3") |
topic_ids | string | product's LearnDash/Trulav Topic IDs separated by comma with no spaces before and after the comma ("1,2,3") |
short_video_ids | string | product's Trulav Short Video IDs separated by comma with no spaces before and after the comma ("1,2,3") |
subscription_type_id | uint64 | subscription type ID. |
subscription_type | string | subscription type. |
Create Product Transaction - Non TruLav
curl -X POST "https://cart-api.lovecoach.id/content/transaction-products/transaction/non-trulav"
-H "X-API-KEY: 123123123123"
Sample Request Payload for Create Transaction With VA Payment Method:
{
"product_id":4,
"user_data" :{
"user_name": "Foo Bar",
"email": "foo@mail.com",
"phone_number": "08123123123"
},
"price": 22000,
"total": 22000,
"payment_method": "VA",
"bank_code": "BNI"
}
Sample Request Payload for Create Transaction With E-Wallet OVO Payment Method:
{
"product_id":4,
"user_data" :{
"user_name": "Foo Bar",
"email": "foo@mail.com",
"phone_number": "08123123123"
},
"price": 22000,
"total": 22000,
"payment_method": "EWALLET",
"ewallet_type": "OVO",
"phone_number": "+62812323123"
}
Sample Request Payload for Create Transaction With Promo:
{
"product_id":4,
"user_data" :{
"user_name": "Foo Bar",
"email": "foo@mail.com",
"phone_number": "08123123123"
},
"promo_data":{
"promo_code":"trulavku",
"promo_price":198000
},
"price": 22000,
"total": 22000,
"payment_method": "EWALLET",
"ewallet_type": "OVO",
"phone_number": "+62812323123"
}
Sample Request Payload for Create Transaction With Product Bumps:
{
"product_id":4,
"user_data" :{
"user_name": "Foo Bar",
"email": "foo@mail.com",
"phone_number": "08123123123"
},
"promo_data":{
"promo_code":"trulavku",
"promo_price":198000
},
"price": 22000,
"total": 22000,
"payment_method": "EWALLET",
"ewallet_type": "OVO",
"phone_number": "+62812323123",
"product_bumps": [
{
"product_id": 28,
"product_name": "test product digital w/ course",
"product_sku_no": "SKU000028 220630",
"product_price": 10000,
"product_credit_price": 800,
"trulav_subscription_plan_id": 123,
"course_ids": "1234,4567",
"lesson_ids": "1,2",
"topic_ids": "3,4",
"short_video_ids": "1,3",
"subscription_type_id": 5,
"subscription_type": "0 lifetime"
}
]
}
Sample Request Payload for Create Transaction With E-Wallet SHOPEE_PAY, LINK_AJA, DANA Payment Method:
{
"product_id":4,
"user_data" :{
"user_name": "Foo Bar",
"email": "foo@mail.com",
"phone_number": "08123123123"
},
"price": 22000,
"total": 22000,
"payment_method": "EWALLET",
"ewallet_type": "DANA"
}
Sample Request Payload for Create Transaction With QRIS Payment Method:
{
"product_id":4,
"user_data" :{
"user_name": "Foo Bar",
"email": "foo@mail.com",
"phone_number": "08123123123"
},
"price": 22000,
"total": 22000,
"payment_method": "QRIS",
}
Sample JSON successful response With E-Wallet SHOPEE_PAY, LINK_AJA, DANA Payment Method:
{
"success": true,
"data": {
"id": 43,
"transaction_no": "JDPRDINV-220218-1645191343-9",
"user_wp_id": null,
"trulav_user_id": null,
"user_name": "Foo Bar",
"user_email": "foo@mail.com",
"address": null,
"gem_price": 0,
"price": "Rp. 22.000,00",
"total": "Rp. 22.000,00",
"transaction_date": "18 Feb 2022",
"expired_date": "18 Feb 2022 21:05:43",
"payment_info": {
"payment_method": {
"id": 4,
"type_idn": "E-wallet",
"type_en": "E-wallet"
},
"ewallet_payment_info": {
"id": 23,
"ewallet_type": "DANA",
"ewallet_actions": {
"desktop_checkout_url": "https://ewallet-mock-connector.xendit.co/v1/ewallet_connector/checkouts?token=0d36af5b-b0e7-4ce5-99a2-180e4936cc1a",
"mobile_checkout_url": "https://ewallet-mock-connector.xendit.co/v1/ewallet_connector/checkouts?token=0d36af5b-b0e7-4ce5-99a2-180e4936cc1a"
}
},
"price": "Rp. 22.000,00",
"gem_price": null
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"shipping_data": null,
"expires_in": 1798,
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"notes": "-",
"shipping_cost": "Rp. 0,00"
}
}
Sample JSON successful response With E-Wallet OVO Payment Method:
{
"success": true,
"data": {
"id": 44,
"transaction_no": "JDPRDINV-220218-1645191984-10",
"user_wp_id": null,
"trulav_user_id": null,
"user_name": "Foo Bar",
"user_email": "foo@mail.com",
"address": null,
"gem_price": 0,
"price": "Rp. 22.000,00",
"total": "Rp. 22.000,00",
"transaction_date": "18 Feb 2022",
"expired_date": "18 Feb 2022 20:47:19",
"payment_info": {
"payment_method": {
"id": 4,
"type_idn": "E-wallet",
"type_en": "E-wallet"
},
"ewallet_payment_info": {
"id": 24,
"ewallet_type": "OVO",
"ewallet_actions": {
"desktop_checkout_url": null,
"mobile_checkout_url": null
}
},
"price": "Rp. 22.000,00",
"gem_price": null
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"shipping_data": null,
"expires_in": 53,
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"notes": "-",
"shipping_cost": "Rp. 0,00"
}
}
Sample JSON successful response With VA Payment Method:
{
"success": true,
"data": {
"id": 45,
"transaction_no": "JDPRDINV-220218-1645192055-11",
"user_wp_id": null,
"trulav_user_id": null,
"user_name": "Foo Bar",
"user_email": "foo@mail.com",
"address": null,
"gem_price": 0,
"price": "Rp. 22.000,00",
"total": "Rp. 22.000,00",
"transaction_date": "18 Feb 2022",
"expired_date": "19 Feb 2022 02:47:35",
"payment_info": {
"payment_method": {
"id": 1,
"type_idn": "Virtual Account",
"type_en": "Virtual Account"
},
"bank_code": "BNI",
"account_number": "8808999903380269",
"account_user_name": "XDT-Foo Bar",
"price": "Rp. 22.000,00",
"gem_price": null
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"shipping_data": null,
"expires_in": 21598,
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"notes": "-",
"shipping_cost": "Rp. 0,00"
}
}
Sample JSON successful response With QRIS Payment Method:
{
"success": true,
"data": {
"id": 7721,
"transaction_no": "JDPRDINV-230124-1674525205429-2",
"user_wp_id": null,
"user_name": "Foo Bar",
"user_email": "foo@mail.com",
"address": null,
"gem_price": 0,
"price": "Rp. 22.000,00",
"total": "Rp. 22.000,00",
"transaction_date": "24 Jan 2023",
"expired_date": "24 Jan 2023 10:53:25",
"payment_info": {
"payment_method": {
"id": 6,
"type_idn": "QRIS",
"type_en": "QRIS"
},
"qris_payment_info": {
"id": 18,
"qris_type": "DYNAMIC",
"qr_string": "some-random-qr-string",
"expired_at": "24 Jan 2023 10:53:25 WIB"
},
"price": "Rp. 22.000,00",
"gem_price": null
},
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"shipping_data": null,
"expires_in": 7198,
"learndash_id": null,
"trulav_subscription_plan_id": null,
"course_ids": null,
"lesson_ids": null,
"topic_ids": null,
"short_video_ids": null,
"notes": "-",
"shipping_cost": "Rp. 0,00"
}
}
Sample JSON response with errors:
{
"success": false,
"error": "payment method must be one of [VA EWALLET TRANSFER QRIS]"
}
This endpoint will create a non-TruLav product transaction.
HTTP Request
POST https://cart-api.lovecoach.id/content/transaction-products/transaction/non-trulav
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
product_id (Required) | uint64 | product ID |
user_data | object | object of users |
user_name (Required) | string | user's name |
email (Required) | string | user's email |
phone_number (Required) | string | user's phone number |
promo_data | object | object of promo |
promo_code (Required) | string | promo code |
promo_price (Required) | string | promo price |
price (Required) | float64 | product's price |
total (Required) | float64 | gem amount |
payment_method (Required) | string | payment method. POSSIBLE VALUES: VA EWALLET TRANSFER CREDIT QRIS |
bank_code | string | bank code. NOTE: Required if payment method is VA. POSSIBLE VALUES: BCA BRI BNI MANDIRI PERMATA |
ewallet_type | string | e-wallet type. NOTE: Required if payment method is EWALLET. POSSIBLE VALUES: OVO DANA LINK_AJA SHOPEE_PAY |
phone_number | string | user's phone number in E164 Format (+628121234). NOTE: Required if payment method is EWALLET OVO |
product_bumps | array of objects | list of product bumps |
product_id (Required) | string | product ID of product bump |
product_name (Required) | string | product's name |
product_sku_no (Required) | string | product's SKU No. |
product_price (Required) | string | product's price |
product_credit_price (Required) | string | product's credit price |
trulav_subscription_plan_id | string | product's Trulav subscription plan ID |
course_ids | string | product's LearnDash/Trulav Course IDs separated by comma with no spaces before and after the comma ("1,2,3") |
lesson_ids | string | product's LearnDash/Trulav Lesson IDs separated by comma with no spaces before and after the comma ("1,2,3") |
topic_ids | string | product's LearnDash/Trulav Topic IDs separated by comma with no spaces before and after the comma ("1,2,3") |
short_video_ids | string | product's Trulav Short Video IDs separated by comma with no spaces before and after the comma ("1,2,3") |
subscription_type_id | uint64 | subscription type ID. |
subscription_type | string | subscription type. |
Statistics
Get Product Transaction Statistic
curl -X GET "https://cart-api.lovecoach.id/content/statistics/product-tx"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 1,
"transaction_no": "JDPRDINV-220328-1648462662793-49",
"product_name": "Webinar 90 Hari Bertemu Pria Tepat",
"product_display_name": "display name",
"product_category_name": "test category name",
"product_type_name": "Digital",
"learndash_id": null,
"user_wp_id": null,
"user_name": "Foo",
"email": "foo@gmail.com",
"phone_number": "08581234567",
"address": null,
"subscription_type": null,
"price": "Rp. 90.000,00",
"gem_price": 0,
"promo_price": "Rp. 0,00",
"shipping_cost": "Rp. 0,00",
"promo_code": null,
"total": "Rp. 90.000,00",
"status": {
"id": 3,
"label_idn": "Telah Dibayar",
"label_en": "Paid"
},
"payment_info": {
"payment_method": {
"id": 1,
"type_idn": "Virtual Account",
"type_en": "Virtual Account"
},
"bank_code": "BNI",
"account_number": "12345678",
"account_user_name": "XDT-Foo",
"price": "Rp. 90.000,00",
"gem_price": null
},
"product_bumps": null,
"created_at": "28 Mar 2022 17:17:43",
"paid_at": "28 Mar 2022 17:34:42",
"expired_at": "28 Mar 2022 23:17:43",
"address_info": null,
"shipping_info": null,
"notes": "-",
"subscription_renewed_at": "23 Nov 2022",
"subscription_end_at": "05 Nov 2022"
},
{
"id": 2,
"transaction_no": "JDPRDINV-220328-1648458365220-46",
"product_name": "Webinar 90 Hari Bertemu Pria Tepat",
"product_display_name": "display name",
"product_category_name": "test category name",
"product_type_name": "Digital",
"learndash_id": null,
"user_wp_id": null,
"user_name": "Foo",
"email": "foo@gmail.com",
"phone_number": "0858123456",
"address": null,
"subscription_type": null,
"price": "Rp. 90.000,00",
"gem_price": 0,
"promo_price": "Rp. 0,00",
"shipping_cost": "Rp. 0,00",
"promo_code": null,
"total": "Rp. 90.000,00",
"status": {
"id": 1,
"label_idn": "Belum Dibayar",
"label_en": "Unpaid"
},
"payment_info": {
"payment_method": {
"id": 1,
"type_idn": "Virtual Account",
"type_en": "Virtual Account"
},
"bank_code": "MANDIRI",
"account_number": "1234567",
"account_user_name": "Foo",
"price": "Rp. 90.000,00",
"gem_price": null
},
"product_bumps": [
{
"product_id": 28,
"sku_no": "SKU000028 220630",
"product_name": "test product digital w/ course",
"product_category_name": "category name",
"product_type_name": "type name",
"product_display_name": "category name",
"product_price": 10000,
"formatted_product_price": "Rp. 10.000,00",
"gem_price": 0,
"learndash_id": 1234,
"course_ids": null,
"product_category_name": "test category"
},
{
"product_id": 29,
"sku_no": "SKU000029 220630",
"product_name": "test update product 4444",
"product_category_name": "category name",
"product_type_name": "type name",
"product_display_name": "category name",
"product_price": 10000,
"formatted_product_price": "Rp. 10.000,00",
"gem_price": 0,
"learndash_id": null,
"course_ids": "3526,10309",
"product_category_name": "test category"
}
],
"created_at": "28 Mar 2022 16:06:05",
"paid_at": null,
"expired_at": "28 Mar 2022 22:06:05",
"address_info": null,
"shipping_info": null,
"notes": "-",
"subscription_renewed_at": "23 Nov 2022",
"subscription_end_at": "05 Nov 2022"
},
{
"id": 3,
"transaction_no": "JDPRDINV459-220328-1648454150853-1",
"product_name": "TruLav VIP Bulanan",
"product_display_name": "display name",
"product_category_name": "test category name",
"product_type_name": "Digital",
"learndash_id": 2056,
"user_wp_id": 22,
"user_name": "Foo",
"email": "foo@gmail.com",
"phone_number": null,
"address": null,
"subscription_type": null,
"price": "Rp. 0,00",
"gem_price": 1820,
"promo_price": "0 Credits",
"shipping_cost": "Rp. 0,00",
"promo_code": null,
"total": "1820 Credits",
"status": {
"id": 5,
"label_idn": "Pembayaran Langganan Sedang Berlangsung",
"label_en": "Subscription Payment In Progress"
},
"payment_info": {
"payment_method": {
"id": 5,
"type_idn": "Credit",
"type_en": "Credit"
},
"price": "",
"gem_price": 1820
},
"product_bumps": null,
"created_at": "28 Mar 2022 14:55:51",
"paid_at": null,
"expired_at": null,
"address_info": null,
"shipping_info": null,
"notes": "-",
"subscription_renewed_at": null,
"subscription_end_at": "05 Nov 2022"
},
{
"id": 4,
"transaction_no": "JDPRDINV-230326-1679818396211-1",
"product_name": "Testing - Buku Happy Love Guide1",
"product_display_name": "Testing -Buku Happy Love Guide1",
"product_category_name": "category name",
"product_type_name": "Physical",
"learndash_id": null,
"course_ids": null,
"user_wp_id": null,
"user_name": "tess",
"email": "tess@mail.com",
"phone_number": "08123123123",
"subscription_type": null,
"price": "Rp. 990,00",
"gem_price": 0,
"promo_price": "Rp. 0,00",
"shipping_cost": "Rp. 16.900,00",
"promo_code": null,
"total": "Rp. 16.890,00",
"status": {
"id": 7,
"label_idn": "Pesanan Sedang Disiapkan",
"label_en": "Preparing Order"
},
"payment_info": {
"payment_method": {
"id": 6,
"type_idn": "QRIS",
"type_en": "QRIS"
},
"price": "Rp. 16.890,00",
"gem_price": null
},
"product_bumps": null,
"created_at": "26 Mar 2023 15:13:16",
"paid_at": "26 Mar 2023 15:17:02",
"expired_at": "26 Mar 2023 17:13:16",
"address_info": {
"address": "jl. jalan abc no.123",
"province": "DKI Jakarta",
"city": "Jakarta Selatan",
"district": "Setiabudi",
"zipcode": "123456"
},
"shipping_info": {
"shipping_courier": "jne",
"shipping_service_type": "REG",
"shipping_etd": "Estimasi 3-4 HARI",
"shipping_origin_city": "Depok"
},
"notes": "test notes",
"subscription_renewed_at": null,
"subscription_end_at": null
}
],
"pagination": {
"has_next": false,
"has_previous": false,
"page": 1,
"per_page": 10,
"total_items": 3,
"total_pages": 1
}
}
}
This endpoint retrieves product transaction statistics based on given query. By default it will get product transaction statistics data with all product transaction statuses.
HTTP Request
GET https://cart-api.lovecoach.id/content/statistics/product-tx
Query Parameters
Parameter | Description |
---|---|
product_name | product name to be filtered |
user_name | user name to be filtered |
email to be filtered | |
status | product transaction statuses to be filtered NOTE: list of numbers separated by comma (no space), e.g. 1,2,3 |
start_date | product transaction start created date to be filtered, e.g. 2022-03-01 00:00:00 |
end_date | product transaction end created date to be filtered, e.g. 2022-03-02 23:59:59 |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
payment_method | payment method to be filtered POSSIBLE VALUES: VA EWALLET QRIS CREDIT |
category | product categories to be filtered NOTE: list of product category IDs separated by comma (no space), e.g. 1,2,3 |
product_type | product types to be filtered NOTE: list of product type IDs separated by comma (no space), e.g. 1,2 |
trx_no | transaction number to be filtered (exact number) |
Get Gem Top Up Transaction Statistic
curl -X GET "https://cart-api.lovecoach.id/content/statistics/gem-topup-tx"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 1,
"transaction_no": "JDGEMINV459-220328-1648454023059-1",
"user_wp_id": 22,
"user_name": "Foo",
"email": "foo@gmail.com",
"gem_amount": "5000 Credits",
"price": "Rp. 500.000,00",
"total": "Rp. 500.000,00",
"status": {
"id": 2,
"label_idn": "Telah Dibayar",
"label_en": "Paid"
},
"payment_info": {
"payment_method": {
"id": 1,
"type_idn": "Virtual Account",
"type_en": "Virtual Account"
},
"bank_code": "BCA",
"account_number": "1234567",
"account_user_name": "Foo",
"price": "Rp. 500.000,00",
"gem_price": null
},
"created_at": "28 Mar 2022",
"paid_at": "28 Mar 2022 14:55:11",
"expired_at": "28 Mar 2022"
},
{
"id": 2,
"transaction_no": "JDGEMINV3372-220328-1648450373783-6",
"user_wp_id": 22,
"user_name": "Foo",
"email": "foo@gmail.com",
"gem_amount": "847 Credits",
"price": "Rp. 100.000,00",
"total": "Rp. 100.000,00",
"status": {
"id": 3,
"label_idn": "Kedaluwarsa",
"label_en": "Expired"
},
"payment_info": {
"payment_method": {
"id": 1,
"type_idn": "Virtual Account",
"type_en": "Virtual Account"
},
"bank_code": "BCA",
"account_number": "1234567",
"account_user_name": "Foo",
"price": "Rp. 100.000,00",
"gem_price": null
},
"created_at": "28 Mar 2022",
"paid_at": null,
"expired_at": "28 Mar 2022"
}
],
"pagination": {
"has_next": true,
"has_previous": false,
"page": 1,
"per_page": 10,
"total_items": 2,
"total_pages": 1
}
}
}
This endpoint retrieves gem top up transaction statistics based on given query. By default it will get gem top up transaction statistics data with all gem top up transaction statuses.
HTTP Request
GET https://cart-api.lovecoach.id/content/statistics/gem-topup-tx
Query Parameters
Parameter | Description |
---|---|
user_name | user name to be filtered |
email to be filtered | |
status | gem top up transaction statuses to be filtered NOTE: list of numbers separated by comma (no space), e.g. 1,2,3 |
start_date | gem top up transaction start created date to be filtered, e.g. 2022-03-01 00:00:00 |
end_date | gem top up transaction end created date to be filtered, e.g. 2022-03-02 23:59:59 |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
payment_method | payment method to be filtered POSSIBLE VALUES: VA EWALLET QRIS |
Get Trulav Transaction Statistic
curl -X GET "https://cart-api.lovecoach.id/content/statistics/trulav-tx"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"extra_data": {
"net_income_by_membership": {
"vip": "Rp. 166.166,67",
"premium": "Rp. 0,00",
"total": "Rp. 166.166,67"
},
"royalty_by_membership": {
"vip": "Rp. 49.850,00",
"premium": "Rp. 0,00",
"total": "Rp. 49.850,00"
}
},
"items": [
{
"user_wp_id": 1234,
"user_name": "Foo Bar",
"email": "foo@mail.com",
"total_credit": 10000,
"total_credit_spent": 1000,
"total_credit_remainder": 9000,
"membership_level": "VIP 6 Month",
"gross_income": "Rp. 100.000,00",
"net_monthly_income": "Rp. 16.666,67",
"start_at": "29 Sep 2022",
"end_at": "29 Mar 2023"
}
],
"pagination": {
"has_next": false,
"has_previous": false,
"page": 1,
"per_page": 10,
"total_items": 1,
"total_pages": 1
}
}
}
This endpoint retrieves active trulav transaction statistics based on given query.
HTTP Request
GET https://cart-api.lovecoach.id/content/statistics/trulav-tx
Query Parameters
Parameter | Description |
---|---|
user_name | user name to be filtered |
email to be filtered | |
page | requested page. |
limit | requested limit to set the number of data to return. |
start_date | product transaction start date to be filtered, e.g. 2022-03-01 00:00:00 |
end_date | product transaction end date to be filtered, e.g. 2022-03-02 23:59:59 |
Get Trulav Retention Statistic
curl -X GET "https://cart-api.lovecoach.id/content/statistics/trulav-retention"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"product_type": "PREMIUM 1 Month",
"period": "2022-02",
"created_count": 6,
"end_count": 0,
"stay_count": 0,
"new_member_count": 0
}
}
This endpoint retrieves trulav retention statistics based on given query.
HTTP Request
GET https://cart-api.lovecoach.id/content/statistics/trulav-retention
Query Parameters
Parameter | Description |
---|---|
product_type | product type to be filtered |
year | year to be filtered, e.g. 2022 |
month | month to be filtered, e.g. 2 |
Users
Get Current Trulav Membership Transaction Info
curl -X GET "https://cart-api.lovecoach.id/content/users/trulav-membership-trx-info/{userID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 1,
"start_at": "21 Apr 2022",
"next_payment_at": "21 Jul 2022",
"credit_amount_due": 1234,
"membership_type": "VIP 3 Month"
}
}
Sample JSON response with errors:
{
"success": false,
"error": "data not found"
}
This endpoint retrieves current Trulav membership transaction info with given userID
HTTP Request
GET https://cart-api.lovecoach.id/content/users/trulav-membership-trx-info/{userID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
userID (Required) | uint64 | WP user ID |
Get Current Trulav Membership Transaction Histories
curl -X GET "https://cart-api.lovecoach.id/content/users/trulav-membership-trx-history/{userID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"trx_description": "test product course with bump course",
"total": "Rp 100.000",
"created_at": "17 July 2022"
}
],
"pagination": {
"has_next": true,
"has_previous": false,
"page": 1,
"per_page": 5,
"total_items": 11,
"total_pages": 3
}
}
}
This endpoint retrieves current Trulav membership transaction histories with given userID
HTTP Request
GET https://cart-api.lovecoach.id/content/users/trulav-membership-trx-history/{userID}
Query Parameters
Parameter | Description |
---|---|
product_trx_statuses | product transaction statuses separated by comma. Ex: 1,2,3 |
gem_topup_statuses | gem top up transaction statuses separated by comma. Ex: 1,2,3 |
page | requested page. |
limit | requested limit to set the number of data to return. |
Path Parameters
Parameter | Data Type | Description |
---|---|---|
userID (Required) | uint64 | WP user ID |
Active Campaign
Get AC Tag List
curl -X GET "https://cart-api.lovecoach.id/content/ac/tag/list"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"tag": "NL",
"description": "",
"tagType": "contact",
"cdate": "2017-09-06T04:40:57-05:00",
"links": {
"contactGoalTags": "https://mrjose.api-us1.com/api/3/tags/4/contactGoalTags"
},
"id": "4"
}
]
}
Sample JSON response with errors:
{
"success": false,
"error": "Failed to get AC tag list. Error: something wrong"
}
This endpoint retrieves Active Campaign Tag List.
HTTP Request
GET https://cart-api.lovecoach.id/content/ac/tag/list
Query Parameters
Parameter | Description |
---|---|
search | tag name to be filtered |
Get AC Automation List
curl -X GET "https://cart-api.lovecoach.id/content/ac/automation/list"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": "3",
"name": "Lead First Impression",
"status": "2"
}
]
}
Sample JSON response with errors:
{
"success": false,
"error": "Failed to get AC Automation List. Error: something wrong"
}
This endpoint retrieves Active Campaign Automation List.
HTTP Request
GET https://cart-api.lovecoach.id/content/ac/automation/list
Query Parameters
Parameter | Description |
---|---|
search | automation name to be filtered |
Get AC List
curl -X GET "https://cart-api.lovecoach.id/content/ac/list"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": [
{
"id": "4",
"name": "Subscriber List"
}
]
}
Sample JSON response with errors:
{
"success": false,
"error": "Failed to get AC list. Error: something wrong"
}
This endpoint retrieves Active Campaign List.
HTTP Request
GET https://cart-api.lovecoach.id/content/ac/list
Query Parameters
Parameter | Description |
---|---|
search | list name to be filtered |
Transaction Leads
Create Transaction Leads
curl -X POST "https://cart-api.lovecoach.id/content/transaction-leads"
-H "X-API-KEY: 123123123123"
Sample Request Payload:
{
"user_data": {
"user_wp_id": 1,
"user_name": "foo bar",
"email": "foobar@mail.com",
"phone_number": "08123123123"
},
"product_data": {
"product_id": 1,
"product_name": "test product",
"product_price": 100000.0,
"product_credit_price": 100.0,
"learndash_id": 1,
"course_ids": "1,2,3",
"lesson_ids": "4,5",
"topic_ids": "6,7",
"short_video_ids": "1,3",
"subscription_type_id": 1,
"subscription_type": "3 month",
"product_category_id": 1,
"product_category_name": "Event",
"product_bumps": [
{
"product_id": 31,
"product_name": "test product course2",
"product_price": 10000,
"product_credit_price": 100.0,
"course_ids": "3526",
"lesson_ids": "4,5",
"topic_ids": "6,7",
"learndash_id": 2056,
"subscription_id": 1,
"subscription_type": "3 month",
"product_category_id": 2,
"product_category_name": "LRPS"
}
]
}
}
Sample JSON successful response:
{
"success": true,
"data": "Create product transaction lead successful"
}
Sample JSON response with errors:
{
"success": false,
"error": "user data is required"
}
This endpoint will create transaction lead data.
HTTP Request
POST https://cart-api.lovecoach.id/content/transaction-leads
Request Body Parameters
Parameter | Data Type | Description |
---|---|---|
user_data (Required) | object | object of users |
user_wp_id | uint64 | user's Wordpress ID |
user_name (Required) | string | user's name |
email (Required) | string | user's email |
phone_number (Required) | string | user's phone number |
product_data (Required) | object | object of product |
product_id (Required) | uint64 | product ID |
product_name (Required) | string | product name |
product_price | float64 | product price |
product_credit_price | float64 | product credit price |
learndash_id | uint64 | product's LearnDash/TRULAV Course Group ID |
course_ids | string | product's LearnDash/TRULAV Course IDs separated by comma with no spaces before and after the comma ("1,2,3") |
lesson_ids | string | product's LearnDash/TRULAV Lesson IDs separated by comma with no spaces before and after the comma ("1,2,3") |
topic_ids | string | product's LearnDash/TRULAV Topic IDs separated by comma with no spaces before and after the comma ("1,2,3") |
short_video_ids | string | product's TRULAV Short Video IDs separated by comma with no spaces before and after the comma ("1,2,3") |
subcsription_type_id | string | subscription type ID |
subcsription_type | string | subscription type name |
product_category_id | string | product's category ID |
product_category_name | string | product's category name |
product_bumps | array of objects | list of product bumps |
product_id (Required) | string | product ID of product bump |
product_name (Required) | string | product's name |
product_price | string | product's price |
product_credit_price | string | product's credit price |
learndash_id | uint64 | product's LearnDash/TRULAV Course Group ID |
course_ids | string | product's LearnDash Course IDs separated by comma with no spaces before and after the comma ("1,2,3") |
lesson_ids | string | product's LearnDash/TRULAV Lesson IDs separated by comma with no spaces before and after the comma ("1,2,3") |
topic_ids | string | product's LearnDash/TRULAV Topic IDs separated by comma with no spaces before and after the comma ("1,2,3") |
short_video_ids | string | product's TRULAV Short Video IDs separated by comma with no spaces before and after the comma ("1,2,3") |
subscription_type_id | uint64 | subscription type ID. |
subscription_type | string | subscription type. |
product_category_id | string | product's category ID |
product_category_name | string | product's category name |
Get Transaction Lead List
curl -X GET "https://cart-api.lovecoach.id/content/transaction-leads"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"items": [
{
"id": 2,
"user_wp_id": null,
"user_name": "foobar",
"user_email": "foobar@mail.com",
"user_phone_number": "08123123123",
"address_data": null,
"shipping_data": null,
"product_id": null,
"product_name": "test product",
"product_category_name": "Event",
"subscription_type_id": null,
"subcsription_type": null,
"learndash_id": 1,
"trulav_subscription_plan_id": 1,
"course_ids": "1,2,3",
"lesson_ids": "3,4,5",
"topic_ids": "6,7,8",
"short_video_ids": "1,3",
"product_price": 100000,
"formatted_price": "Rp. 100.000,00",
"gem_price": 100,
"product_bumps": null,
"created_at": "06 Sep 2022 19:20:02"
}
],
"pagination": {
"has_next": true,
"has_previous": true,
"page": 2,
"per_page": 1,
"total_items": 3,
"total_pages": 3
}
}
}
This endpoint retrieves transaction leads based on given query.
HTTP Request
GET https://cart-api.lovecoach.id/content/transaction-leads
Query Parameters
Parameter | Description |
---|---|
product_name | product name to be filtered |
user_name | user name to be filtered |
email to be filtered | |
start_date | transaction lead start created date to be filtered, e.g. 2022-03-01 00:00:00 |
end_date | transaction lead end created date to be filtered, e.g. 2022-03-02 23:59:59 |
page | requested page. |
limit | requested limit to set the number of data to return. |
order_by | to sort the result, e.g. id ASC |
Get Transaction Lead Detail
curl -X GET "https://cart-api.lovecoach.id/content/transaction-leads/{trxLeadID}"
-H "X-API-KEY: 123123123123"
Sample JSON successful response:
{
"success": true,
"data": {
"id": 2,
"user_wp_id": null,
"user_name": "foobar",
"user_email": "foobar@gmail.com",
"user_phone_number": "08123123123",
"address_data": null,
"shipping_data": null,
"product_id": null,
"product_name": "test product",
"product_category_name": "Event",
"subscription_type_id": 1,
"subcsription_type": "3 month",
"learndash_id": 1,
"trulav_subscription_plan_id": 1,
"course_ids": "1,2,3",
"lesson_ids": "3,4,5",
"topic_ids": "6,7,8",
"short_video_ids": "1,3",
"product_price": 100000,
"formatted_price": "Rp. 100.000,00",
"gem_price": 100,
"product_bumps": [
{
"product_id": 31,
"product_name": "test product course2",
"product_category_name": "LRPS",
"product_price": 10000,
"formatted_product_price": "Rp. 10.000,00",
"gem_price": null,
"learndash_id": 2056,
"trulav_subscription_plan_id": 2056,
"course_ids": "3526",
"lesson_ids": "3,4,5",
"topic_ids": "6,7,8",
"short_video_ids": "1,3",
"subscription_type_id": 1,
"subscription_type": "3 month"
}
],
"created_at": "06 Sep 2022 19:20:02"
}
}
This endpoint will get transaction lead's detail
HTTP Request
GET https://cart-api.lovecoach.id/content/transaction-leads/{trxLeadID}
Path Parameters
Parameter | Data Type | Description |
---|---|---|
trxLeadID (Required) | uint64 | ID of the transaction lead |
Errors
The Love Journey API uses the following error codes:
Error Code | Meaning |
---|---|
200 | Successful response when getting, updating, or deleting data |
201 | Created -- data successfully created. |
400 | Bad Request -- Your request is invalid or missing parameters. |
401 | Unauthorized -- Your API key is wrong or missing API key. |
403 | Forbidden -- The endpoint can only be accessed using certain API key. |
500 | Internal Server Error -- Something wrong with the query or we had a problem with our server. Try again later. |