1

Create Order API

(30/04/2020 13:09:03 отредактировано mfathy)

Тема: Create Order API

hello , am trying to create an order using this API
https://sdk.wialon.com/wiki/en/sidebar/ … der/update

but i keep getting error 4 Wrong parameters this is my request :

https://hst-api.wialon.com/wialon/ajax. … p;params={
"itemId":Account ID,
"id":0,
"n":"Test Order",
"p":{
"n":"Some Name",
"p":"+989121111111",
"p2":"+989122222222",
"e":"aa@aa.com",
"a":"place in the world",
"v":1,
"w":20,
"c":100000,
"ut":600,
"t":"",
"d":"Some Text",
"uic":"",
"cid":"",
"ntf":3,
"pr":0,
"tags":[],
"r":null},
"f":1,
"tf":1588175355,
"tt":1588182555,
"trt":900,
"r":50,
"y":35.73537357430529,
"x":51.386500059131244,
"u":0,
"ej": {},
"tz":12600,
"callMode":"create"}

please advice

2

Create Order API

(29/04/2020 18:43:31 отредактировано hhamedk)

Re: Create Order API

mfathy, everything is correct in your request. You should receive successful order creation response. How you call this method? Which programing language you are using?

3

Create Order API

Re: Create Order API

post man am not using any code right now

4

Create Order API

Re: Create Order API

mfathy wrote:

post man am not using any code right now

I have checked that exactly with Post Man. Please double check.

5

Create Order API

(30/04/2020 13:12:27 отредактировано mfathy)

Re: Create Order API

i have attached the postman message i just removed the sid and account id

  • Create Order API
6

Create Order API

Re: Create Order API

Your params are ok, everything works.

The issue is with '+' sign in phone number, it must be encoded but Postman skip it in GET method (see screenshot)

Wialon Remote API should be used with POST method (see docs), it solves the issue.

  • Create Order API
7

Create Order API

Re: Create Order API

thanks to hhamedk i fixed the parameters error now am getting error 7 access denied is there any permission i should set for the account to enable the api to make orders ?

8

Create Order API

Re: Create Order API

1) Check your token access_flag, 0x800 is needed.
2) Check user access to resource with "Account ID", "Create, edit, and delete orders" is needed

9

Create Order API

Re: Create Order API

am using the iframe login and set the access type and flags to -1 which should be unlimited access

  • Create Order API
10

Create Order API

Re: Create Order API

mfathy, simply check if the account your are using for API has access to Logistics on web version and if it works fine or not. If No, then the problem is related to access of account.