Actors

Operations related to actors


Parameters

Name In Type Required Description
code query string false Actor code
email query string false Actor email
full_name query string false Full name or partials of it of the actors to search
type query ActorTypeListApiModelRequest false Actor type
parent_id query string false Actor parent id
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.
Authorization header string true Bearer token

Request example

1
2
3
4
5

curl -X GET https://dealers.masstack.com/v2/actors?code='123456'&email='vvvv.ssss@masorange.com'&full_name='JOHnDo'&type={"actorTypes":["EMPLOYEE"]}&parent_id='ac95e92c-277a-4115-9257-49de7279fdc2'&limit='20'&offset='0'&sort='name:asc,id:desc' \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
206 Partial Content Return successfully the actor information ActorsResponse
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 ActorInsertRequest true Body with the actor information

Request body - instance of ActorInsertRequest

1
2
3
4
5
6
7
8
{
  "code": "GTRW12341A",
  "name": "Test Name",
  "surname": "Surname Test",
  "type": "EMPLOYEE",
  "email": "test@masmovil.es",
  "parent_id": "d39cb65f-1aa8-44fe-a3d8-d310e321331a"
}
Name Type Required Description
code string true Code of the actor
name string true Name of the actor
surname string false Surname of the actor msisdn
type string true Enumeration of possible actor types
email string(email) true Email of the actor
parent_id string false parentId if exist
Property Values
type one of [EMPLOYEE, EXTERNAL_MANAGER, HEAD, MANAGER, COORDINATOR, SUPERVISOR, TRAINER, INTERNAL_POS_MANAGER, EXTERNAL_POS_MANAGER, TERRITORIAL, NATIONAL]

Request example

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

curl -X POST https://dealers.masstack.com/v2/actors \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: string" \
 --data-raw "{
  'code': 'GTRW12341A',
  'name': 'Test Name',
  'surname': 'Surname Test',
  'type': 'EMPLOYEE',
  'email': 'test@masmovil.es',
  'parent_id': 'd39cb65f-1aa8-44fe-a3d8-d310e321331a'
}" 

Responses

Code Meaning Description Schema
201 Created Successfully create the actor ActorResponse
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 Actor id
Authorization header string true Bearer token

Request example

1
2
3
4
5

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

Responses

Code Meaning Description Schema
200 OK Return successfully the actor information ActorResponse
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 Actor id
Authorization header string true Bearer token
body body ActorUpdateRequest true Body with the actor information

Request body - instance of ActorUpdateRequest

1
2
3
4
5
6
7
{
  "name": "Test Name",
  "surname": "Surname Test",
  "type": "EMPLOYEE",
  "email": "test@masmovil.es",
  "parent_id": "d39cb65f-1aa8-44fe-a3d8-d310e321331a"
}
Name Type Required Description
name string true Name of the actor
surname string true Surname of the actor msisdn
type string true Enumeration of possible actor types
email string(email) true Email of the actor
parent_id string¦null true parentId for the actor. null if none
Property Values
type one of [EMPLOYEE, EXTERNAL_MANAGER, HEAD, MANAGER, COORDINATOR, SUPERVISOR, TRAINER, INTERNAL_POS_MANAGER, EXTERNAL_POS_MANAGER, TERRITORIAL, NATIONAL]

Request example

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

curl -X PUT https://dealers.masstack.com/v2/actors/{id} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: string" \
 --data-raw "{
  'name': 'Test Name',
  'surname': 'Surname Test',
  'type': 'EMPLOYEE',
  'email': 'test@masmovil.es',
  'parent_id': 'd39cb65f-1aa8-44fe-a3d8-d310e321331a'
}" 

Responses

Code Meaning Description Schema
204 No Content Successfully update the actor 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 Actor id
Authorization header string true Bearer token

Request example

1
2
3
4
5

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

Responses

Code Meaning Description Schema
204 No Content Successfully delete the actor 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

Request example

1
2
3
4
5

curl -X GET https://dealers.masstack.com/v2/actors/types \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
200 OK Return successfully the actor types ActorTypeResponse
401 Unauthorized Unauthorized 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 Actor id
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”
code query string false Código del dealer
commercial_name query string false Nombre comercial del dealer
level_id query integer(int32) false ID del nivel del dealer (V1 only, requires X-API-Version: 1 header)
level query integer(int32) false Dealer’s level
status_code query string false Código de estado del dealer (V1 only, requires X-API-Version: 1 header)
status query string false Dealer’s status
subchannel_name query string false Nombre del subcanal del dealer (V1 only, requires X-API-Version: 1 header)
commercial_structure query string false Dealer’s commercial structure
parent_id query string false ID del dealer padre
parent_code query string false Código del dealer padre
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/actors/{id}/dealers?limit='20'&offset='0'&sort='name:asc,id:desc'&relation_type='DIRECT_AND_INDIRECT'&code='123456'&commercial_name='ComercialS.A.'&level_id='3'&level='3'&status_code='ACTIVE'&status='ACTIVE'&subchannel_name='Online'&commercial_structure='Online'&parent_id='ac95e92c-277a-4115-9257-49de7279fdc2'&parent_code='PARENT123' \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
206 Partial Content Return successfully the dealer list information. Returns DealersResponse (V1) when X-API-Version: 1 header is present, otherwise returns DealersResponseV2 (V2) Inline
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

206 - JsonObject

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "offset": 0,
  "limit": 10,
  "total": 100,
  "sort": "id:asc",
  "items": [
    {
      "id": 12344567,
      "code": "COD-123",
      "commercial_name": "Testing Test SL",
      "level_id": 2,
      "status_code": "ACTIVO",
      "subchannel_id": "1",
      "subchannel_code": "1",
      "subchannel_name": "Atención al Cliente",
      "relation_type": "DIRECT",
      "parent_id": 54321,
      "parent_code": "COD-P123"
    }
  ]
}
None

400 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "BAD_REQUEST",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

401 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "UNAUTHORIZED",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

404 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "BAD_REQUEST",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

409 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "CONFLICT",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

500 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "INTERNAL_SERVER_ERROR",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

503 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "SERVICE_UNAVAILABLE",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

504 - instance of ApiErrorResponse

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "GATEWAY_TIMEOUT",
      "title": "Error message",
      "ref": "some_ref",
      "details": "Detailed error message"
    }
  ]
}
Name Type Required Description
errors [ApiError] false none

Endpoints

Loads

    Actors

      Dealers

        Custom Information

          Commercial Structure

            Accoutning systems

              Brands