Files
worker/docs/address.sh
Phuoc Nguyen 0dda402246 update address
2025-11-18 17:04:00 +07:00

28 lines
1.6 KiB
Bash

#get list address
curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.address.get_list' \
--header 'Cookie: sid=a0c9a51c8d1fbbec824283115094bdca939bb829345e0005334aa99f; full_name=phuoc; sid=a0c9a51c8d1fbbec824283115094bdca939bb829345e0005334aa99f; system_user=no; user_id=vodanh.2901%40gmail.com; user_image=https%3A//secure.gravatar.com/avatar/753a0e2601b9bd87aed417e2ad123bf8%3Fd%3D404%26s%3D200' \
--header 'X-Frappe-Csrf-Token: a22fa53eeaa923f71f2fd879d2863a0985a6f2107f5f7f66d34cd62d' \
--header 'Content-Type: application/json' \
--data '{
"limit_start" : 0,
"limit_page_length": 0,
"is_default" : false
}'
#update/insert address
curl --location 'https://land.dbiz.com//api/method/building_material.building_material.api.address.update' \
--header 'Cookie: sid=a0c9a51c8d1fbbec824283115094bdca939bb829345e0005334aa99f; full_name=phuoc; sid=a0c9a51c8d1fbbec824283115094bdca939bb829345e0005334aa99f; system_user=no; user_id=vodanh.2901%40gmail.com; user_image=https%3A//secure.gravatar.com/avatar/753a0e2601b9bd87aed417e2ad123bf8%3Fd%3D404%26s%3D200' \
--header 'X-Frappe-Csrf-Token: a22fa53eeaa923f71f2fd879d2863a0985a6f2107f5f7f66d34cd62d' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Công ty Tiến Nguyễn-Billing", // bỏ trống hoặc không truyền để thêm mới
"address_title": "Công ty Tiến Nguyễn",
"address_line1": "Khu 2, Hoàng Cương, Thanh Ba, Phú Thọ",
"phone": "0911111111",
"email": "address75675@gmail.com",
"fax": null,
"tax_code": "12312",
"city_code": "96",
"ward_code": "32248",
"is_default": false
}'