Actors

Operations related to actors


Parameters

Name In Type Required Description
code query string false Actor code
email query string false Actor email
type query ActorTypeListApiModelRequest false Actor type
parentId 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'&type={"actorTypes":["INTERNAL_MANAGER"]}&parentId='123457'&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": "INTERNAL_MANAGER",
  "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 true Email of the actor
parent_id string false parentId if exist
Property Values
type one of [INTERNAL_MANAGER, EXTERNAL_MANAGER, HEAD, MANAGER, COORDINATOR, SUPERVISOR, POS_MANAGER, TRAINER]

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': 'INTERNAL_MANAGER',
  '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": "INTERNAL_MANAGER",
  "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 true Email of the actor
parent_id string true parentId if exist
Property Values
type one of [INTERNAL_MANAGER, EXTERNAL_MANAGER, HEAD, MANAGER, COORDINATOR, SUPERVISOR, POS_MANAGER, TRAINER]

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': 'INTERNAL_MANAGER',
  '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”
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' \
  -H "Accept: application/json" \
  -H "Authorization: string"

Responses

Code Meaning Description Schema
206 Partial Content Return successfully the dealer list information 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

Endpoints

Loads

    Actors

      Dealers