Dealers
Operations related to dealers
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /brands \
-H "Accept: application/json" \
-H "Authorization: string"
Custom schema example
1
2
3
4
5
6
7
[
{
"dealerId" : "d39cb65f-1aa8-44fe-a3d8-d310e321331a" ,
"brandCode" : "YG" ,
"brand" : "yoigo"
}
]
Name
Type
Required
Description
dealerId
string
true
The id of the dealer that has the brand and refers to
brandCode
string
true
Brand codes enumeration
brand
string
true
Brand name
Property
Values
brandCode
one of [GU, PP, YG, LE, MM, LY, LL, VI, EB, AH, AL, BT, SW, JI, MB, ST, PM]
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
DealerBrandInsertRequest
true
Information of the brand to be added
1
2
3
{
"brandCode" : "YG"
}
Name
Type
Required
Description
brandCode
string
true
Brand codes enumeration
Property
Values
brandCode
one of [GU, PP, YG, LE, MM, LY, LL, VI, EB, AH, AL, BT, SW, JI, MB, ST, PM]
Request example
1
2
3
4
5
6
7
8
9
curl -X POST https://dealers.masstack.com/v2/dealers/{ id} /brands \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'brandCode': 'YG'
}"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /billing \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
DealerBillingRequest
true
Body with the dealer billing information
1
2
3
{
"billing_dealer_id" : 123456
}
Name
Type
Required
Description
billing_dealer_id
integer(int32)
true
Id of the dealer that bill
Request example
1
2
3
4
5
6
7
8
9
curl -X POST https://dealers.masstack.com/v2/dealers/{ id} /billing \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'billing_dealer_id': 123456
}"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X DELETE https://dealers.masstack.com/v2/dealers/{ id} /billing \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
Authorization
header
string
true
Bearer token
code
query
string
true
Dealer code
limit
query
integer(int64)
false
Limit of results in the response
offset
query
integer(int64)
false
Offset applied to results for pagination
sort
query
string
false
The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added: * “:asc” to indicate an ascending order. * “:desc” to indicate a descending order.
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers?code= 'string' & limit = '20' & offset = '0' & sort = 'name:asc,id:desc' ?code= string \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
Authorization
header
string
true
Bearer token
body
body
DealerInsertRequest
true
Body with the dealer information
1
2
3
4
5
6
7
8
9
10
11
12
{
"code" : "ATC12345" ,
"level" : 4 ,
"ine" : "1234567890" ,
"segment" : "RETAIL" ,
"status" : "Activo" ,
"commercial_name" : "Test Commercial Name" ,
"document_type" : "NIF" ,
"document_value" : "12345678A" ,
"parent_id" : "d39cb65f-1aa8-44fe-a3d8-d310e321331a" ,
"commercial_structure_id" : "d39cb65f-1aa8-44fe-a3d8-d310e321331a"
}
Name
Type
Required
Description
code
string
true
Code of the dealer
level
integer(int32)
true
Level of the dealer
ine
string¦null
true
Ine code of the dealer
segment
string¦null
true
Segment of the dealer
status
string
true
Enumeration of possible dealer statuses
commercial_name
string
true
Commercial name of the dealer
document_type
string¦null
true
Document type of the dealer
document_value
string¦null
true
Document value of the dealer
parent_id
string¦null
true
The parentId of the dealer
commercial_structure_id
string
true
The commercialStructureId of the dealer
Property
Values
status
one of [Bloqueado, Pendiente, Baja, Activo, Inactivo, ]
Request example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
curl -X POST https://dealers.masstack.com/v2/dealers \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'code': 'ATC12345',
'level': 4,
'ine': '1234567890',
'segment': 'RETAIL',
'status': 'Activo',
'commercial_name': 'Test Commercial Name',
'document_type': 'NIF',
'document_value': '12345678A',
'parent_id': 'd39cb65f-1aa8-44fe-a3d8-d310e321331a',
'commercial_structure_id': 'd39cb65f-1aa8-44fe-a3d8-d310e321331a'
}"
Parameters
Name
In
Type
Required
Description
Authorization
header
string
true
Bearer token
id
path
string
true
Dealer ID
body
body
DealerAccountingSystemInsertRequest
true
Body with the dealer accounting system information
1
2
3
4
{
"username" : "medias_puri@masmovil.com" ,
"system" : "IAM"
}
Name
Type
Required
Description
username
string
true
Username
system
string
true
Accounting system identifier
Property
Values
system
one of [MYSIM, QVANTEL, LUCERA, HEOS, IAM, LEBARA, LYCAMOBILE, VIRGIN, HERO, EMBOU, SCHAMAN, PORTAL DE COMPRAS, DIGO]
Request example
1
2
3
4
5
6
7
8
9
10
curl -X POST https://dealers.masstack.com/v2/dealers/{ id} /accounting-system \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'username': 'medias_puri@masmovil.com',
'system': 'IAM'
}"
Parameters
Name
In
Type
Required
Description
id_actor
path
string
true
Actor id
id_dealer
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X POST https://dealers.masstack.com/v2/dealers/{ id_dealer} /actors/{ id_actor} \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id_dealer
path
string
true
Dealer id
id_actor
path
string
true
Actor id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X DELETE https://dealers.masstack.com/v2/dealers/{ id_dealer} /actors/{ id_actor} \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /ticket-config \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
TicketConfigUpdateRequest
true
Body with the dealer ticket config information
1
2
3
4
5
6
7
8
9
10
11
{
"commercialName" : "Test Commercial Name" ,
"address" : "Test Address" ,
"city" : "Test City" ,
"province" : "Test Province" ,
"postalCode" : "12345" ,
"country" : "Test Country" ,
"documentType" : "NIF" ,
"documentNumber" : "12345678A" ,
"printType" : "A4"
}
Name
Type
Required
Description
commercialName
string
true
Commercial name of the ticket config
address
string
true
Address of the ticket config
city
string
true
City of the ticket config
province
string
true
Province of the ticket config
postalCode
string
true
Postal code of the ticket config
country
string
true
Country of the ticket config
documentType
string
true
Document type of the ticket config
documentNumber
string
true
Document number of the ticket config
printType
string
true
Print type of the ticket config
Request example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl -X PUT https://dealers.masstack.com/v2/dealers/{ id} /ticket-config \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'commercialName': 'Test Commercial Name',
'address': 'Test Address',
'city': 'Test City',
'province': 'Test Province',
'postalCode': '12345',
'country': 'Test Country',
'documentType': 'NIF',
'documentNumber': '12345678A',
'printType': 'A4'
}"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
TicketConfigInsertRequest
true
Body with the dealer ticket config information
1
2
3
4
5
6
7
8
9
10
11
{
"commercialName" : "Test Commercial Name" ,
"address" : "Test Address" ,
"city" : "Test City" ,
"province" : "Test Province" ,
"postalCode" : "12345" ,
"country" : "Test Country" ,
"documentType" : "NIF" ,
"documentNumber" : "12345678A" ,
"printType" : "A4"
}
Name
Type
Required
Description
commercialName
string
false
Commercial name of the ticket config
address
string
false
Address of the ticket config
city
string
false
City of the ticket config
province
string
false
Province of the ticket config
postalCode
string
false
Postal code of the ticket config
country
string
false
Country of the ticket config
documentType
string
false
Document type of the ticket config
documentNumber
string
false
Document number of the ticket config
printType
string
false
Print type of the ticket config
Request example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl -X POST https://dealers.masstack.com/v2/dealers/{ id} /ticket-config \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'commercialName': 'Test Commercial Name',
'address': 'Test Address',
'city': 'Test City',
'province': 'Test Province',
'postalCode': '12345',
'country': 'Test Country',
'documentType': 'NIF',
'documentNumber': '12345678A',
'printType': 'A4'
}"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X DELETE https://dealers.masstack.com/v2/dealers/{ id} /ticket-config \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
accounting_system_id
path
string
true
Dealer accounting system ID
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /accounting-system/{ accounting_system_id} \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
accounting_system_id
path
string
true
Dealer accounting system ID
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X DELETE https://dealers.masstack.com/v2/dealers/{ id} /accounting-system/{ accounting_system_id} \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /address \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
DealerAddressCreateUpdateRequest
true
InformaciĂłn de la direcciĂłn del dealer
1
2
3
4
5
6
7
8
{
"address" : "Calle Gran VĂa 28" ,
"city" : "Madrid" ,
"province" : "Madrid" ,
"country" : "España" ,
"location" : "40.4199,-3.7065" ,
"postal_code" : "28013"
}
Name
Type
Required
Description
address
string
true
Street address
city
string
true
City
province
string
true
Province
country
string
true
Country
location
string¦null
false
Geographic coordinates
postal_code
string
true
Postal code
Request example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl -X PUT https://dealers.masstack.com/v2/dealers/{ id} /address \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'address': 'Calle Gran VĂa 28',
'city': 'Madrid',
'province': 'Madrid',
'country': 'España',
'location': '40.4199,-3.7065',
'postal_code': '28013'
}"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X DELETE https://dealers.masstack.com/v2/dealers/{ id} /address \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
brand_name
path
string
true
Brand name
Authorization
header
string
true
Bearer token
Enumerated Values
Property
Values
brand_name
one of [GU, PP, YG, LE, MM, LY, LL, VI, EB, AH, AL, BT, SW, JI, MB, ST, PM]
Request example
1
2
3
4
5
curl -X DELETE https://dealers.masstack.com/v2/dealers/{ id} /brands/{ brand_name} \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
DealerStoreCapabilityCreateUpdateRequest
true
Dealer’s store capability data to set
1
2
3
4
5
6
{
"store_delivery" : true ,
"device_return" : true ,
"sim_duplicate" : true ,
"store_type" : "BASIC"
}
Name
Type
Required
Description
store_delivery
boolean
true
Indicates if the store has delivery capability, if it can delivery products
device_return
boolean
true
Indicates if the store has device return capability, if it can receive devices returns
sim_duplicate
boolean
true
Indicates if the store has sim duplicate capability, if it can manage sim duplicates
store_type
string¦null
true
Type of the store
Request example
1
2
3
4
5
6
7
8
9
10
11
12
curl -X PUT https://dealers.masstack.com/v2/dealers/{ id} /store-capability \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'store_delivery': true,
'device_return': true,
'sim_duplicate': true,
'store_type': 'BASIC'
}"
Parameters
Name
In
Type
Required
Description
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/brands \
-H "Accept: application/json" \
-H "Authorization: string"
Custom schema example
1
2
3
4
5
6
[
{
"code" : "YG" ,
"brand" : "yoigo"
}
]
Name
Type
Required
Description
code
string
true
Brand codes enumeration
brand
string
true
Brand name
Property
Values
code
one of [GU, PP, YG, LE, MM, LY, LL, VI, EB, AH, AL, BT, SW, JI, MB, ST, PM]
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /accounting-systems \
-H "Accept: application/json" \
-H "Authorization: string"
Custom schema example
1
2
3
4
5
6
7
[
{
"id" : "e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b" ,
"system" : "IAM" ,
"username" : "medias_puri@masmovil.com"
}
]
Name
Type
Required
Description
id
string
true
Dealer accounting_system entry id (unique identifier)
system
string
true
Accounting system name
username
string
true
Username
Property
Values
system
one of [MYSIM, QVANTEL, LUCERA, HEOS, IAM, LEBARA, LYCAMOBILE, VIRGIN, HERO, EMBOU, SCHAMAN, PORTAL DE COMPRAS, DIGO]
Name
In
Type
Required
Description
id
path
string
true
Dealer id
code
query
string
false
Actor code
email
query
string
false
Actor email
name
query
string
false
Actor name
type
query
string
false
Tipo de actor
parent_id
query
integer(int64)
false
ID del actor padre
parent_code
query
string
false
CĂłdigo del actor padre
full_name
query
string
false
Nombre completo del actor
limit
query
integer(int64)
false
Limit of results in the response
offset
query
integer(int64)
false
Offset applied to results for pagination
sort
query
string
false
The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added: * “:asc” to indicate an ascending order. * “:desc” to indicate a descending order.
relation_type
query
string
false
The type of relation between the actors and the dealers. It can be one of the following values: * “DIRECT” * “INDIRECT” * “DIRECT_AND_INDIRECT”
Authorization
header
string
true
Bearer token
Enumerated Values
Property
Values
relation_type
one of [DIRECT_AND_INDIRECT, DIRECT, INDIRECT]
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} /actors?code= 'aaa-bbb-111-ccc-ddd' & email = 'vvvv.ssss@masorange.com' & name = 'Actorname' & type = 'dealer' & parent_id = '98765' & parent_code = 'parent-abc-123' & full_name = 'JuanPérez' & limit = '20' & offset = '0' & sort = 'name:asc,id:desc' & relation_type = 'DIRECT_AND_INDIRECT' \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/{ id} \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
body
body
DealerUpdateRequest
true
Body with the dealer information
1
2
3
4
5
6
7
8
9
10
11
{
"level" : 4 ,
"ine" : "1234567890" ,
"segment" : "RETAIL" ,
"status" : "Activo" ,
"commercial_name" : "Test Commercial Name" ,
"document_type" : "NIF" ,
"document_value" : "12345678A" ,
"parent_id" : "d39cb65f-1aa8-44fe-a3d8-d310e321331a" ,
"commercial_structure_id" : "d39cb65f-1aa8-44fe-a3d8-d310e321331a"
}
Name
Type
Required
Description
level
integer(int32)
true
Level of the dealer
ine
string¦null
true
Ine code of the dealer
segment
string¦null
true
Segment of the dealer
status
string
true
Enumeration of possible dealer statuses
commercial_name
string
true
Commercial name of the dealer
document_type
string¦null
true
Document type of the dealer
document_value
string¦null
true
Document value of the dealer
parent_id
string¦null
true
The parentId of the dealer. Null if none
commercial_structure_id
string
true
The commercialStructureId of the dealer
Property
Values
status
one of [Bloqueado, Pendiente, Baja, Activo, Inactivo, ]
Request example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl -X PUT https://dealers.masstack.com/v2/dealers/{ id} \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: string" \
--data-raw "{
'level': 4,
'ine': '1234567890',
'segment': 'RETAIL',
'status': 'Activo',
'commercial_name': 'Test Commercial Name',
'document_type': 'NIF',
'document_value': '12345678A',
'parent_id': 'd39cb65f-1aa8-44fe-a3d8-d310e321331a',
'commercial_structure_id': 'd39cb65f-1aa8-44fe-a3d8-d310e321331a'
}"
Parameters
Name
In
Type
Required
Description
id
path
string
true
Dealer id
Authorization
header
string
true
Bearer token
limit
query
integer(int64)
false
Limit of results in the response
offset
query
integer(int64)
false
Offset applied to results for pagination
sort
query
string
false
The fields by which the results will be sorted. It can be a list of fields separated by commas. A suffix must be added: * “:asc” to indicate an ascending order. * “:desc” to indicate a descending order.
Request example
1
2
3
4
5
curl -X GET https://dealers.masstack.com/v2/dealers/billing/{ id} ?limit= '20' & offset = '0' & sort = 'name:asc,id:desc' \
-H "Accept: application/json" \
-H "Authorization: string"
Parameters
Name
In
Type
Required
Description
Authorization
header
string
true
Bearer token
Request example
1
2
3
4
5
curl -X POST https://dealers.masstack.com/v2/dealers/fix-geocoding \
-H "Accept: application/json" \
-H "Authorization: string"