Order
Order Detail
Used to get the user"s order detail.
Endpoint:
/api/v5/entity/order/fetchHTTP Method: GET
Request Parameters:
Parameter Type Required Description corp_idString Y Organization ID order_idString Y Unique Order ID Response Format: JSON
Example Request
Bash Example with CURL:
curl -X GET
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
<API_SERVICE_HOST>/api/v5/entity/order/fetch?corp_id=<CORP_ID>&order_id=<ORDER_ID>
Expected Response
{
"code": 0,
"msg": "success.",
"data": {
"entity_id": "20240110-113333-463d557e06a6422d",
"application_fee_price": null,
"corp_id": "a1bcde2bf12345678910111213141516",
"course_code": "C-AB-CD-24-01-01",
"course_end_time": "2024-08-30 11:32:51",
"course_id": "31111119a6c411111182c7299fc4d52",
"ctime": "2024-01-10 11:00:00",
"currency": "cny",
"discounted_price": 0,
"installment_count": 1,
"is_deleted": false,
"leads_id": "1243d1234c518c526968334b943cc8d93",
"listed_price": 2000000,
"mtime": "2024-01-10 16:05:29",
"paid_price": 0,
"post_refund_price": 0,
"pre_sub_order_ids": [],
"source": "auto",
"status": "created",
"sub_order_ids": [
"1234569c249999999a6eecd1509fa7"
],
"total_price": 2000000,
"type": "personal",
"user_id": "11aaaaaaaaaaaaaaaaaaa",
"version": 0,
"coupon_ids": [],
"unpaid_price": 2000000,
"is_locked": true,
"sub_orders": []
}
}
Order List
Used to get orders along with its user details.
Endpoint:
/api/v5/entity/order/listHTTP Method: GET
Request Parameters:
Parameter Type Required Description corp_idString Y Organization ID pageInteger Optional Page number, start from 0, default 0 page_sizeInteger Optional Data size within one page, default 10, maximum 1000 start_dateString Optional Order created/modified time range starting point (string formatted as YYYY-MM-DD, e.g. 2024-02-01) end_dateString Optional Order created/modified time range ending point statusString Optional Order status (available status: created/locked/pending/success/canceled/expired/unconfirmed/tbd) time_range_typeString Optional Specifies whether the date range is based on the creation time or the last modification time (available type: create/modify) Response Format: JSON
Parameter Type Description entity_idString Order ID application_fee_priceString Application fee corp_idString Access to orders in the organization only course_codeString The identity code for course related to this order course_end_timeString The end of time for course related to this order course_idString The course ID ctimeString Order created time contract_idString The contract ID business_idString The business ID product_idString The product ID is_lockedBoolean If the order is locked course_idString The course ID course_start_timeString The start of time for course related to this order course_end_timeString The end of time for course related to this order course_codeString The identity code for course related to this order sourceString The source of the order listed_priceInteger The listed price foreign_service_chargeInteger The foreign service charge service_chargeInteger The service charge total_priceInteger The total price application_fee_priceInteger The application fee price application_fee_currencyString The application fee currency application_fee_exchange_rateInteger The application fee exchange rate application_fee_statusString The application fee status discounted_priceInteger Discounted price for this order currencyString Payment currency exchange_rateInteger The exchange rate post_refund_priceInteger Post refund price refund_priceInteger Refund price over_payment_priceInteger Over payment price last_refund_timeString The last refund time paid_priceInteger Paid fees of this order unpaid_priceInteger Unpaid fees of this order completed_timeString The time when the order is completed expired_timeString The time when the order is expired is_transferredBoolean If the order is transferred transferred_idString The transferred ID is_payment_changedBoolean If the payment method is changed executor_idString The executor ID installment_countInteger The number of installments have_preBoolean If there is a pre-order receipt_urlString The receipt URL is_company_transferBoolean If the order is company transfer invoice_idsList The invoice IDs share_proportionDict The share proportion remark_listList The remark list paid_sub_order_idsList The paid sub order IDs coupon_idsList The coupon IDs sub_order_idsList The sub order IDs pre_sub_order_idsList The pre-sub order IDs refund_idsList The refund IDs user_idString The user ID versionString The version of the order unpaid_priceInteger Unpaid fees of this order completed_timeString The time when the order is completed user_birthdayString The user"s birthday user_addressString The client"s address *(Value could be in Chinese) user_nationalityString The client"s nationality *(Value could be in Chinese) user_work_expString The client"s work experience *(Value could be in Chinese) user_departmentString The client"s department *(Value could be in Chinese) user_job_titleString The client"s job title *(Value could be in Chinese) user_company_nameString The client"s company name *(Value could be in Chinese) user_company_categoryString The client"s company category *(Value could be in Chinese) user_company_annual_revenueString The client"s company annual revenue *(Value could be in Chinese) user_company_sizeString The client"s company size *(Value could be in Chinese) user_current_work_startString The client"s current work start time user_parent_company_nameString The client"s parent company name user_industryString The client"s industry *(Value could be in Chinese) user_annual_incomeString The client"s annual income *(Value could be in Chinese) user_underling_numberInteger The client"s underling number user_top_gradesString The client"s top grades *(Value could be in Chinese) user_top_grades_institutionString The client"s top grades institution *(Value could be in Chinese) user_top_grades_dateString The client"s top grades date user_certificate_typeString The client"s certificate type *(Value could be in Chinese) user_certificate_idString The client"s certificate ID user_identification_typeString The client"s identification type *(Value could be in Chinese) user_identification_idString The client"s identification ID user_certificate_urlString The client"s certificate URL user_resume_file_urlString The client"s resume file URL user_academic_proof_urlString The client"s academic proof URL user_manual_wechatString The client"s manual wechat user_cityString The client"s city *(Value could be in Chinese) user_city_rawString The client"s city raw *(Value could be in Chinese) user_city_mobileString The client"s city mobile *(Value could be in Chinese) user_mobile_attributionString The client"s mobile attribution *(Value could be in Chinese) user_xiaoe_uidString The client"s xiaoe UID user_nameString The client"s name *(Value could be in Chinese) user_first_nameString The client"s first name *(Value could be in Chinese) user_last_nameString The client"s last name *(Value could be in Chinese) user_ageString The client"s age user_genderString The client"s gender *(Value could be in Chinese) user_linkedin_urlString The client"s linkedin URL
Example Request
Bash Example with CURL:
curl -X GET
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
<API_SERVICE_HOST>/api/v5/entity/order/list?corp_id=<CORP_ID>&page=<PAGE>&page_size=<PAGE_SIZE>&start_date=<CTIME_START>&end_date=<CTIME_END>&status=<STATUS>&time_range_type=<TIME_RANGE_TYPE>
Expected Response
{
"code": 0,
"msg": "success.",
"data": {
"total": 72,
"page": 0,
"page_size": 1,
"list": [
{
"entity_id": "20240201-111111-abcd12345cdf6789",
"application_fee_price": null,
"corp_id": "a1bcde2bf12345678910111213141516",
"course_code": "C-AB-CD-24-01-01",
"course_end_time": "2025-02-06 11:37:51",
"course_id": "12abcdeff123456abcd123456786c60125",
"ctime": "2024-02-23 12:39:23",
"currency": "cny",
"discounted_price": 0,
"have_pre": false,
"installment_count": 1,
"is_deleted": false,
"leads_id": "ab12cd34b567e89123a456bc7deea4a7d",
"listed_price": 3000000,
"mtime": "2024-02-23 11:43:20",
"paid_price": 3000000,
"post_refund_price": 0,
"pre_sub_order_ids": [],
"source": "auto",
"status": "canceled",
"sub_order_ids": [
"ab12cd307d1c34b567e49a6ad4ee4efcb"
],
"total_price": 3000000,
"type": "personal",
"user_id": "e2add01111111ed1234552ea53029c2",
"version": 0,
"coupon_ids": [],
"unpaid_price": 0,
"completed_time": "2024-02-23 11:42:16",
"user_birthday": "",
"user_address": "",
"user_nationality": "",
"user_work_exp": "",
"user_department": "",
"user_job_title": "",
"user_company_name": "",
"user_company_category": "",
"user_company_annual_revenue": "",
"user_company_size": "",
"user_current_work_start": "",
"user_parent_company_name": "",
"user_industry": "",
"user_annual_income": "",
"user_underling_number": "",
"user_top_grades": "",
"user_top_grades_institution": "",
"user_top_grades_date": "",
"user_certificate_type": "",
"user_certificate_id": "",
"user_identification_type": "",
"user_identification_id": "",
"user_certificate_url": "",
"user_resume_file_url": "",
"user_academic_proof_url": "",
"user_manual_wechat": "",
"user_city": "",
"user_city_raw": "",
"user_city_mobile": "",
"user_mobile_attribution": "",
"user_xiaoe_uid": "",
"user_name": "",
"user_first_name": "",
"user_last_name": "",
"user_age": "",
"user_gender": "",
"user_linkedin_url": ""
}
]
}
}
Order Financial List
Used to retrieve the financial report of orders.
Endpoint:
/api/v5/entity/order/financial/listHTTP Method: GET
Request Parameters:
Parameter Type Required Description corp_idString Y Organization ID pageInteger N Page number for pagination page_sizeInteger N Number of items per page start_dateString N Start date filter (type is dependent on time_range_typeparameter)end_dateString N End date filter (type is dependent on time_range_typeparameter)statusString N Status filter time_range_typeString N Type of time range, either modityorcreate(default value iscreateResponse Format: JSON
Parameter Type Description sub_order_idString Unique identifier for the sub-order corp_idString Organization ID ctimeString Creation time of the order mtimeString Modification time of the order user_idString Unique ID for the user order_idString Unique ID for the order mobileString Mobile number of the user emailString Email address of the user salutationString Salutation of the user first_nameString First name of the user last_nameString Last name of the user account_nameString Account name of the user account_name_enString Account english name of the user company_nameString Company name of the user company_name_enString Company english name of the user work_experienceString Work experience of the user job_titleString Job title of the user departmentString Department of the user department_enString Department of the user (English) industryString Industry of the user industry_enString Industry of the user (English) address_for_communicationString Address for communication country_of_residenceString Country of residence of the user cityString City of the user batch_idString Batch ID related to the order batch_nameString Batch name related to the order batch_dateString Batch date school_nameString School name of the user order_currencyString Currency used for the order monthString Month related to the order batch_start_dateString Start date of the batch batch_end_dateString End date of the batch program_codeString Program code related to the order course_codeString Course code related to the order course_nameString Course name related to the order online_application_nameString Online application name related to the order utm_sourceString Source of UTM product_family_or_lob_categoryString Product family or line of business category statusString Status of the order owner_relationship_managersString Relationship manager of the order owner typeString Type of the order total_priceFloat Total price of the order paid_priceFloat Amount paid for the order post_refund_priceFloat Amount refunded after payment unpaid_priceFloat Remaining unpaid amount currencyString Currency of the amounts exchange_rateFloat Exchange rate for the currency completed_timeString Time when the order was completed payment_deadlineString Deadline for payment payment1_idString ID of the first payment payment1_statusString Status of the first payment payment1_priceFloat Price of the first payment payment1_sourceString Source of the first payment payment1_currencyString Currency of the first payment payment1_exchange_rateFloat Exchange rate for the first payment payment1_receipt_numInteger Receipt number for the first payment payment1_charge_idString Charge ID for the first payment payment1_commentsString Comments associated with the first payment payment1_completed_timeString Time when the first payment was completed
Note: NUM in payment<NUM>_<ATTRIBUTE> (e.g. payment1_id) ranges from 1 to 15, inclusive. The attributes for NUM from 2 to 15 follow the same pattern and are not listed in the above chart.
Example Request
Bash Example with CURL:
curl -X GET
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: Bearer <TOKEN>"
-H "X-APP-ID: <APP_ID>"
"<API_SERVICE_HOST>/api/v5/entity/order/financial/list?corp_id=<CORP_ID>&page=<PAGE>&page_size=<PAGE_SIZE>&start_date=<START_DATE>&end_date=<END_DATE>&status=<STATUS>&time_range_type=<TIME_RANGE_TYPE>"
Expected Response
{
"code": 0,
"msg": "success.",
"data": {
"total": 1,
"page": 0,
"page_size": 1,
"list": [
{
"sub_order_id": "20240131-123456-1234567890ab123",
"corp_id": "b06a1246e41e4cf9be74bd55f91ed440",
"ctime": "2024-01-31 08:46:51",
"mtime": "2024-02-20 09:50:03",
"user_id": "ab123d5731234b71236939123f3a1234",
"order_id": "20240131-123456-1234567890ab",
"mobile": "18811012138",
"email": "21525822@qq.com",
"salutation": "男",
"first_name": "FIRST",
"last_name": "LAST",
"account_name": "FIRST LASST",
"account_name_en": "FIRST LAST",
"company_name": "Junior high",
"company_name_en": "",
"work_experience": "others",
"job_title": "Other",
"department": "其他",
"department_en": "other",
"industry": "服务业",
"industry_en": "service industry",
"address_for_communication": "",
"country_of_residence": "中国",
"city": "",
"batch_id": "",
"batch_name": "",
"batch_date": "2024-07-07 00:00:00",
"school_name": "Emeritus",
"order_currency": None,
"month": "7",
"batch_start_date": "2024-07-07 00:00:00",
"batch_end_date": "2024-07-23 00:00:00",
"program_code": "B2B - AA BB CC",
"course_code": "C-TEST-AABBCC-24-03-01",
"course_name": "AA BB CC",
"online_application_name": "B2B - AA BB CC",
"utm_source": "None",
"product_family_or_lob_category": "ABCD",
"status": "canceled",
"owner_relationship_managers": "Alex Cashman",
"type": "normal",
"total_price": 85000.0,
"paid_price": 20000.0,
"post_refund_price": 0.0,
"unpaid_price": 65000.0,
"currency": "cny",
"exchange_rate": 1.0,
"completed_time": None,
"payment_deadline": None,
"payment1_id": 'ch_1234561784331110400014',
"payment1_status": 'success',
"payment1_price": 20000.0,
"payment1_source": 'wx_pub',
"payment1_currency": 'cny',
"payment1_exchange_rate": 0.0,
"payment1_receipt_num": None,
"payment1_charge_id": 'ch_1234561784331110400014',
"payment1_comments": None,
"payment1_completed_time": '2024-01-31 21:16:51',
"payment2_id": None,
"payment2_status": None,
"payment2_price": None,
"payment2_source": None,
"payment2_currency": None,
"payment2_exchange_rate": None,
"payment2_receipt_num": None,
"payment2_charge_id": None,
"payment2_comments": None,
"payment2_completed_time": None,
"payment3_id": None,
"payment3_status": None,
"payment3_price": None,
"payment3_source": None,
"payment3_currency": None,
"payment3_exchange_rate": None,
"payment3_receipt_num": None,
"payment3_charge_id": None,
"payment3_comments": None,
"payment3_completed_time": None,
"payment4_id": None,
"payment4_status": None,
"payment4_price": None,
"payment4_source": None,
"payment4_currency": None,
"payment4_exchange_rate": None,
"payment4_receipt_num": None,
"payment4_charge_id": None,
"payment4_comments": None,
"payment4_completed_time": None,
"payment5_id": None,
"payment5_status": None,
"payment5_price": None,
"payment5_source": None,
"payment5_currency": None,
"payment5_exchange_rate": None,
"payment5_receipt_num": None,
"payment5_charge_id": None,
"payment5_comments": None,
"payment5_completed_time": None,
"payment6_id": None,
"payment6_status": None,
"payment6_price": None,
"payment6_source": None,
"payment6_currency": None,
"payment6_exchange_rate": None,
"payment6_receipt_num": None,
"payment6_charge_id": None,
"payment6_comments": None,
"payment6_completed_time": None,
"payment7_id": None,
"payment7_status": None,
"payment7_price": None,
"payment7_source": None,
"payment7_currency": None,
"payment7_exchange_rate": None,
"payment7_receipt_num": None,
"payment7_charge_id": None,
"payment7_comments": None,
"payment7_completed_time": None,
"payment8_id": None,
"payment8_status": None,
"payment8_price": None,
"payment8_source": None,
"payment8_currency": None,
"payment8_exchange_rate": None,
"payment8_receipt_num": None,
"payment8_charge_id": None,
"payment8_comments": None,
"payment8_completed_time": None,
"payment9_id": None,
"payment9_status": None,
"payment9_price": None,
"payment9_source": None,
"payment9_currency": None,
"payment9_exchange_rate": None,
"payment9_receipt_num": None,
"payment9_charge_id": None,
"payment9_comments": None,
"payment9_completed_time": None,
"payment10_id": None,
"payment10_status": None,
"payment10_price": None,
"payment10_source": None,
"payment10_currency": None,
"payment10_exchange_rate": None,
"payment10_receipt_num": None,
"payment10_charge_id": None,
"payment10_comments": None,
"payment10_completed_time": None,
"payment11_id": None,
"payment11_status": None,
"payment11_price": None,
"payment11_source": None,
"payment11_currency": None,
"payment11_exchange_rate": None,
"payment11_receipt_num": None,
"payment11_charge_id": None,
"payment11_comments": None,
"payment11_completed_time": None,
"payment12_id": None,
"payment12_status": None,
"payment12_price": None,
"payment12_source": None,
"payment12_currency": None,
"payment12_exchange_rate": None,
"payment12_receipt_num": None,
"payment12_charge_id": None,
"payment12_comments": None,
"payment12_completed_time": None,
"payment13_id": None,
"payment13_status": None,
"payment13_price": None,
"payment13_source": None,
"payment13_currency": None,
"payment13_exchange_rate": None,
"payment13_receipt_num": None,
"payment13_charge_id": None,
"payment13_comments": None,
"payment13_completed_time": None,
"payment14_id": None,
"payment14_status": None,
"payment14_price": None,
"payment14_source": None,
"payment14_currency": None,
"payment14_exchange_rate": None,
"payment14_receipt_num": None,
"payment14_charge_id": None,
"payment14_comments": None,
"payment14_completed_time": None,
"payment15_id": None,
"payment15_status": None,
"payment15_price": None,
"payment15_source": None,
"payment15_currency": None,
"payment15_exchange_rate": None,
"payment15_receipt_num": None,
"payment15_charge_id": None,
"payment15_comments": None,
"payment15_completed_time": None
}
]
}
}