Customers

Access to customers


Parameters

Name In Type Required Description
org_id path string true organization name
body body any true ‘none’

Request body - JsonObject

1
{}
None

Request example

 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

curl -X POST https://customers.sta.masstack.com/v4/orgs/telco/customers \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY" \
 --data-raw "{
  'type': 'PRIVATE_CUSTOMER',
  'preferred_language': 'es',
  'segment': 'CONSUMER',
  'contact_info': {
    'phone_numbers': [
      {
        'country_code': '+34',
        'number': '615667898',
        'type': 'MOBILE',
        'is_default': true
      }
    ],
    'emails': [
      {
        'email': 'email@example.com',
        'is_default': true
      }
    ],
    'postal_address': {
      'address_lines': [
        'Calle Mayor 2, 3Āŗ A'
      ],
      'postal_code': '28039',
      'locality': 'Fuenlabrada',
      'administrative_area': 'Madrid',
      'region_code': 'ES'
    }
  },
  'personal_info': {
    'identity_document': {
      'number': '14861628V',
      'type': 'NIF'
    },
    'name': 'Antonio',
    'first_surname': 'Benavente',
    'second_surname': 'Blanco',
    'gender': 'MALE',
    'nationality': 'ES',
    'birthdate': '2022-01-01'
  }
}" 

Responses

Code Meaning Description Schema
201 Created successful operation CustomerCreated
400 Bad Request Invalid request body ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden resource ErrorResponse
404 Not Found Resource not found ErrorResponse
405 Method Not Allowed Method not allowed None
409 Conflict Conflict ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse
504 Gateway Time-out Repository timeout ErrorResponse

Parameters

Name In Type Required Description
org_id path string true organization name
identity_document query string false Document with numbers and letters
identity_document_type query string false Document type
email query string false Email used by customer to authenticate

Enumerated Values

Property Values
identity_document_type one of [NIF, NIE, PASSPORT, CIF]

Request example

1
2
3
4
5

curl -X GET https://customers.sta.masstack.com/v4/orgs/telco/customers/search?identity_document='12345678A'&identity_document_type='NIF'&email='email@example.com' \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK successful operation CustomerSearchResponse
400 Bad Request Invalid request body ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden resource ErrorResponse
404 Not Found Resource not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse
504 Gateway Time-out Repository timeout ErrorResponse

Parameters

Name In Type Required Description
org_id path string true organization name
customer_id path string(uuid) true Customer identifier

Request example

1
2
3
4
5

curl -X GET https://customers.sta.masstack.com/v4/orgs/telco/customers/123e4567-e89b-12d3-a456-556642440000 \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK successful operation CustomerResponse
400 Bad Request Invalid request body ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden resource ErrorResponse
404 Not Found Resource not found ErrorResponse
405 Method Not Allowed Method not allowed None
500 Internal Server Error Internal server error ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse
504 Gateway Time-out Repository timeout ErrorResponse

Parameters

Name In Type Required Description
org_id path string true organization name
customer_id path string(uuid) true Customer identifier

Request example

1
2
3
4
5

curl -X DELETE https://customers.sta.masstack.com/v4/orgs/telco/customers/123e4567-e89b-12d3-a456-556642440000 \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
204 No Content successful operation None
400 Bad Request Invalid request body ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden resource ErrorResponse
404 Not Found Resource not found ErrorResponse
409 Conflict Conflict ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse
504 Gateway Time-out Repository timeout ErrorResponse

Parameters

Name In Type Required Description
org_id path string true organization name
customer_id path string(uuid) true Customer identifier
body body PatchCustomerRequest true ‘none’

Request body - JsonObject

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "preferred_language": "es",
  "contact_info": {
    "phone_numbers": [
      {
        "country_code": "+34",
        "number": "615667898",
        "type": "MOBILE"
      }
    ],
    "emails": [
      {
        "email": "email@example.com"
      }
    ]
  },
  "personal_info": {
    "name": "Antonio",
    "first_surname": "Benavente",
    "second_surname": "Blanco",
    "birthdate": "2022-01-01"
  }
}
Name Type Required Description
anonymous object false Information required to update a customer
Ā» preferred_language LanguageCode false Customer’s preferred language code in ISO-639-1 lowercase format
Ā» contact_info PatchContactInfo false none
Name Type Required Description
anonymous any false none
Name Type Required Description
Ā» anonymous object false none
»» personal_info PatchPersonalInfo false Private customer personal information
Name Type Required Description
Ā» anonymous object false none
»» company_info PatchCompanyInfo false Update Company Info
Name Type Required Description
Ā» anonymous object false none
»» digital_personal_info PatchDigitalPersonalInfo false Update Digital Personal Info

Request example

 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

curl -X PATCH https://customers.sta.masstack.com/v4/orgs/telco/customers/123e4567-e89b-12d3-a456-556642440000 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY" \
 --data-raw "{
  'preferred_language': 'es',
  'contact_info': {
    'phone_numbers': [
      {
        'country_code': '+34',
        'number': '615667898',
        'type': 'MOBILE'
      }
    ],
    'emails': [
      {
        'email': 'email@example.com'
      }
    ]
  },
  'personal_info': {
    'name': 'Antonio',
    'first_surname': 'Benavente',
    'second_surname': 'Blanco',
    'birthdate': '2022-01-01'
  }
}" 

Responses

Code Meaning Description Schema
204 No Content successful operation None
400 Bad Request Invalid request body ErrorResponse
401 Unauthorized Unauthorized ErrorResponse
403 Forbidden Forbidden resource ErrorResponse
404 Not Found Resource not found ErrorResponse
409 Conflict Conflict ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
503 Service Unavailable Service unavailable ErrorResponse
504 Gateway Time-out Repository timeout ErrorResponse

Parameters

Name In Type Required Description
org_id path string true organization name
customer_id path string(uuid) true Customer identifier

Request example

1
2
3
4
5

curl -X GET https://customers.sta.masstack.com/v4/orgs/telco/customers/123e4567-e89b-12d3-a456-556642440000/available-credit-cards \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK Credit cards returned successfully CustomerTokenizedCreditCards

Endpoints

Accounts

    Customers

      Categories

        Customer credentials

          External customers

            External accounts

              Customer identification processes

                Customers Categories