Direcciones

Es la entidad que almacena la informaci贸n espec铆fica de las direcciones que un usuario tiene en su cuenta. Ya que un usuario puede tener m煤ltiples direcciones tanto de facturaci贸n, como de entrega.

Listado de direcciones pertenecientes a un usuario.

GET https://tiendagoshop.com/api/v1/users/:user_id/user_address_templates

Path Parameters

NameTypeDescription

user_id

string

ID del usuario

Query Parameters

NameTypeDescription

q[external_id_eq]

String

Id externo

Headers

NameTypeDescription

X-Spree-Token

string

Token generado desde el CMS de GS

{
    "user_address_templates": [
        {
            "id": 1,
            "firstname": "Pedro",
            "lastname": "Guzman",
            "full_name": "Pedro Guzman",
            "address1": "Ave. 27 de Febrero 283",
            "address2": null,
            "city": "Santo Domingo",
            "zipcode": "",
            "phone": "8091112222",
            "company": null,
            "alternative_phone": null,
            "country_id": 1,
            "state_id": 1,
            "state_name": null,
            "state_text": "01",
            "address_type": "billing",
            "rnc": "",
            "fiscal_type": "consumidor",
            "last_used": "2020-09-30T15:44:30.310Z",
            "geo_address": null,
            "geo_lat": null,
            "geo_lng": null,
            "user_id": 1,
            "country": {
                "id": 1,
                "iso_name": "DOMINICAN REPUBLIC",
                "iso": "DO",
                "iso3": "DOM",
                "name": "Dominican Republic",
                "numcode": 214
            },
            "state": {
                "id": 1,
                "name": "Distrito Nacional (Santo Domingo)",
                "abbr": "01",
                "country_id": 1
            }
        },
        {
            "id": 2,
            "firstname": "Pedro",
            "lastname": "Guzman",
            "full_name": "Pedro Guzman",
            "address1": "Ave. 27 de Febrero 283",
            "address2": null,
            "city": "Santo Domingo",
            "zipcode": "",
            "phone": "8091112222",
            "company": null,
            "alternative_phone": null,
            "country_id": 1,
            "state_id": 1,
            "state_name": null,
            "state_text": "01",
            "address_type": "shipping",
            "rnc": null,
            "fiscal_type": null,
            "last_used": "2020-09-30T15:44:30.312Z",
            "geo_address": null,
            "geo_lat": null,
            "geo_lng": null,
            "user_id": 1,
            "country": {
                "id": 1,
                "iso_name": "DOMINICAN REPUBLIC",
                "iso": "DO",
                "iso3": "DOM",
                "name": "Dominican Republic",
                "numcode": 214
            },
            "state": {
                "id": 1,
                "name": "Distrito Nacional (Santo Domingo)",
                "abbr": "01",
                "country_id": 1
            }
        },
    ],
    "count": 2,
    "current_page": 1,
    "pages": 1
}

Crear una nueva direcci贸n a un usuario

POST https://tiendagoshop.com/api/v1/users/:user_id/user_address_templates

Path Parameters

NameTypeDescription

user_id

string

ID del usuario

Headers

NameTypeDescription

X-Spree-Token

string

Token generado desde el CMS de GS

Request Body

NameTypeDescription

firstname

string

Nombres.

lastname

string

Apellidos

address1

string

Direcci贸n

city

string

Ciudad

phone

integer

Telefono

state_id

integer

ID de ciudad.

address_type

string

Tipo de facturaci贸n.

fiscal_type

string

Tipo de ente fiscal.

external_id

string

Id externo

{
  "id": 13,
  "firstname": "Pepe",
  "lastname": "Mu帽oz",
  "full_name": "Pepe Mu帽oz",
  "address1": "Ave. 27 de Febrero 948",
  "address2": null,
  "city": "Santo Domingo",
  "zipcode": null,
  "phone": "8091112222",
  "company": null,
  "alternative_phone": null,
  "country_id": 1,
  "state_id": 1,
  "state_name": null,
  "state_text": "01",
  "address_type": "billing",
  "rnc": null,
  "fiscal_type": "consumidor",
  "last_used": null,
  "geo_address": null,
  "geo_lat": null,
  "geo_lng": null,
  "user_id": 1,
  "country": {
    "id": 1,
    "iso_name": "DOMINICAN REPUBLIC",
    "iso": "DO",
    "iso3": "DOM",
    "name": "Dominican Republic",
    "numcode": 214
  },
  "state": {
    "id": 1,
    "name": "Distrito Nacional (Santo Domingo)",
    "abbr": "01",
    "country_id": 1
  }
}

Modificar una direcci贸n perteneciente a un usuario.

PUT https://tiendagoshop.com/api/v1/users/:user_id/user_address_templates/:id

Path Parameters

NameTypeDescription

id

string

ID de la direcci贸n del usuario

user_id

string

ID del usuario

Headers

NameTypeDescription

X-Spree-Token

string

Token generado desde el CMS de GS

Request Body

NameTypeDescription

firstname

string

Nombres

lastname

string

Apellidos

address1

string

Direcci贸n del usuario.

city

string

Cidudad

phone

integer

Telef贸no.

state_id

integer

ID de la ciudad.

address_type

string

Tipo de facturaci贸n.

fiscal_type

string

Tipo de ente fiscal.

external_id

string

Id externo

{
  "id": 13,
  "firstname": "Pepe",
  "lastname": "Mu帽oz",
  "full_name": "Pepe Mu帽oz",
  "address1": "Ave. 27 de Febrero 948",
  "address2": null,
  "city": "Santo Domingo",
  "zipcode": null,
  "phone": "8091112222",
  "company": null,
  "alternative_phone": null,
  "country_id": 1,
  "state_id": 1,
  "state_name": null,
  "state_text": "01",
  "address_type": "billing",
  "rnc": null,
  "fiscal_type": "consumidor",
  "last_used": null,
  "geo_address": null,
  "geo_lat": null,
  "geo_lng": null,
  "user_id": 1,
  "country": {
    "id": 1,
    "iso_name": "DOMINICAN REPUBLIC",
    "iso": "DO",
    "iso3": "DOM",
    "name": "Dominican Republic",
    "numcode": 214
  },
  "state": {
    "id": 1,
    "name": "Distrito Nacional (Santo Domingo)",
    "abbr": "01",
    "country_id": 1
  }
}

Eliminar una direcci贸n perteneciente a un usuario.

DELETE https://tiendagoshop.com/api/v1/users/:user_id/user_address_templates/:id

Path Parameters

NameTypeDescription

id

integer

ID de la direcci贸n de usuario.

user_id

integer

ID del usuario.

Headers

NameTypeDescription

X-Spree-Token

string

Token generado desde el CMS de GS

Listado provincias.

GET https://tiendagoshop.com/api/v1/states

Headers

NameTypeDescription

X-Spree-Token

string

Token generado desde el CMS de GS

{
    "states": [
        {
            "id": 2,
            "name": "Azua",
            "abbr": "02",
            "country_id": 1
        },
        {
            "id": 3,
            "name": "Bahoruco",
            "abbr": "03",
            "country_id": 1
        },
        {
            "id": 4,
            "name": "Barahona",
            "abbr": "04",
            "country_id": 1
        },
        {
            "id": 5,
            "name": "Dajab贸n",
            "abbr": "05",
            "country_id": 1
        },
        {
            "id": 1,
            "name": "Distrito Nacional (Santo Domingo)",
            "abbr": "01",
            "country_id": 1
        },
        {
            "id": 6,
            "name": "Duarte",
            "abbr": "06",
            "country_id": 1
        },
        {
            "id": 8,
            "name": "El Seybo [El Seibo]",
            "abbr": "08",
            "country_id": 1
        },
        {
            "id": 9,
            "name": "Espaillat",
            "abbr": "09",
            "country_id": 1
        },
        {
            "id": 30,
            "name": "Hato Mayor",
            "abbr": "30",
            "country_id": 1
        },
        {
            "id": 10,
            "name": "Independencia",
            "abbr": "10",
            "country_id": 1
        },
        {
            "id": 11,
            "name": "La Altagracia",
            "abbr": "11",
            "country_id": 1
        },
        {
            "id": 7,
            "name": "La Estrelleta [El铆as Pi帽a]",
            "abbr": "07",
            "country_id": 1
        },
        {
            "id": 12,
            "name": "La Romana",
            "abbr": "12",
            "country_id": 1
        },
        {
            "id": 13,
            "name": "La Vega",
            "abbr": "13",
            "country_id": 1
        },
        {
            "id": 14,
            "name": "Mar铆a Trinidad S谩nchez",
            "abbr": "14",
            "country_id": 1
        },
        {
            "id": 28,
            "name": "Monse帽or Nouel",
            "abbr": "28",
            "country_id": 1
        },
        {
            "id": 15,
            "name": "Monte Cristi",
            "abbr": "15",
            "country_id": 1
        },
        {
            "id": 29,
            "name": "Monte Plata",
            "abbr": "29",
            "country_id": 1
        },
        {
            "id": 16,
            "name": "Pedernales",
            "abbr": "16",
            "country_id": 1
        },
        {
            "id": 17,
            "name": "Peravia",
            "abbr": "17",
            "country_id": 1
        },
        {
            "id": 18,
            "name": "Puerto Plata",
            "abbr": "18",
            "country_id": 1
        },
        {
            "id": 19,
            "name": "Salcedo",
            "abbr": "19",
            "country_id": 1
        },
        {
            "id": 20,
            "name": "Saman谩",
            "abbr": "20",
            "country_id": 1
        },
        {
            "id": 21,
            "name": "San Crist贸bal",
            "abbr": "21",
            "country_id": 1
        },
        {
            "id": 22,
            "name": "San Juan",
            "abbr": "22",
            "country_id": 1
        },
        {
            "id": 23,
            "name": "San Pedro de Macor铆s",
            "abbr": "23",
            "country_id": 1
        },
        {
            "id": 24,
            "name": "S谩nchez Ram铆rez",
            "abbr": "24",
            "country_id": 1
        },
        {
            "id": 25,
            "name": "Santiago",
            "abbr": "25",
            "country_id": 1
        },
        {
            "id": 26,
            "name": "Santiago Rodr铆guez",
            "abbr": "26",
            "country_id": 1
        },
        {
            "id": 27,
            "name": "Valverde",
            "abbr": "27",
            "country_id": 1
        }
    ]
}

Listado de tipos de comprobante fiscal.

GET https://tiendagoshop.com/api/v1/address_fiscal_types

Headers

NameTypeDescription

X-Spree-Token

string

Token generado desde el CMS de GS

[
    "credito_fiscal",
    "consumidor",
    "gubernamental",
    "especiales"
]

脷ltima actualizaci贸n