Skip to content
View in the app

A better way to browse. Learn more.

Loyverse Town

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Gets error while post method API

Featured Replies

Here's my applescript.

 

tell application "Finder"

set fullname to name of (selection as alias)

set AppleScript's text item delimiters to {"_"}

set Cname to first text item of fullname

set Cmobile to second text item of fullname

set Ccustomer to second text item of fullname

display dialog ("이름: " & Cname & "

전화번호: " & Cmobile & "

고객번호: " & Ccustomer)

do shell script "Cname=" & Cname & " Cmobile=" & Cmobile & " Ccustomer=" & Ccustomer & "; curl --location --request POST 'https://api.loyverse.com/v1.0/customers' --header 'Content-Type: application/json;charset=UTF-8' --header 'Authorization: Bearer d911043####################' --header 'Cookie: AWSALB=327XFY8AKfJFItTfErSMIf2R+cKJfgQeedICFa0WH5yC6qVfsZL5Rhxb+S2DBmdx0lmLIBquXdSVrB0yfMMQ00z6tH9imVXEzF6VZ8a993Kze1AkeH9grq######; AWSALBCORS=327XFY8AKfJFItTfErSMIf2R+cKJfgQeedICFa0WH5yC6qVfsZL5Rhxb+S2DBmdx0lmLIBquXdSVrB0yfMMQ00z6tH9imVXEzF6VZ8a993Kze1AkeH9grq######' --data-raw '{    \"name\": '$Cname',    \"phone_number\": '$Cmobile',    \"customer_code\": '$Ccustomer',    \"note\": \"\"}'"

--do shell script "Cname=" & Cname & " Cmobile=" & Cmobile & " Ccustomer=" & Ccustomer & "; echo $Cname $Cmobile $Ccustomer"

end tell

Cname is 홍길동

Cmobile is 01000000000

Ccustomer is 01000000000

 

By doing this, I can register customers to loyverse  from Finder by based on filename.

But it gets error regarding""{\"errors\":[{\"code\":\"BAD_REQUEST\",\"details\":\"Invalid UTF-8 start byte 0x84 (line 1 character 16)\"}]}""

When I echo it to see if variable works, it shows find.

 

Where should I fix?

스크린샷 2021-07-28 오후 2.30.10.png

Edited by YUIKJOO
to remove token

Hello, looks like you send json with invalid character not supported by json format

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.