- 15.5
Description
The Service endpoint provides the API consumer with access to methods pertaining to customer services and related data objects. The methods allow consumers to pull data and add, update, and delete services.
Methods
- Specification
- GetService
- GetServiceBySourceID
- GetServiceByCustomerServiceNumber
- GetServicesByCustomer
- GetServicesByTicket
- GetStructures
- AddServiceToCustomer
- AddCustomerWithServices
- UpdateCustomerService
- RemoveServiceFromCustomer
- ReactivateService
- LinkStructures
- UnlinkStructures
- GetServicesByStructure
| URL | base/Billing/Service/Specification |
|---|---|
| Action | GET |
| Description | Returns a data dictionary that details the available web service methods related to the Service controller. |
| Parameters | None |
| Returns | A JSON object with method descriptions |
| Sample Return Object | |
[
{
"HttpAction": "Get",
"MethodName": "GetService",
"Description": "Returns the record for a single customer service given the passed in ID value (see Path).",
"Path": "/Service/GetService/25032"
},
{
"HttpAction": "Post",
"MethodName": "GetServiceBySourceID",
"Description": "Returns the record for a single Customer Service given the SourceID and SourceTable. Both are required fields.",
"Format": {
"SourceID": 2147,
"SourceTable": "ClientTable"
}
}
]
|
|
| URL | base/Billing/Service/GetService/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a Service object when given an ID of a valid customer service in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a customer service in the M4 database. |
| Returns | A JSON Service data object | ||
| Sample Return Object | |||
{
"ID": 974,
"CustomerServiceNumber": "11A45132-C0A7-4489-B3F9-3CD09D3ACE53",
"ServiceCode": "Fiber",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Mapping Data",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
|
|||
| URL | base/Billing/Service/GetServiceBySourceID | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns a Service object of a valid customer service in the M4 database with Source ID and Source Table values. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| SourceID | Yes | Integer | The Source ID from the Source table. |
| SourceTable | Yes | String | The Source Table referenced by the Source ID. |
| Sample JSON Package | |||
{
"SourceID": 4758,
"SourceTable": "Mapping Data"
}
|
|||
| Returns | A JSON Service data object. | ||
| Sample Return Object | |||
{
"ID": 974,
"CustomerServiceNumber": "11A45132-C0A7-4489-B3F9-3CD09D3ACE53",
"ServiceCode": "Fiber",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "8041234567",
"SourceTable": "Mapping Data",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
|
|||
| Business Rules | |||
|
|||
| URL | base/Billing/Service/GetServiceByCustomerServiceNumber | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns a Service object of a valid customer service in the M4 database with CustomerServiceNumber value. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CustomerServiceNumber | Yes | String | The CustomerServiceNumber. |
| Sample JSON Package | |||
{
"CustomerServiceNumber": "11A45132-C0A7-4489-B3F9-3CD09D3ACE53"
}
|
|||
| Returns | A JSON Service data object. | ||
| Sample Return Object | |||
{
"ID": 974,
"CustomerServiceNumber": "11A45132-C0A7-4489-B3F9-3CD09D3ACE53",
"ServiceCode": "Fiber",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "8041234567",
"SourceTable": "Mapping Data",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
|
|||
| URL | base/Billing/Service/GetServicesByCustomer/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Service objects when given an ID of a valid customer in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a customer in the M4 database. |
| Returns | JSON Service data objects | ||
| Sample Return Object | |||
[
{
"ID": 974,
"CustomerServiceNumber": "11A45132-C0A7-4489-B3F9-3CD09D3ACE53",
"ServiceCode": "Fiber",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "8041234567",
"SourceTable": "Mapping Data",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
},
{
"ID": 975,
"CustomerServiceNumber": "4FAB5682-F5AE-4E19-961B-F6A1901AC858",
"ServiceCode": "DSL",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Map",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
]
|
|||
| URL | base/Billing/Service/GetServicesByTicket/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Service objects when given an ID of a valid ticket in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a ticket in the M4 database. |
| Returns | A JSON collection of Customer Service data objects | ||
| Sample Return Object | |||
[
{
"ID": 974,
"CustomerServiceNumber": "11A45132-C0A7-4489-B3F9-3CD09D3ACE53",
"ServiceCode": "Fiber",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "8041234567",
"SourceTable": "Mapping Data",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
},
{
"ID": 975,
"CustomerServiceNumber": "4FAB5682-F5AE-4E19-961B-F6A1901AC858",
"ServiceCode": "DSL",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Map",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
]
|
|||
| URL | base/Billing/Service/GetStructures/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns a list of Structure objects when given an ID of a valid customer service in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a customer in the M4 database. |
| Returns | JSON Structure data objects | ||
| Sample Return Object | |||
[
{
"ID": 263226,
"ParentID": null,
"FullAddress": "CEDAR SPRINGS RD",
"HouseNumber": "",
"PreDirectional": "",
"Street": "CEDAR SPRINGS RD",
"StreetSuffix": "",
"PostDirectional": "",
"UnitNumber": "",
"City": "",
"State": "VA",
"Zip_Code": "",
"County": "Chesterfield",
"Latitude": null,
"Longitude": null,
"CensusBlock": null,
"CensusTract": null,
"Exchange": "",
"StructureType": "",
"Comments": "",
"COID": null,
"LoopLength": null,
"Mapped": null,
"LastUpdateUser": "",
"LastUpdateDate": null
},
{
"ID": 265328,
"ParentID": null,
"FullAddress": "",
"HouseNumber": "",
"PreDirectional": "",
"Street": "PENNWAY DR",
"StreetSuffix": "",
"PostDirectional": "",
"UnitNumber": "",
"City": "",
"State": "VA",
"Zip_Code": "",
"County": "Chesterfield",
"Latitude": null,
"Longitude": null,
"CensusBlock": null,
"CensusTract": null,
"Exchange": "",
"StructureType": "",
"Comments": "",
"COID": null,
"LoopLength": null,
"Mapped": null,
"LastUpdateUser": "",
"LastUpdateDate": null
}
]
|
|||
| URL | base/Billing/Service/AddServiceToCustomer | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the Service object just added to the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| CustomerID | Yes | Integer | The ID of a customer in the M4 database. |
| ConnectDate | Yes | DateTime | |
| CustomerServiceNumber | No | String | The unique number tied to the customer service. |
| ServiceCode | No | String | The code that describes the service. |
| Description | No | String | |
| StatusID | No | String | |
| PhoneNumber | No | String | A JSON object that includes the full phone number of a customer |
| SourceTable | No | String | The Source Table referenced by the Source ID. |
| SourceID | No | Integer | The Source ID from the Source table. |
| StructureIDList | No | List of Integer | A list of the IDs of the Structures related to the Service in the M4 database. |
| Sample JSON Package | |||
{
"CustomerID": 353675,
"ConnectDate": "2016-02-06T09:14:55.3731298-05:00",
"ServiceCode": "Internet",
"Description": "Service description, special notes and/or comments",
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Maps",
"SourceID": 4758,
"StructureIDList": [
265328, 263226
]
}
|
|||
| Returns | A JSON Customer Service data object | ||
| Sample Return Object | |||
{
"ID": 976,
"CustomerServiceNumber": "FF27FE68-9809-4B7C-BF37-116ABFAAB7F8",
"ServiceCode": "Internet",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Maps",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Billing/Service/AddCustomerWithServices | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the Customer object just added to the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| UserID | No | Integer | The ID of a user in the M4 database. |
| CustomerNumber | No | Integer | The number of the Customer in the M4 database. |
| FirstName | No | String | The first name of the customer |
| LastName | No | String | The last name of the customer |
| MiddleName | No | String | The middle name of the customer |
| Phone | No | String | The contact phone number of the customer in the M4 database. |
| No | String | The email address of the customer | |
| MailingAddress | No | String | The full mailing address of the customer |
| MailingCity | No | String | The mailing city |
| MailingState | No | String | The mailing state code |
| MailingCountry | No | String | The mailing address country |
| MailingPostalCode | No | String | The mailing zip code |
| MailingStreet | No | String | The mailing name of the street |
| BillingAddress | No | String | The full billing address of the customer |
| BillingCity | No | String | The billing city |
| BillingState | No | String | The billing state code |
| BillingCountry | No | String | The billing address country |
| BillingPostalCode | No | String | The billing zip code |
| BillingStreet | No | String | The billing name of the street |
| Description | No | String | |
| CustomerType | Yes | String | Must be either (B) Business or (R) Residential |
| SourceID | Yes | Integer | The Source ID from the Source table. |
| SourceTable | Yes | String | The Source Table referenced by the Source ID. |
| Services | No | List of Services | A list of Service objects related to the Customer in the M4 database. |
| StructureIDList | No | List of Integer | A list of the IDs of the Structures related to the Customer in the M4 database. |
| Sample JSON Package | |||
{
"Customer": {
"UserID": null,
"CustomerNumber": "SK457101",
"FirstName": "John",
"LastName": "Jackson",
"MiddleName": "Matlock",
"Phone": "804-123-5555",
"Email": "john.jackson@sampledomain.com",
"MailingAddress": "123 Joandy Drive, Sample City, VA 23230",
"MailingCity": "Sample City",
"MailingState": "VA",
"MailingCountry": "United States",
"MailingPostalCode": "23230",
"MailingStreet": "123 Joandy Drive",
"BillingAddress": "123 Joandy Drive, Sample City, VA 23230",
"BillingCity": "Sample City",
"BillingCountry": "United States",
"BillingPostalCode": "23230",
"BillingState": "VA",
"BillingStreet": "123 Joandy Drive",
"Description": "Sample comments or description",
"CustomerType": "B",
"SourceTable": "Field Data",
"SourceID": 4759
},
"Services":[
{
"ConnectDate": "2015-02-06T09:14:55.3731298-05:00",
"ServiceCode": "Internet",
"Description": "Service description, special notes and/or comments",
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Maps",
"SourceID": 4759,
"StructureIDList": [
342720, 260820
]
},
{
"ConnectDate": "2014-02-06T09:14:55.3731298-05:00",
"ServiceCode": "Phone",
"Description": "Service description, special notes and/or comments",
"StatusID": 1,
"PhoneNumber": "804-123-5555",
"SourceTable": "Maps",
"SourceID": 4760,
"StructureIDList": [
342720, 260820
]
}
],
"StructureIDList": [
342720,
260820
]
}
|
|||
| Returns | A JSON Customer data object | ||
| Sample Return Object | |||
{
"ID": 353676,
"UserID": null,
"CustomerNumber": "SK457101",
"FirstName": "John",
"LastName": "Jackson",
"MiddleName": "Matlock",
"Phone": "8041235555",
"Email": "john.jackson@sampledomain.com",
"MailingAddress": "123 Joandy Drive, Sample City, VA 23230",
"MailingCity": "Sample City",
"MailingState": "VA",
"MailingCountry": "United States",
"MailingPostalCode": "23230",
"MailingStreet": "VA",
"BillingAddress": "123 Joandy Drive, Sample City, VA 23230",
"BillingCity": "Sample City",
"BillingCountry": "United States",
"BillingPostalCode": "23230",
"BillingState": "VA",
"BillingStreet": "123 Joandy Drive",
"Description": "Sample comments or description",
"CustomerType": "B",
"SourceTable": "Field Data",
"SourceID": 4759,
"IsDeleted": false,
"CreateDate": "2017-02-06T13:43:02.63",
"LastUpdatedDate": null
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Billing/Service/UpdateCustomerService | ||
|---|---|---|---|
| Action | POST | ||
| Description | Returns the Service object updated in the M4 database. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of a customer service in the M4 database. |
| CustomerServiceNumber | No | String | The unique number tied to the customer service. |
| ServiceCode | No | String | The code that describes the service. |
| Description | No | String | |
| StatusID | No | String | |
| PhoneNumber | No | String | A JSON object that includes the full phone number of a customer |
| SourceTable | No | String | The Source Table referenced by the Source ID. |
| SourceID | No | Integer | The Source ID from the Source table. |
| Sample JSON Package | |||
{
"ID": 975,
"CustomerServiceNumber": "4FAB5682-F5AE-4E19-961B-F6A1901AC858",
"ServiceCode": "DSL",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Map",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"StructureIDList": [26820, 263226]
}
|
|||
| Returns | A JSON Customer Service data object | ||
| Sample Return Object | |||
{
"ID": 975,
"CustomerServiceNumber": "4FAB5682-F5AE-4E19-961B-F6A1901AC858",
"ServiceCode": "DSL",
"Description": "Service description, special notes and/or comments",
"CustomerID": 353675,
"StatusID": 1,
"PhoneNumber": "",
"SourceTable": "Map",
"SourceID": 4758,
"ConnectDate": "2016-02-06T09:14:55.373",
"DisconnectDate": null,
"IsDeleted": false
}
|
|||
| Business Rules | |||
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
|
|||
| URL | base/Billing/Service/RemoveServiceFromCustomer | ||
|---|---|---|---|
| Action | POST | ||
| Description | Disconnects a Service from a Customer and sets the Service to the Inactive status. All Features connected to the Service will also be given a disconnected date. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of a valid customer service |
| DisconnectDate | Yes | DateTime | The date the customer service was disconnected |
| Sample JSON Package | |||
{
"ID": 976,
"DisconnectDate": "2016-11-22T10:15:31.4059204-05:00"
}
|
|||
| Returns | A JSON object with a message either the confirming the deletion or notifying the user of an invalid ID. | ||
| Sample Return Object | |||
"The service with ID [976] and all associated features have been disconnected successfully." |
|||
| Business Rules | |||
|
|||
| URL | base/Billing/Service/ReactivateService | ||
|---|---|---|---|
| Action | POST | ||
| Description | Reactivates (reconnects) a service that has been disconnected. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of a Service in the M4 database. |
| ConnectDate | No | DateTime | The ConnectDate of a Service Feature in the M4 database. |
| Sample JSON Package | |||
{
"ID": 15359,
"ConnectDate": "2018-03-23T09:12:31.4059204-05:00"
}
|
|||
| Returns | A JSON message data object | ||
| Sample Return Object | |||
{
"Message": "The service with ID [15359] was reactivated successfully."
}
|
|||
| Business Rules | |||
|
Any violations of these business rules result in an appropriate error message being returned to the API consumer. ID:
Duplicate Fields:
|
|||
| URL | base/Billing/Service/LinkStructures | ||
|---|---|---|---|
| Action | POST | ||
| Description | Link Structures to Customer Service using customer Service ID. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of a Customer Service in the M4 database. |
| StructureIDList | No | List of Integer | A list of the IDs of the Structures related to the Customer Service in the M4 database. |
| Sample JSON Package | |||
{
"ID": 15359,
"StructureIDList": [
342720,
260820
]
}
|
|||
| Returns | A JSON list of the Structures just linked | ||
| Sample Return Object | |||
{
"ID": 15359,
"StructureIDList": [
342720,
260820
]
}
|
|||
| Business Rules | |||
|
Any violations of these business rules result in an appropriate error message being returned to the API consumer. ID:
StructureIDList:
|
|||
| URL | base/Billing/Service/UnlinkStructures | ||
|---|---|---|---|
| Action | POST | ||
| Description | Unlink Structures to Customer Service using customer Service ID. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | The ID of a Customer Service in the M4 database. |
| StructureIDList | No | List of Integer | A list of the IDs of the Structures related to the Customer Service in the M4 database. |
| Sample JSON Package | |||
{
"ID": 15359,
"StructureIDList": [
342720,
260820
]
}
|
|||
| Returns | A JSON list of the Structures just un-linked | ||
| Sample Return Object | |||
{
"ID": 15359,
"StructureIDList": [
342720,
260820
]
}
|
|||
| Business Rules | |||
|
Any violations of these business rules result in an appropriate error message being returned to the API consumer. ID:
StructureIDList:
|
|||
| URL | base/Billing/Service/GetServicesByStructure/ID | ||
|---|---|---|---|
| Action | GET | ||
| Description | Returns all Service objects as an array that are linked to a given Structure ID. | ||
| Parameters | |||
| Name | Required? | Type | Description |
| ID | Yes | Integer | An integer value representing the ID of a structure in the M4 database. |
| Returns | A JSON Service data object | ||
| Sample Return Object | |||
|
[
{
"ID": 693058,
"CustomerServiceNumber": "786639",
"ServiceCode": "ZPS",
"Description": "WAGNITZ MARIE",
"CustomerID": 793958,
"StatusID": null,
"PhoneNumber": "",
"SourceTable": "",
"SourceID": null,
"ConnectDate": null,
"DisconnectDate": null,
"IsDeleted": false
},
{
"ID": 693059,
"CustomerServiceNumber": "787524",
"ServiceCode": "VCR",
"Description": "WAGNITZ MARIE",
"CustomerID": 793958,
"StatusID": null,
"PhoneNumber": "",
"SourceTable": "",
"SourceID": null,
"ConnectDate": null,
"DisconnectDate": null,
"IsDeleted": false
},
{
"ID": 693060,
"CustomerServiceNumber": "787525",
"ServiceCode": "CAB",
"Description": "WAGNITZ MARIE",
"CustomerID": 793958,
"StatusID": null,
"PhoneNumber": "",
"SourceTable": "",
"SourceID": null,
"ConnectDate": null,
"DisconnectDate": null,
"IsDeleted": false
},
{
"ID": 693061,
"CustomerServiceNumber": "787526",
"ServiceCode": "NET",
"Description": "WAGNITZ MARIE",
"CustomerID": 793958,
"StatusID": null,
"PhoneNumber": "",
"SourceTable": "",
"SourceID": null,
"ConnectDate": null,
"DisconnectDate": null,
"IsDeleted": false
}
]
|
|||