# Obtener las Suscripciones
# GET /subscriptions
Fecha desde:
date_from string (query)
Fecha hasta:
date_to string (query)
Estado:
status string (query)
Mostrar cambios de plan:
show_res_changes boolean (query)
Fecha cambio de plan desde:
change_res_date_from string(query)
Fecha cambio de plan hasta
change_res_date_to string(query)
Fecha de baja desde:
cancellation_date_from string(query)
Fecha de baja desde:
cancellation_date_from string (query)
Fecha de baja hasta
cancellation_date_to string (query)
Filtrar por ID de paquete
resource_id integer(query)
Filtrar por código de paquete
resource_code string(query)
curl -X GET "https://suscripcion.expreso.ec/api/v1/subscriptions" -H "accept: application/json" -H "Authorization: Bearer password" -H "X-CSRF-TOKEN: "
Request URL:
https://suscripcion.expreso.ec/api/v1/subscriptions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Response body
{
"data": [
{
"id": 1,
"status": "Activa",
"is_active": true,
"family_codes": [],
"child_subscription": false,
"parent_subscription_id": null,
"has_benefit_card": false,
"on_promotion": false,
"cancellation_date": null,
"created_at": "2020-04-30T09:56:34-03:00",
"updated_at": "2020-04-30T09:56:34-03:00",
"subscriber": {
"id": 1,
"user_id": 2,
"first_name": "Emiliano",
"last_name": "Wyleex",
"email": "Emiliano@wyleex.com",
"phone": "123123123",
"identification_type": "Cedula",
"identification_number": "24724290",
"created_at": "2020-04-30T09:23:52-03:00",
"updated_at": "2020-04-30T09:23:52-03:00",
"addresses": [
{
"country": "EC",
"state": "Napo",
"city": "Napo",
"street": "La Calle",
"number": "123",
"floor": null,
"apt": null,
"postal_code": "12345",
"details": null,
"type": "shipping"
}
]
},
"resource": {
"id": 2,
"code": "SIVDSDPEXPRESO",
"name": "Suscripción impresa Viernes a Domingo + Digital Premium",
"price": 9.5,
"promotional_price": 9.5,
"promotional_months": 0,
"active_from": "2020-03-20T00:00:00-03:00",
"active_to": "2100-12-31T00:00:00-03:00",
"has_benefit_card": false,
"family_codes": 0,
"visible": true,
"block_plan": false,
"color": "#16a085",
"custom_description": "(*) Contrato mínimo de un año. Pago mensual recurrente. Renovable automáticamente al vencimiento."
},
"card": {
"holder": "Rucci Mauricio",
"identification_type": "RUC",
"identification_number": "333333333",
"type": "MASTERCARD",
"number": "5451951111111111",
"expiration_date": "2029/02",
"is_masked": false
}
},
],
"links": {
"first": "https://suscripcion.expreso.ec/api/v1/subscriptions?page=1",
"last": "https://suscripcion.expreso.ec/api/v1/subscriptions?page=2",
"prev": null,
"next": "https://suscripcion.expreso.ec/api/v1/subscriptions?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"path": "https://suscripcion.expreso.ec/api/v1/subscriptions",
"per_page": 15,
"to": 15,
"total": 22
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Response headers
cache-control: no-cache, private
connection: keep-alive
content-type: application/json
date: Thu, 07 May 2020 18:37:15 GMT
server: nginx
strict-transport-security: max-age=31536000; includeSubDomains
transfer-encoding: chunked
x-powered-by: PHP/7.3.13
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# Obttener a un suscriptor por ID
# GET /subscribers/{id}
no parameters
curl -X GET "https://suscripcion.expreso.ec/api/v1/subscribers/1" -H "accept: application/json" -H "Authorization: Bearer password" -H "X-CSRF-TOKEN: "Request URL
https://suscripcion.expreso.ec/api/v1/subscribers/{id}
1
2
3
4
5
2
3
4
5
# Response body
{
"data": {
"id": 1,
"user_id": 2,
"first_name": "Emiliano",
"last_name": "Wyleex",
"email": "Emiliano@wyleex.com",
"phone": "123123123",
"identification_type": "Cedula",
"identification_number": "24724290",
"created_at": "2020-04-30T09:23:52-03:00",
"updated_at": "2020-04-30T09:23:52-03:00",
"addresses": [
{
"country": "EC",
"state": "test",
"city": "test",
"street": "La Calle",
"number": "1234",
"floor": null,
"apt": null,
"postal_code": "12345",
"details": null,
"type": "shipping"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Response headers
cache-control: no-cache, private
connection: keep-alive
content-type: application/json
date: Thu, 07 May 2020 18:35:22 GMT
server: nginx
strict-transport-security: max-age=31536000; includeSubDomains
transfer-encoding: chunked
x-powered-by: PHP/7.3.13
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# Crear una suscripcion para un Usuario.
# POST /subscriptions
# Ejemplo
{
"subscriber": {
"first_name": "John",
"last_name": "Doe",
"identification_type": "DNI",
"identification_number": "10111222",
"email": "johndoe@test.com",
"phone": "1159530253",
"user_id": "555111"
},
"shipping": {
"country": "AR",
"state": "Tucuman",
"city": "Tucuman",
"street": "Av sarasa",
"number": "555",
"floor": "5",
"apt": "A",
"postal_code": "5000",
"details": "Puerta blanca"
},
"family_code": {
"code": "XXXX99XX"
},
"cancellation_date": "2020-01-25",
"company": "pepsi",
"resource_id": "5",
"parent_subscription_id": "1551"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Obtener una suscripcion por ID
# GET /subscriptions/{id}
no parameters
curl -X GET "https://suscripcion.expreso.ec/api/v1/subscriptions/1" -H "accept: application/json" -H "Authorization: Bearer password" -H "X-CSRF-TOKEN: "https://suscripcion.expreso.ec/api/v1/subscribers/{id}
Request URL:
https://suscripcion.expreso.ec/api/v1/subscriptions/{id}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Response body
{
"data": {
"id": 1,
"status": "Activa",
"is_active": true,
"family_codes": [],
"child_subscription": false,
"parent_subscription_id": null,
"has_benefit_card": false,
"on_promotion": false,
"cancellation_date": null,
"created_at": "2020-04-30T09:56:34-03:00",
"updated_at": "2020-04-30T09:56:34-03:00",
"subscriber": {
"id": 1,
"user_id": 2,
"first_name": "Emiliano",
"last_name": "Wyleex",
"email": "Emiliano@wyleex.com",
"phone": "123123123",
"identification_type": "Cedula",
"identification_number": "24724290",
"created_at": "2020-04-30T09:23:52-03:00",
"updated_at": "2020-04-30T09:23:52-03:00",
"addresses": [
{
"country": "EC",
"state": "test",
"city": "test",
"street": "La Calle",
"number": "123",
"floor": null,
"apt": null,
"postal_code": "12345",
"details": null,
"type": "shipping"
}
]
},
"resource": {
"id": 2,
"code": "SIVDSDPEXPRESO",
"name": "Suscripción impresa Viernes a Domingo + Digital Premium",
"price": 9.5,
"promotional_price": 9.5,
"promotional_months": 0,
"active_from": "2020-03-20T00:00:00-03:00",
"active_to": "2100-12-31T00:00:00-03:00",
"has_benefit_card": false,
"family_codes": 0,
"visible": true,
"block_plan": false,
"color": "#16a085",
"custom_description": "(*) Contrato mínimo de un año. Pago mensual recurrente. Renovable automáticamente al vencimiento."
},
"card": {
"holder": "Rucci Mauricio",
"identification_type": "RUC",
"identification_number": "1231324412",
"type": "MASTERCARD",
"number": "54519511111111",
"expiration_date": "2042/01",
"is_masked": false
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Response headers
cache-control: no-cache, private
connection: keep-alive
content-type: application/json
date: Thu, 07 May 2020 18:49:11 GMT
server: nginx
strict-transport-security: max-age=31536000; includeSubDomains
transfer-encoding: chunked
x-powered-by: PHP/7.3.13
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# Borrar la suscripcion de un usuario por ID
# DELETE /subscriptions/{id}
parametro: id
curl -X DELETE "https://suscripcion.expreso.ec/api/v1/subscriptions/1" -H "accept: application/json" -H "X-CSRF-TOKEN: "
Request URL:
https://suscripcion.expreso.ec/api/v1/subscriptions/{id}
1
2
3
4
5
6
7
2
3
4
5
6
7