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"

Responses

Code Meaning Description Schema
200 OK List of dealer brands successfully obtained [DealerBrandResponse]
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

200 - instance of DealerBrandResponse

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

Request body - instance of DealerBrandInsertRequest

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'
}" 

Responses

Code Meaning Description Schema
201 Created Brand successfully added to dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK Successfully return the billing information for the dealer BillingOfDealerResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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

Request body - instance of DealerBillingRequest

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
}" 

Responses

Code Meaning Description Schema
201 Created Successfully create the billing information for the dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found BadRequest ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
204 No Content Successfully delete the billing information for the dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK Successfully return the list of the dealers that have this dealerCode DealersResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found BadRequest ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

Parameters

Name In Type Required Description
Authorization header string true Bearer token
body body DealerInsertRequest true Body with the dealer information

Request body - instance of DealerInsertRequest

 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'
}" 

Responses

Code Meaning Description Schema
201 Created Successfully create a dealer DealerResponseV2
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found BadRequest ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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

Request body - instance of DealerAccountingSystemInsertRequest

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'
}" 

Responses

Code Meaning Description Schema
201 Created Successfully create a dealer accounting system DealerAccountingSystemResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found BadRequest ApiErrorResponse
500 Internal Server Error Internal Server Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
201 Created Successfully created the dealer-actor relationship None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found BadRequest ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
204 No Content Successfully delete the relationship with an actor for the dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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}/contacts \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
200 OK List of contacts successfully obtained [DealerContactResponse]
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

200 - instance of DealerContactResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[
  {
    "id": "e7b8f8e6-9c3b-4d2a-8f1e-2c3d4e5f6a7b",
    "dealer_id": "d39cb65f-1aa8-44fe-a3d8-d310e321331a",
    "name": "John Doe",
    "email": "contactmail@example.es",
    "phone_number": "string",
    "purposes": "[Comercial, FacturaciĂłn]"
  }
]
Name Type Required Description
id string true Unique contact ID (UUID)
dealer_id string true Dealer ID to which the contact belongs
name string¦null true Contact name
email string¦null true Contact email
phone_number string¦null true Contact phoneNumber number
purposes [string]¦null true Contact purposes: [Gerencia, Comercial, Logística, Informes, Facturación, Incidencias, Público]

Parameters

Name In Type Required Description
id path string true Dealer id
Authorization header string true Bearer token
body body DealerContactInsertRequest true Information of the contact to be created

Request body - instance of DealerContactInsertRequest

1
2
3
4
5
6
{
  "name": "John Doe",
  "email": "contactmail@example.es",
  "phone_number": "600123456",
  "purposes": "[Comercial, FacturaciĂłn]"
}
Name Type Required Description
name string¦null true Contact name
email string¦null true Contact email
phone_number string¦null true Contact phoneNumber number
purposes [string]¦null true Contact purposes: [Gerencia, Comercial, Logística, Informes, Facturación, Incidencias, Público]

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12

curl -X POST https://dealers.masstack.com/v2/dealers/{id}/contacts \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: string" \
 --data-raw "{
  'name': 'John Doe',
  'email': 'contactmail@example.es',
  'phone_number': '600123456',
  'purposes': '[Comercial, FacturaciĂłn]'
}" 

Responses

Code Meaning Description Schema
201 Created Contact successfully created DealerContactResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK Return successfully the ticket config information TicketConfigResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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

Request body - instance of TicketConfigUpdateRequest

 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'
}" 

Responses

Code Meaning Description Schema
204 No Content Successfully update the dealer’s ticket config None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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

Request body - instance of TicketConfigInsertRequest

 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'
}" 

Responses

Code Meaning Description Schema
201 Created Successfully create the ticket config for the dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
204 No Content Successfully delete the dealer’s ticket config None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK Successfully retrieved dealer accounting system DealerAccountingSystemResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
204 No Content Accounting system successfully deleted None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK Successfully returned the dealer’s address DealerAddressResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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

Request body - instance of DealerAddressCreateUpdateRequest

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'
}" 

Responses

Code Meaning Description Schema
200 OK Address correctly created or updated DealerAddressResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
204 No Content Successfully deleted the dealer’s address None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
204 No Content Brand successfully deleted from dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

Parameters

Name In Type Required Description
id path string true Dealer id
contact_id path string true Contact ID
Authorization header string true Bearer token

Request example

1
2
3
4
5

curl -X GET https://dealers.masstack.com/v2/dealers/{id}/contacts/{contact_id} \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
200 OK Contact successfully obtained DealerContactResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

Parameters

Name In Type Required Description
id path string true Dealer id
contact_id path string true Contact ID
Authorization header string true Bearer token
body body DealerContactUpdateRequest true Information of the contact to update

Request body - instance of DealerContactUpdateRequest

1
2
3
4
5
6
{
  "name": "John Doe",
  "email": "contactmail@example.es",
  "phone_number": "600123456",
  "purposes": "[Comercial, FacturaciĂłn]"
}
Name Type Required Description
name string¦null true Contact name
email string¦null true Contact email
phone_number string¦null true Contact phoneNumber number
purposes [string]¦null true Contact purposes: [Gerencia, Comercial, Logística, Informes, Facturación, Incidencias, Público]

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12

curl -X PUT https://dealers.masstack.com/v2/dealers/{id}/contacts/{contact_id} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: string" \
 --data-raw "{
  'name': 'John Doe',
  'email': 'contactmail@example.es',
  'phone_number': '600123456',
  'purposes': '[Comercial, FacturaciĂłn]'
}" 

Responses

Code Meaning Description Schema
204 No Content Contact successfully updated None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

Parameters

Name In Type Required Description
id path string true Dealer id
contact_id path string true Contact ID
Authorization header string true Bearer token

Request example

1
2
3
4
5

curl -X DELETE https://dealers.masstack.com/v2/dealers/{id}/contacts/{contact_id} \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
204 No Content Contact successfully deleted None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

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

Request body - instance of DealerStoreCapabilityCreateUpdateRequest

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'
}" 

Responses

Code Meaning Description Schema
200 OK Store capability data successfully set (upserted) DealerStoreCapabilityResponse
400 Bad Request Invalid request ApiErrorResponse
500 Internal Server Error Internal server error ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK List of brands successfully obtained [BrandResponse]
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

200 - instance of BrandResponse

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"

Responses

Code Meaning Description Schema
200 OK Successfully retrieved dealer’s all accounting systems [DealerAccountingSystemResponse]
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
404 Not Found Not Found ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse

200 - instance of DealerAccountingSystemResponse

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]

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"

Responses

Code Meaning Description Schema
200 OK Return successfully the dealer information DealerResponseV2
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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

Request body - instance of DealerUpdateRequest

 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'
}" 

Responses

Code Meaning Description Schema
204 No Content Successfully updated the dealer None
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
200 OK Successfully return the list of the dealers that have a relation with the queried billing dealer DealersResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

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"

Responses

Code Meaning Description Schema
201 Created Successfully processed the fix geocoding request FixGeocodingResponse
400 Bad Request Bad Request ApiErrorResponse
401 Unauthorized Unauthorized ApiErrorResponse
409 Conflict Conflict ApiErrorResponse
500 Internal Server Error Internal Error ApiErrorResponse
503 Service Unavailable Service Unavailable ApiErrorResponse
504 Gateway Time-out Gateway Timeout ApiErrorResponse

Endpoints

Default

    Loads

      Actors

        Dealers