NEXTPOINT
  • Nextpoint คืออะไร
  • Nextpoint ช่วยอะไรธุรกิจได้บ้าง
  • เชื่อม NEXTPOINT + LINE OA
  • คู่มือพื้นฐานระบบสะสมแต้ม
    • Dashboard
    • รวบรัดหัวข้อพื้นฐานระบบสะสมแต้ม
    • การให้แต้มผ่าน เบอร์
    • การให้แต้มผ่าน POS
    • การให้แต้มผ่าน QR
    • การให้แต้มผ่านไฟล์ประวัติลูกค้า CSV จาก POS
  • การใช้งาน QR
    • ระบบ QR ให้แต้มทำงานอย่างไร
    • QR สามารถสั่งซื้อได้จาก
  • ระบบหลังบ้าน > การจัดการข้อมูล
    • พอยท์
    • เพิ่มลูกค้า
      • นำเข้าไฟล์ csv
      • เพิ่มในระบบ
    • ระดับของลูกค้า
    • พนักงาน
    • คูปอง
    • รางวัล
    • โปรโมชั่น
    • กิจกรรม
    • SMS
    • การจัดส่งของรางวัล
    • ตรวจสอบบิล
  • ฟังชั่นอื่นๆ
    • เชื่อมให้แต้มกับระบบ POSPOS
    • การย้ายลูกค้าจากระบบสะสมแต้มอื่น
    • แพคเก็จราคา
  • การตั้งค่า
    • ข้อมูลร้าน
    • ธีม
    • ลิงค์ร้านค้า
    • ป้ายกำกับ
      • เพิ่มป้ายกำกับให้ลูกค้า
    • ประเภทบิล
  • DEVELOPER API
    • เปิดใช้งาน API
    • API Reference
      • API Connect
      • API เพิ่มลูกค้า
      • API เพิ่มพอยท์
    • API POS POS
Powered by GitBook
On this page
  1. DEVELOPER API
  2. API Reference

API เพิ่มพอยท์

PreviousAPI เพิ่มลูกค้าNextAPI POS POS

Last updated 1 year ago

Add point

PUT /

curl --location
-H "publicKey: <your_publickey> " 
-H "secretKey: <your_secretkey> " 
-H "token: <your_token> " 
--data '{
    "phone":"<phone_number_of_customer>" , 
    "price":"<number_of_point>"}' 
--request PUT https://global.nextpoint.me/next-global/nextpoint/api/customer/point-plus


$ch = curl_init();  
$url  = 'https://global.nextpoint.me/next-global/nextpoint/api/customer/point-plus'; 
$body = array( 
    'phone' => '<phone_number_of_customer>', 
    'price' => '<number_of_point>', );
$headers = array( 
    'publicKey: <your_publickey>', 
    'secretKey: <your_secretkey>', 
    'token: <your_token>' );  
curl_setopt($ch, CURLOPT_URL, $url);  
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); 
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); 
curl_setopt($ch, CURLOPT_POSTFIELDS, 
json_encode($body));$response = curl_exec($ch); 
url_close($ch); 
echo $response
 const axios = require('axios');  
 const url = 'https://global.nextpoint.me/next-global/nextpoint/api/customer/point-plus'; 
 const headers = { 
  'publicKey' : '<your_publickey>',  
  'secretKey' : '<your_secretkey>',  
  'Authorization': 'Bearer ' : '<your_token>' };  
const body = { 
  phone: '<phone_number_of_customer>', 
  price: '<number_of_point>', } 
axios.put(url ,body , { headers } ).then(response => { 
  console.log(response.data.data);  
  }).catch(error => { 
  console.log(error);  
}); 
 import requestsurl = 'https://global.nextpoint.me/next-global/nextpoint/api/customer/point-plus'
 headers = { 
  'publicKey': '<your_publickey>', 
  'secretKey': '<your_secretkey>', 
  'token': '<your_token>' }
body = { 
  'phone': '<phone_number_of_customer>', 
  'price': '<number_of_point>', }
response = requests.put(url, headers=headers ) 
if response.status_code == 200: 
  print(response.text) 
  else: 
    print(f"Error {response.status_code}: {response.reason}")
    
    

Headers

Name
Value

publicKey

secretKey

token

Body

Name
Type
Description

phone

string

เบอร์โทรศัพท์ของลูกค้า

price

number

จำนวนพอยท์ที่ต้องการเพิ่ม

Response

{
  "statusCode" : 200 ,
  "status" : "OK" ,
  "message" : "put point successfully" ,
}
{
    "status": 401,
    "message": "No token provided!"
}
{
    "status": 500,
    "message": "Cannot read properties of null (reading '_id')"
}

สามารถคัดลอกได้ที่หน้า

สามารถคัดลอกได้ที่หน้า

Bearer <token> สามารถขอได้จาก

https://global.nextpoint.me/next-global/nextpoint/api/customer/point-plus
เปิดใช้งาน API
เปิดใช้งาน API
API Connect