-
Notifications
You must be signed in to change notification settings - Fork 1
OCP Customer Services
The OCP Customer is the basic information for end customers of OptConnect services.
This service provides data on customer records in the OCP application. Customer records have an nsid which is the billing system id utilized to sync with the billing system. The CustomerProfile record offers more detail for the customer over the id and name. The CustomerProfile record contains the enrollment_level of the customer which is a permissions field that may or may not determine actions that can be taken on behalf of the customer.
Access to Customer data requires permissions set to view/modify the Customer record.
This returns the enrollment level constant values. Each CustomerProfile has one of these values. OCP uses the enrollment level to determine if data is accessible or an action is enabled in OCP. For example, the action "Reset Wireless" is a premium feature and is allowed only by customers with access level "Premium".
GET /v1/ocp/customers/enrollment_levels HTTP/1.1
Authorization: bearer my_token
Accept: */*
On 200
{
"levels" : [ "None", "Base", "Premium" ]
}
This service returns the customer ids that are permitted to be viewed or utilized in the API services by the Consumer for an Application. A one to many relationship exists for an Application (App) to many customers allowed to access. Services that specify a customer id compare the provided customer id to this list in order for Authorization to occur. For example, if customers 1,2,3 are allowed and customer 4 is specified for a GET call, a 401 Not Authorized will result.
GET /v1/ocp/customers/ids HTTP/1.1
Authorization: bearer my_token
Accept: */*
On 200
{
"appId" : 88,
"ocpCustomerIds" : [ 1649 ]
}
This service will provide the Customer record for the id provided. The calling Consumer's App must be permitted to access the customer id.
GET /v1/ocp/customers/1649 HTTP/1.1
Authorization: bearer my_token
Accept: */*
On 200
{
"id" : 1649,
"nsid" : 33333333,
"name" : "Acme ATM"
}
This service will provide the Customer enrollment level for the customer id provided. The calling Consumer's App must be permitted to access the customer id.
GET /v1/ocp/customers/1649/enrollment_level HTTP/1.1
Authorization: bearer my_token
Accept: */*
On 501
{
"message" : "Not Yet Implemented.",
"documentationUrl" : "https://github.com/grantvictor/Partner-API-V1-Documentation/wiki"
}
This service will provide the Customer record for the id provided. The calling Consumer's App must be permitted to access the customer id.
GET /v1/ocp/customers/1649/customer_profile HTTP/1.1
Authorization: bearer my_token
Accept: */*
On 200
{
"id" : 1649,
"customer" : {
"id" : 1649,
"nsid" : 33333333,
"name" : "Acme ATM"
},
"canviewip" : false,
"canaccessip" : false,
"isrms" : false,
"email" : "doug.do@acmeatm.zzz",
"ocpenrollmentlast" : "Premium",
"ocpservices" : [ "" ],
"deviceSubsetStartTime" : 0
}