Skip to content

Method getAddress ​

Addresses and coordinates of known points of acceptance of e-gift card. Can be filtered by brand, region and locality. Full list will be returned if no params.

Parameters (data) ​

paramdescription
product_idsingle or list of product_id (see getProducts, field id)
area_namearea name in Spain (for example Barcelona province)
locality_namesingle or list of locality name in Spain (for example Barcelona)

Request example ​

bash
# SIG calculating
$ echo -n 'getAddress{"product_id":2111}SECRET' | sha256sum - | awk '{print $1}'

# doing request using ID and SIG
$ curl 'https://api.giftery.es/v1/?cmd=getAddress&id=ID&in=json&out=json&data=%7B%22product_id%22%3A2111%7D&sig=SIG'

# filter by product_id's
$ echo -n 'getAddress{"product_id":[2111,726]}SECRET' | sha256sum - | awk '{print $1}'
$ curl 'https://api.giftery.es/v1/?cmd=getAddress&id=ID&in=json&out=json&data=%7B%22product_id%22%3A%5B2111%2C726%5D%7D&sig=SIG'

Response example ​

JSON
{
  "status": "ok",
  "data": {
    "Cataluña": {
      "Barcelona": {
        "2111": [
          ["España, Barcelona, Carrer de Mallorca, 401", "41.403629 2.174356"],
          ["España, Barcelona, Carrer de Mallorca, 403", "41.403800 2.174600"]
        ]
      }
    }
  }
}