Get Opt-in and Opt-out State Events
get
/apis/notification-contact-v1/v2/{utilityCode}/sendable-state-events
Returns all opt-in and opt-out state events for a provided time interval.
Request
Path Parameters
-
utilityCode(required): string
The 3 or 4 character code for the utility company; for example util.
Query Parameters
-
channels(required): array[string]
Collection Format:
multiThe channels to search for events, which must include a minimum of one channel. Allowed values: `SMS`, `IVR`.-
Allowed Values:
[ "SMS", "IVR" ]
-
-
fromDate(required): string(date)
The timestamp that defines the lower bound inclusive of events to include. For example, `2020-01-01T00:00:00Z`.
-
sendableStates(required): array[string]
Collection Format:
multiThe opt-in and opt-out state events to include in the results, which must include a minimum of one type of event.-
Allowed Values:
[ "SENDABLE", "NOT_SENDABLE", "NOT_SENDABLE_NO_OPT_IN_CONFIRMATION", "NOT_SENDABLE_SPAM_COMPLAINT", "NOT_SENDABLE_SUPPRESSED", "NOT_SENDABLE_UNDELIVERABLE", "NOT_SENDABLE_UNSUBSCRIBED" ]
-
-
toDate(required): string(date)
The timestamp that defines the upper bound inclusive of events to include. For example, `2020-01-01T00:00:00Z`.
Header Parameters
-
Authorization(required): string
The authorization header. For example, `Authorization: Bearer $YOUR_TOKEN`.
Response
Supported Media Types
- application/json
200 Response
Action completed successfully
Nested Schema : EntitySendableState
Type:
Show Source
object-
address:
string
The phone number related to the opt-in or opt-out event change.
-
addressId:
string(uuid)
The ID value for an address, which represents a phone number for the events.
-
clientCode:
string
The 3 or 4 character code for the utility company. For example, util.
-
createdOn:
string(date)
The date that Oracle Utilities Opower processed the opt-in or opt-out state change.
-
sendableState:
string
Allowed Values:
[ "SENDABLE", "NOT_SENDABLE", "NOT_SENDABLE_NO_OPT_IN_CONFIRMATION", "NOT_SENDABLE_SPAM_COMPLAINT", "NOT_SENDABLE_SUPPRESSED", "NOT_SENDABLE_UNDELIVERABLE", "NOT_SENDABLE_UNSUBSCRIBED" ]The opt-in and opt-out state events to include in the results, which must include a minimum of one type of event. -
shortCode:
string
The 4 or 5 digit code that is displayed to the customer when they receive an SMS message from the vendor.
-
source:
string
The source system responsible for sending the event.
-
stateChangedOn:
string(date)
The timestamp when the customer initiated opt-in or opt-out event actually occurred.
400 Response
An error occurred processing the request. See the response body for more information.
Root Schema : ErrorResponse
Type:
Show Source
object-
details:
string
Details about the error.
-
errorMessage:
string
Short failure explanation.
-
httpStatus:
integer
Minimum Value:
100Maximum Value:600The HTTP status code for the error. -
serviceErrorCode:
string
An error code for the error.
401 Response
An error occurred processing the request. See the response body for more information.
Root Schema : ErrorResponse
Type:
Show Source
object-
details:
string
Details about the error.
-
errorMessage:
string
Short failure explanation.
-
httpStatus:
integer
Minimum Value:
100Maximum Value:600The HTTP status code for the error. -
serviceErrorCode:
string
An error code for the error.
405 Response
An error occurred processing the request. See the response body for more information.
Root Schema : ErrorResponse
Type:
Show Source
object-
details:
string
Details about the error.
-
errorMessage:
string
Short failure explanation.
-
httpStatus:
integer
Minimum Value:
100Maximum Value:600The HTTP status code for the error. -
serviceErrorCode:
string
An error code for the error.