Subscriptions API

Access to fraud requests


Parameters

NameDescription

org_id*required

string

(path)

Organization name

sale_id

string

(query)

SaleId filter

subscription_id

string

(query)

SubscriptionId filter

customer_id

string

(query)

CustomerId filter

account_id

string

(query)

AccountId filter

risk_decision

string

(query)

RiskDecision status filter

date_range

string

(query)

Date range filter. Must match pattern dd/MM/yyyy,dd/MM/yyyy

Enumerated Values

Property Values
risk_decision one of [A, X, D, R]

Request example

content_copy
1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/yoigo/fraud_requests?sale_id='-345652'&subscription_id='12345'&customer_id='12345'&account_id='12345'&risk_decision='A'&date_range='24/06/2019,25/07/2019' \
  -H "Accept: application/json"

Responses

Code Description Schema
200 OK [GetFraudRequest]
404 A fraud request with the specified criteria was not found ErrorMessage
500 Unexpected error ErrorMessage

200 - instance of GetFraudRequest

Custom schema example

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
[
  {
    "id": 1233094,
    "sell_id": 76,
    "risk_decision": "A",
    "subscriptions": [
      {
        "subscription_id": 3821002,
        "subscription_type": "MOBILE"
      }
    ]
  }
]
Name Type Required Description
anonymous FraudRequest false none
Name Type Required Description
anonymous object false none

Parameters

NameDescription

org_id*required

string

(path)

Organization name

id*required

string

(path)

fraud request unique identifier

body*required

PatchFraudRequest

(body)

‘none’

Request body - instance of PatchFraudRequest

content_copy
1
2
3
4
5
6
7
8
9
{
  "risk_decision": "A",
  "risk_level": 3,
  "risk_codes": "IH:c(4)s(0)r()v(779)",
  "fraud_request_value": 165089515739815,
  "status_change_user": "test@test.com",
  "status_change_reason": "customer request",
  "requested_status_change_date": "2017-09-15T22:00:00Z"
}
Name Type Required Description
risk_decision string true fraud request risk decision
  • X -> Doc required
  • A -> OK
  • D -> Cancelled
risk_level integer(int32) true Value from 0 to 10
risk_codes string false risk codes
fraud_request_value integer(int64) false unique response id
status_change_user string false user name of the user performing the subscription status change (Mysim user login)
status_change_reason string false subscription status change reason
requested_status_change_date string(date-time) false date when the status change must be effective
Property Values
risk_decision one of [A, X, D]

Request example

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

curl -X PATCH https://subscriptions.masstack.com/v1/orgs/yoigo/fraud_requests/5652763 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'risk_decision': 'A',
  'risk_level': 3,
  'risk_codes': 'IH:c(4)s(0)r()v(779)',
  'fraud_request_value': 165089515739815,
  'status_change_user': 'test@test.com',
  'status_change_reason': 'customer request',
  'requested_status_change_date': '2017-09-15T22:00:00Z'
}" 

Responses

Code Description Schema
202 fraud request modification successfully received None
400 Invalid body ErrorMessage
404 A fraud request with the specified id was not found ErrorMessage
409 The request could not be completed due to a conflict with the current state of the resource ErrorMessage
500 Unexpected error ErrorMessage

400 - instance of ErrorMessage

Custom schema example

content_copy
 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

Endpoints

AccountBundles

Apple Watch

Credit Limits

Devices

Fraud Requests

FreeUnitsPackages

Promotions

Segments

Subscription Commercial Products

Subscriptions

Contracts