Credit Limits

Access to subscription credit limits


Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true Subscription Id

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/masmovil/subscriptions/3821002/credit_limits \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK. Empty list if the correspondent subscription does not have credit limits [GetCreditLimit]
400 Bad Request Wrong subscription type ErrorMessage
404 Not Found A subscription with the specified criteria was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

200 - instance of GetCreditLimit

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
[
  {
    "subscription_id": 3821002,
    "credit_limit_id": "MOBILE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT",
    "credit_limit_value": 87.264463,
    "user_name": "test@test.com",
    "change_reason": "customer request",
    "effective_date": "2017-09-15T22:00:00Z",
    "update_date": "2017-09-15T22:00:00Z",
    "historical_changes": [
      {
        "subscription_id": 3821002,
        "credit_limit_id": "MOBILE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT",
        "credit_limit_value": 87.264463,
        "user_name": "test@test.com",
        "change_reason": "customer request",
        "effective_date": "2017-09-15T22:00:00Z",
        "update_date": "2017-09-15T22:00:00Z"
      }
    ]
  }
]
Name Type Required Description
anonymous CreditLimit false none
Name Type Required Description
anonymous object false none

Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true Subscription Id
body body PostCreditLimits true ‘none’

Request body - instance of PostCreditLimits

1
2
3
4
5
6
7
8
9
{
  "credit_limits": [
    {
      "credit_limit_id": "MOBILE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT",
      "credit_limit_value": 87.264463,
      "user_name": "test@test.com"
    }
  ]
}
Name Type Required Description
credit_limits [PostCreditLimit] true none

Request example

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

curl -X POST https://subscriptions.masstack.com/v1/orgs/masmovil/subscriptions/3821002/credit_limits \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'credit_limits': [
    {
      'credit_limit_id': 'MOBILE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT',
      'credit_limit_value': 87.264463,
      'user_name': 'test@test.com'
    }
  ]
}" 

Responses

Code Meaning Description Schema
201 Created Credit Limits creation successfully done [PostCreditLimitsResponse]
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription with the specified id was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

201 - instance of PostCreditLimitsResponse

Custom schema example

1
2
3
4
5
6
7
[
  {
    "credit_limit_id": "MOBILE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT",
    "credit_limit_value": 87.264463,
    "effective_date": "2017-09-15T22:00:00Z"
  }
]
Name Type Required Description
credit_limit_id string false credit limit id
credit_limit_value number false credit limit value. If not received, default value configured for tenant will be provisioned
effective_date string(date-time) false date when the limit starts to be effective
Property Values
credit_limit_id one of [MOBILE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT, MOBILE_SUBSCRIPTION_ROAMING_VOICE_CREDIT_LIMIT, MOBILE_SUBSCRIPTION_PREMIUM_CREDIT_LIMIT, MOBILE_SUBSCRIPTION_INTERNATIONAL_VOICE_CREDIT_LIMIT, LANDLINE_SUBSCRIPTION_TOTAL_CREDIT_LIMIT, LANDLINE_SUBSCRIPTION_PREMIUM_CREDIT_LIMIT, LANDLINE_SUBSCRIPTION_INTERNATIONAL_VOICE_CREDIT_LIMIT]

Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true Subscription Id
body body PatchCreditLimits true ‘none’

Request body - instance of PatchCreditLimits

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "subscription_type": "MOBILE",
  "credit_limits": [
    {
      "credit_limit_id": "MOBILE_SUBSCRIPTION_ROAMING_VOICE_CREDIT_LIMIT",
      "credit_limit_value": 87.264463,
      "change_user": "test@test.com",
      "change_reason": "customer request"
    }
  ]
}
Name Type Required Description
subscription_type SubscriptionType true subscription type name. Mapping between Mysim and MasSubscriptions subscription_type
  • PRE-PAGO -> MOBILE
  • POST-PAGO -> MOBILE
  • INTERNET FTTH-> BROADBAND
  • INTERNET ADSL -> BROADBAND
  • FIJO ANALOGICO-> LANDLINE
  • FIJO DIGITAL -> LANDLINE
  • AGILE TV -> TV
  • SECURITY -> SECURITY
  • DATASHARING -> DATASHARING
  • MULTISIM -> MULTISIM
  • DEVICEINSURANCE -> DEVICEINSURANCE
  • NETFLIX -> NETFLIX
  • APPLEWATCH -> APPLEWATCH
  • AMAZONPRIME -> AMAZONPRIME
  • MAX -> MAX
  • ORANGE TV -> ORANGETV
  • ORANGE TV LIBRE -> ORANGETVLIBRE
credit_limits [PatchCreditLimit] true none

Request example

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

curl -X PATCH https://subscriptions.masstack.com/v1/orgs/masmovil/subscriptions/3821002/credit_limits \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'subscription_type': 'MOBILE',
  'credit_limits': [
    {
      'credit_limit_id': 'MOBILE_SUBSCRIPTION_ROAMING_VOICE_CREDIT_LIMIT',
      'credit_limit_value': 87.264463,
      'change_user': 'test@test.com',
      'change_reason': 'customer request'
    }
  ]
}" 

Responses

Code Meaning Description Schema
202 Accepted subscription credit limit modification successfully done None
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription with the specified id was not found ErrorMessage
409 Conflict Modification not allowed because of inconsistency with the total credit limit value. This value must be greater or equal than the maximum of the other credit limits ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

400 - instance of ErrorMessage

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "XXX_21201",
      "title": "TITLE_OF_THE_DOMAIN_ERROR",
      "ref": "https://developers.masstack.com/en/docs/apis_domain_doc_swagger/2/apioverview/#erro",
      "details": "string"
    }
  ]
}
Name Type Required Description
errors [ErrorMessageItem] true none

Parameters

Name In Type Required Description
org_id path string true Organization name

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/masmovil/credit_limits \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK. DefaultCreditLimit
404 Not Found An org with the specified criteria was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

Endpoints

AccountBundles

    Apple Watch

      Credit Limits

        Devices

          Fraud Requests

            FreeUnitsPackages

              Promotions

                Segments

                  Subscription Commercial Products

                    Subscriptions

                      Contracts