Accounts

Access to accounts


Parameters

Name In Type Required Description
org_id path string true organization name
account_id path string(uuid) true Account identifier

Request example

1
2
3
4
5

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

Responses

Code Meaning Description Schema
200 OK successful operation GetAccount
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
account_id path string(uuid) true Account identifier
body body PatchAccountPaymentMethod true ‘none’

Request body - instance of PatchAccountPaymentMethod

1
2
3
4
5
6
{
  "type": "BANK_TRANSFER",
  "details": {
    "iban": "ES7921000813610123456789"
  }
}
Name Type Required Description
type PatchPaymentType true none
details object¦null false iban is mandatory when type is DIRECT_DEBIT, token_id is mandatory when type is CREDIT_CARD
Name Type Required Description
Ā» anonymous object false none
»» iban string true Only for direct debit payment method
Name Type Required Description
Ā» anonymous object false none
»» token_id string(uuid) true Only for credit card payment method, this value is the id of the tokenized credit card

Request example

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

curl -X PATCH https://customers.sta.masstack.com/v4/orgs/telco/accounts/123e4567-e89b-12d3-a456-556642440000/payment-method \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY" \
 --data-raw "{
  'type': 'BANK_TRANSFER',
  'details': {
    'iban': 'ES7921000813610123456789'
  }
}" 

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
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/accounts \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK Customer accounts returned successfully AccountIds
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
body body PostAccount true ‘none’

Request body - instance of PostAccount

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
{
  "modality": "RECURRING_PREPAID",
  "billing_address": {
    "address_lines": [
      "Avenida de Bruselas, 38"
    ],
    "postal_code": "28108",
    "state_id": "28",
    "locality": "Alcobendas",
    "administrative_area": "Madrid",
    "region_code": "ES"
  },
  "payment_method": {
    "type": "BANK_TRANSFER",
    "details": {
      "iban": "ES7921000813610123456789"
    }
  }
}
Name Type Required Description
modality string true none
billing_address BillingAddress false none
payment_method PaymentMethod true none
Property Values
modality one of [RECURRING_PREPAID, POSTPAID]

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

curl -X POST https://customers.sta.masstack.com/v4/orgs/telco/customers/123e4567-e89b-12d3-a456-556642440000/accounts \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY" \
 --data-raw "{
  'modality': 'RECURRING_PREPAID',
  'billing_address': {
    'address_lines': [
      'Avenida de Bruselas, 38'
    ],
    'postal_code': '28108',
    'state_id': '28',
    'locality': 'Alcobendas',
    'administrative_area': 'Madrid',
    'region_code': 'ES'
  },
  'payment_method': {
    'type': 'BANK_TRANSFER',
    'details': {
      'iban': 'ES7921000813610123456789'
    }
  }
}" 

Responses

Code Meaning Description Schema
200 OK successful operation AccountCreated
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
account_id path string(uuid) true Account 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/accounts/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
account_id path string(uuid) true Account 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/accounts/123e4567-e89b-12d3-a456-556642440000/available-payment-methods \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK Payment methods returned successfully AvailablePaymentMethods
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

Endpoints

Accounts

    Customers

      Categories

        Customer credentials

          External customers

            External accounts

              Customer identification processes

                Customers Categories