/
Coutry/Region/City Groups - JSON

Coutry/Region/City Groups - JSON

Country Group

Add

It allows to create a country group in the system. The request must be done through POST method.

URL base: admin/jsapi/countrygroup?op=a

 

Mandatory parameters:

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/countrygroup?op=a&nombre=test&country=AR EU

Response example without errors:

{'countrygroup_id':'19','status':200}

Response example with errors:

{'errors':{'country':'OPCION_INVALIDA','nombre':'ERROR_NOMBRE_DUPLICADO'},'status':400}

 

Edit

It allows to edit a country group in the system. The request must be done through POST method.

URL base: admin/jsapi/countrygroup?op=m

 

Mandatory parameters:

  • countrygroup_id: group identifier
  • country: codes ISO-3166 countries listing, separated by space (i.e: “US CA MX”)
  • nombre: name

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/countrygroup?op=m&nombre=grupopaisapieditado&country=AR EU CA&countrygroup_id=19

Response example without errors:

{'countrygroup_id':'19','status':200}

Response example with errors:

{'countrygroup_id':'19','errors':{'country':'ERROR_AL_MENOS_UNA'},'status':400}

 

Delete

It allows to erase a country group in the system. The request must be done through POST method.

URL base: admin/jsapi/countrygroup?op=b

 

Mandatory parameters:

  • countrygroup_id: group identifier

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/countrygroup?op=b&countrygroup_id=19

Response example without errors:

{'countrygroup_id':'19','status':200}

Response example with errors:

{'status':400}

 

View

This function provides information about a country group previously created in the system.

URL base: admin/jsapi/countrygroup?op=v

 

Mandatory parameters:

  • countrygroup_id: group identifier

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/countrygroup?op=b&countrygroup_id=14

Response example without errors:

{'countrygroup':{'country':['AR','BO','BR','CL','CO','EC','GY','PE','PY','SR','UY','VE'],'countrygroup_id':'14','fecha_alta':'2013-04-25 22:28:36','fecha_baja':null,'nombre':'Latam'},'status':200}

Response example with errors:

{'status':400}

 

List

This function lists the country groups created in the system.

URL base: admin/jsapi/countrygroup?op=l


Request example:

https://admin.eu.e-planning.net/admin/jsapi/countrygroup?op=b&countrygroup_id=14

Response example without errors:

{'countrygroup':{'country':['AR','BO','BR','CL','CO','EC','GY','PE','PY','SR','UY','VE'],'countrygroup_id':'14','fecha_alta':'2013-04-25 22:28:36','fecha_baja':null,'nombre':'Latam'},'status':200}

Response example with errors:

{'status':400}

 

 

Region Group

Add

It allows to create a region group in the system. The request must be done through POST method.

URL base: admin/jsapi/regiongroup?op=a

 

Mandatory parameters:

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/regiongroup?op=a&nombre=gruporegapi&country=AR&region_id=6337

Response example without errors:

{'status':200,'regiongroup_id':'6'}

Response example with errors:

{'errors':{'nombre':'ERROR_NOMBRE_DUPLICADO'},'status':400}

 

Edit

It allows to edit a region group in the system. The request must be done through POST method.

URL base: admin/jsapi/regiongroup?op=m

 

Mandatory parameters:

  • regiongroup_id: group identifier
  • country: codes ISO-3166 countries listing, separated by space (i.e: “US CA MX”)
  • region_id
  • nombre: name

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/regiongroup?op=m&nombre=gruporegapi&country=AR&region_id=6337&regiongroup_id=6

Response example without errors:

{'status':200,'regiongroup_id':'6'}

Response example with errors:

{'errors':{'nombre':'ERROR_NOMBRE_DUPLICADO'},'status':400}

 

Delete

It allows to erase a region group in the system. The request must be done through POST method.

URL base: admin/jsapi/regiongroup?op=b

 

Mandatory parameters:

  • regiongroup_id: group identifier

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/regiongroup?op=b&regiongroup_id=6

Response example without errors:

{'status':200,'regiongroup_id':'6'}

Response example with errors:

{'status':400}

 

 

View

This function provides information about a region group previously created in the system.

URL base: admin/jsapi/regiongroup?op=v

 

Mandatory parameters:

  • regiongroup_id: group identifier

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/regiongroup?op=v&regiongroup_id=6

Response example without errors:

{'status':200,'regiongroup':{'country':'AR','region_id':['6337','6345'],'fecha_alta':'2014-08-08 17:04:42','fecha_baja':'2014-08-08 17:17:29','regiongroup_id':'6','nombre':'gruporegapi'}}

Response example with errors:

{'status':400}

 

List

This function lists the region groups created in the system.

URL base: admin/jsapi/regiongroup?op=l

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/regiongroup?op=l

Response example without errors:

{'object_class':'regiongroup','objects':[{'country':'AR','region_id':['7'],'fecha_alta':'2014-08-08 17:07:54','fecha_baja':null,'regiongroup_id':'7','nombre':'gruporegapi2'},{'country':'US','region_id':['5577','5579','5580','5598','5606','5617','5625','5627'],'fecha_alta':'2013-11-27 20:20:09','fecha_baja':null,'regiongroup_id':'2','nombre':'Region group 1'}],'status':200}

Response example with errors:

{'status':400}


City Group

Add

It allows to create a city group in the system. The request must be done through POST method.

URL base: admin/jsapi/citygroup?op=a

 

Mandatory parameters:

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/citygroup?op=a&nombre=grupociugapi&country=BR&city_id=296268 286210

Response example without errors:

{'status':200,'citygroup_id':'11'}

Response example with errors:

{'errors':{'nombre':'ERROR_NOMBRE_DUPLICADO'},'status':400}

 

Edit

It allows to edit a region group in the system. The request must be done through POST method.

URL base: admin/jsapi/citygroup?op=m

 

Mandatory parameters:

  • citygroup_id: group identifier
  • country: codes ISO-3166 countries listing, separated by space (i.e: “US CA MX”)
  • city_id
  • nombre: name

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/citygroup?op=m&nombre=grupociugapi2&country=BR&city_id=296268 286210&citygroup_id=11

Response example without errors:

{'status':200,'citygroup_id':'11'}

Response example with errors:

{'errors':{'nombre':'ERROR_NOMBRE_DUPLICADO'},'status':400}

 

Delete

It allows to erase a region group in the system. The request must be done through POST method.

URL base: admin/jsapi/citygroup?op=b

 

Mandatory parameters:

  • citygroup_id: group identifier

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/citygroup?op=b&citygroup_id=11

Response example without errors:

{'status':200,'citygroup_id':'11'}

Response example with errors:

{'status':400}

 

View

This function provides information about a city group previously created in the system.

URL base: admin/jsapi/citygroup?op=v

 

Mandatory parameters:
  • citygroup_id

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/citygroup?op=v&citygroup_id=11

Response example without errors:

{'citygroup':{'country':'BR','city_id':['296268','286210'],'fecha_alta':'2014-08-08 17:19:25','fecha_baja':null,'citygroup_id':'11','nombre':'grupociugapi2'},'status':200}

Response example with errors:

{'status':400}

 

List

This function lists the city groups created in the system.

URL base: admin/jsapi/citygroup?op=v

 

Request example:

https://admin.eu.e-planning.net/admin/jsapi/citygroup?op=l

Response example without errors:

{'object_class':'citygroup','objects':[{'country':'BR','city_id':['293744','293694','286253','283545','293032','283797'],'fecha_alta':'2013-10-10 15:29:25','fecha_baja':null,'citygroup_id':'5','nombre':'Cidades Sao Paulo'},{'country':'US','city_id':['294209','271409','296674','271821','283083','265399','293251','265415'],'fecha_alta':'2013-11-27 20:21:02','fecha_baja':null,'citygroup_id':'6','nombre':'Citi group 2'},{'country':'BR','city_id':['296268','286210'],'fecha_alta':'2014-08-08 17:19:25','fecha_baja':null,'citygroup_id':'11','nombre':'grupociugapi2'}],'status':200}

Response example with errors:

{'status':400}

Related content