Api session event editor address set point: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
| 0
| 0
| REQUIRED
| REQUIRED
| (ADDRESSE Integer ID or multiple values in array [1, 2, 3])
| (ADDRESSE Integer ID or multiple integer values in array [1, 2, 3])
| [[Address]] ID
| [[Address]] ID
|  
|  
Line 38: Line 38:
[ 1, {
[ 1, {
  "type" : "Point",
  "type" : "Point",
  "coordinates" : [ 658768.8642089966, 6799449.510803973 ]
  "coordinates" : [ 658642.3829865522, 6799443.12633728 ]
} ]
} ]
'
'
Line 46: Line 46:
[ [ 1, 2, 3 ], [ {
[ [ 1, 2, 3 ], [ {
  "type" : "Point",
  "type" : "Point",
  "coordinates" : [ 658655.4150545691, 6799392.0654020775 ]
  "coordinates" : [ 658707.2022580577, 6799345.518197036 ]
}, {
}, {
  "type" : "Point",
  "type" : "Point",
  "coordinates" : [ 658798.1668724018, 6799397.874888853 ]
  "coordinates" : [ 658686.0560061157, 6799311.3323201025 ]
}, {
}, {
  "type" : "Point",
  "type" : "Point",
  "coordinates" : [ 658709.2551660802, 6799449.077160313 ]
  "coordinates" : [ 658771.5245439183, 6799345.415877934 ]
} ] ]
} ] ]
'
'
Line 60: Line 60:
 method: "POST",
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, { "type" : "Point", "coordinates" : [ 658768.8642089966, 6799449.510803973 ]} ]'
 body: '[ 1, { "type" : "Point", "coordinates" : [ 658642.3829865522, 6799443.12633728 ]} ]'
};
};
fetch("https://engine.tygron.com/api/session/event/editoraddress/set_point/?crs=3857", options)
fetch("https://engine.tygron.com/api/session/event/editoraddress/set_point/?crs=3857", options)

Revision as of 12:20, 17 June 2026

API Endpoint: api/session/event/editoraddress/set_point/

Description: Set the Point of an Address

Index Importance Type Description Values
0 REQUIRED (ADDRESSE Integer ID or multiple integer values in array [1, 2, 3]) Address ID
1 REQUIRED (Point with crs: EPSG:3857 or multiple values in array [a, b, c]) Point

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

Curl example POST

curl 'https://engine.tygron.com/api/session/event/editoraddress/set_point/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ 1, {
 "type" : "Point",
 "coordinates" : [ 658642.3829865522, 6799443.12633728 ]
} ]
'

Curl example multi item POST

curl 'https://engine.tygron.com/api/session/event/editoraddress/set_point/?crs=3857' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '
[ [ 1, 2, 3 ], [ {
 "type" : "Point",
 "coordinates" : [ 658707.2022580577, 6799345.518197036 ]
}, {
 "type" : "Point",
 "coordinates" : [ 658686.0560061157, 6799311.3323201025 ]
}, {
 "type" : "Point",
 "coordinates" : [ 658771.5245439183, 6799345.415877934 ]
} ] ]
'

JavaScript example POST

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, { "type" : "Point", "coordinates" : [ 658642.3829865522, 6799443.12633728 ]} ]'
};
fetch("https://engine.tygron.com/api/session/event/editoraddress/set_point/?crs=3857", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));