add auth register
This commit is contained in:
58
docs/auth.sh
Normal file
58
docs/auth.sh
Normal file
@@ -0,0 +1,58 @@
|
||||
GET SESSION
|
||||
curl --location --request POST 'https://land.dbiz.com//api/method/dbiz_common.dbiz_common.api.auth.get_session' \
|
||||
--data ''
|
||||
|
||||
DATA RETURN
|
||||
{
|
||||
"message": {
|
||||
"data": {
|
||||
"sid": "edb6059ecf147f268176cd4aff8ca034a75ebb8ff23464f9913c9537",
|
||||
"csrf_token": "d0077178c349f69bc1456401d9a3d90ef0f7b9df3e08cfd26794a53f"
|
||||
}
|
||||
},
|
||||
"home_page": "/app",
|
||||
"full_name": "PublicAPI"
|
||||
}
|
||||
|
||||
GET CITY
|
||||
curl --location 'https://land.dbiz.com//api/method/frappe.client.get_list' \
|
||||
--header 'X-Frappe-Csrf-Token: 3d072ea39d245c2340ecc42d0825f6cbb7e674943c9c74346c8e4629' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Cookie: full_name=PublicAPI; sid=b5a564f45d2fbe8b47dab89382801bf9a6e5c618500feb84a738f205; system_user=no; user_id=public_api%40dbiz.com; user_image=' \
|
||||
--data '{
|
||||
"doctype": "City",
|
||||
"fields": ["city_name","name","code"],
|
||||
"limit_page_length": 0
|
||||
}'
|
||||
|
||||
GET ROLE
|
||||
curl --location 'https://land.dbiz.com//api/method/frappe.client.get_list' \
|
||||
--header 'X-Frappe-Csrf-Token: 3d072ea39d245c2340ecc42d0825f6cbb7e674943c9c74346c8e4629' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Cookie: full_name=PublicAPI; sid=b5a564f45d2fbe8b47dab89382801bf9a6e5c618500feb84a738f205; system_user=no; user_id=public_api%40dbiz.com; user_image=' \
|
||||
--data '{
|
||||
"doctype": "Customer Group",
|
||||
"fields": ["customer_group_name","name","value"],
|
||||
"filters": {"is_group": 0, "is_active" : 1, "customer" : 1},
|
||||
"limit_page_length": 0
|
||||
}'
|
||||
|
||||
REGISTER
|
||||
curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.user.register' \
|
||||
--header 'X-Frappe-Csrf-Token: 3d072ea39d245c2340ecc42d0825f6cbb7e674943c9c74346c8e4629' \
|
||||
--header 'Cookie: sid=b5a564f45d2fbe8b47dab89382801bf9a6e5c618500feb84a738f205; full_name=PublicAPI; sid=b5a564f45d2fbe8b47dab89382801bf9a6e5c618500feb84a738f205; system_user=no; user_id=public_api%40dbiz.com; user_image=' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"full_name" : "Nguyễn Lê Duy Tiến",
|
||||
"phone" : "091321236",
|
||||
"email" : "tiennld6@dbiz.com",
|
||||
"customer_group_code" : "ACT",
|
||||
"company_name" : null,
|
||||
"city_code" : "01",
|
||||
"tax_code" : "091231",
|
||||
"id_card_front_base64" : "base64 tr",
|
||||
"id_card_back_base64" : "base64 str",
|
||||
"certificates_base64" : [
|
||||
"bas64_1 str","base64_2 str"
|
||||
]
|
||||
}'
|
||||
Reference in New Issue
Block a user