Skip to main content

Order

Order Detail

Used to get the user"s order detail.

  • Endpoint: /api/v5/entity/order/fetch

  • HTTP Method: GET

  • Request Parameters:

    ParameterTypeRequiredDescription
    corp_idStringYOrganization ID
    order_idStringYUnique 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/list

  • HTTP Method: GET

  • Request Parameters:

    ParameterTypeRequiredDescription
    corp_idStringYOrganization ID
    pageIntegerOptionalPage number, start from 0, default 0
    page_sizeIntegerOptionalData size within one page, default 10, maximum 1000
    start_dateStringOptionalOrder created/modified time range starting point (string formatted as YYYY-MM-DD, e.g. 2024-02-01)
    end_dateStringOptionalOrder created/modified time range ending point
    statusStringOptionalOrder status (available status: created/locked/pending/success/canceled/expired/unconfirmed/tbd)
    time_range_typeStringOptionalSpecifies whether the date range is based on the creation time or the last modification time (available type: create/modify)
  • Response Format: JSON

    ParameterTypeDescription
    entity_idStringOrder ID
    application_fee_priceStringApplication fee
    corp_idStringAccess to orders in the organization only
    course_codeStringThe identity code for course related to this order
    course_end_timeStringThe end of time for course related to this order
    course_idStringThe course ID
    ctimeStringOrder created time
    contract_idStringThe contract ID
    business_idStringThe business ID
    product_idStringThe product ID
    is_lockedBooleanIf the order is locked
    course_idStringThe course ID
    course_start_timeStringThe start of time for course related to this order
    course_end_timeStringThe end of time for course related to this order
    course_codeStringThe identity code for course related to this order
    sourceStringThe source of the order
    listed_priceIntegerThe listed price
    foreign_service_chargeIntegerThe foreign service charge
    service_chargeIntegerThe service charge
    total_priceIntegerThe total price
    application_fee_priceIntegerThe application fee price
    application_fee_currencyStringThe application fee currency
    application_fee_exchange_rateIntegerThe application fee exchange rate
    application_fee_statusStringThe application fee status
    discounted_priceIntegerDiscounted price for this order
    currencyStringPayment currency
    exchange_rateIntegerThe exchange rate
    post_refund_priceIntegerPost refund price
    refund_priceIntegerRefund price
    over_payment_priceIntegerOver payment price
    last_refund_timeStringThe last refund time
    paid_priceIntegerPaid fees of this order
    unpaid_priceIntegerUnpaid fees of this order
    completed_timeStringThe time when the order is completed
    expired_timeStringThe time when the order is expired
    is_transferredBooleanIf the order is transferred
    transferred_idStringThe transferred ID
    is_payment_changedBooleanIf the payment method is changed
    executor_idStringThe executor ID
    installment_countIntegerThe number of installments
    have_preBooleanIf there is a pre-order
    receipt_urlStringThe receipt URL
    is_company_transferBooleanIf the order is company transfer
    invoice_idsListThe invoice IDs
    share_proportionDictThe share proportion
    remark_listListThe remark list
    paid_sub_order_idsListThe paid sub order IDs
    coupon_idsListThe coupon IDs
    sub_order_idsListThe sub order IDs
    pre_sub_order_idsListThe pre-sub order IDs
    refund_idsListThe refund IDs
    user_idStringThe user ID
    versionStringThe version of the order
    unpaid_priceIntegerUnpaid fees of this order
    completed_timeStringThe time when the order is completed
    user_birthdayStringThe user"s birthday
    user_addressStringThe client"s address *(Value could be in Chinese)
    user_nationalityStringThe client"s nationality *(Value could be in Chinese)
    user_work_expStringThe client"s work experience *(Value could be in Chinese)
    user_departmentStringThe client"s department *(Value could be in Chinese)
    user_job_titleStringThe client"s job title *(Value could be in Chinese)
    user_company_nameStringThe client"s company name *(Value could be in Chinese)
    user_company_categoryStringThe client"s company category *(Value could be in Chinese)
    user_company_annual_revenueStringThe client"s company annual revenue *(Value could be in Chinese)
    user_company_sizeStringThe client"s company size *(Value could be in Chinese)
    user_current_work_startStringThe client"s current work start time
    user_parent_company_nameStringThe client"s parent company name
    user_industryStringThe client"s industry *(Value could be in Chinese)
    user_annual_incomeStringThe client"s annual income *(Value could be in Chinese)
    user_underling_numberIntegerThe client"s underling number
    user_top_gradesStringThe client"s top grades *(Value could be in Chinese)
    user_top_grades_institutionStringThe client"s top grades institution *(Value could be in Chinese)
    user_top_grades_dateStringThe client"s top grades date
    user_certificate_typeStringThe client"s certificate type *(Value could be in Chinese)
    user_certificate_idStringThe client"s certificate ID
    user_identification_typeStringThe client"s identification type *(Value could be in Chinese)
    user_identification_idStringThe client"s identification ID
    user_certificate_urlStringThe client"s certificate URL
    user_resume_file_urlStringThe client"s resume file URL
    user_academic_proof_urlStringThe client"s academic proof URL
    user_manual_wechatStringThe client"s manual wechat
    user_cityStringThe client"s city *(Value could be in Chinese)
    user_city_rawStringThe client"s city raw *(Value could be in Chinese)
    user_city_mobileStringThe client"s city mobile *(Value could be in Chinese)
    user_mobile_attributionStringThe client"s mobile attribution *(Value could be in Chinese)
    user_xiaoe_uidStringThe client"s xiaoe UID
    user_nameStringThe client"s name *(Value could be in Chinese)
    user_first_nameStringThe client"s first name *(Value could be in Chinese)
    user_last_nameStringThe client"s last name *(Value could be in Chinese)
    user_ageStringThe client"s age
    user_genderStringThe client"s gender *(Value could be in Chinese)
    user_linkedin_urlStringThe 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/list

  • HTTP Method: GET

  • Request Parameters:

    ParameterTypeRequiredDescription
    corp_idStringYOrganization ID
    pageIntegerNPage number for pagination
    page_sizeIntegerNNumber of items per page
    start_dateStringNStart date filter (type is dependent on time_range_type parameter)
    end_dateStringNEnd date filter (type is dependent on time_range_type parameter)
    statusStringNStatus filter
    time_range_typeStringNType of time range, either modity or create (default value is create
  • Response Format: JSON

    ParameterTypeDescription
    sub_order_idStringUnique identifier for the sub-order
    corp_idStringOrganization ID
    ctimeStringCreation time of the order
    mtimeStringModification time of the order
    user_idStringUnique ID for the user
    order_idStringUnique ID for the order
    mobileStringMobile number of the user
    emailStringEmail address of the user
    salutationStringSalutation of the user
    first_nameStringFirst name of the user
    last_nameStringLast name of the user
    account_nameStringAccount name of the user
    account_name_enStringAccount english name of the user
    company_nameStringCompany name of the user
    company_name_enStringCompany english name of the user
    work_experienceStringWork experience of the user
    job_titleStringJob title of the user
    departmentStringDepartment of the user
    department_enStringDepartment of the user (English)
    industryStringIndustry of the user
    industry_enStringIndustry of the user (English)
    address_for_communicationStringAddress for communication
    country_of_residenceStringCountry of residence of the user
    cityStringCity of the user
    batch_idStringBatch ID related to the order
    batch_nameStringBatch name related to the order
    batch_dateStringBatch date
    school_nameStringSchool name of the user
    order_currencyStringCurrency used for the order
    monthStringMonth related to the order
    batch_start_dateStringStart date of the batch
    batch_end_dateStringEnd date of the batch
    program_codeStringProgram code related to the order
    course_codeStringCourse code related to the order
    course_nameStringCourse name related to the order
    online_application_nameStringOnline application name related to the order
    utm_sourceStringSource of UTM
    product_family_or_lob_categoryStringProduct family or line of business category
    statusStringStatus of the order
    owner_relationship_managersStringRelationship manager of the order owner
    typeStringType of the order
    total_priceFloatTotal price of the order
    paid_priceFloatAmount paid for the order
    post_refund_priceFloatAmount refunded after payment
    unpaid_priceFloatRemaining unpaid amount
    currencyStringCurrency of the amounts
    exchange_rateFloatExchange rate for the currency
    completed_timeStringTime when the order was completed
    payment_deadlineStringDeadline for payment
    payment1_idStringID of the first payment
    payment1_statusStringStatus of the first payment
    payment1_priceFloatPrice of the first payment
    payment1_sourceStringSource of the first payment
    payment1_currencyStringCurrency of the first payment
    payment1_exchange_rateFloatExchange rate for the first payment
    payment1_receipt_numIntegerReceipt number for the first payment
    payment1_charge_idStringCharge ID for the first payment
    payment1_commentsStringComments associated with the first payment
    payment1_completed_timeStringTime 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
}
]
}
}