Akshat Notification Center

Only for internal review purpose not to be shared
Operations
Customer Level Opt In
GET /customer-preferences/customer/{customer_id}
POST /customer-preferences/customer/{customer_id}
PUT /customer-preferences/customer/{customer_id}
Get Customer
GET /customer-preferences/customer/{customer_id}

Authentication

basicAuth

Retrieve existing customer preferences using a customer ID for a customer. This method must be used prior to updating a customer preference. The modified_datetime value from the GET response must be provided in the PUT request.

Path variables

customer_id
string required

pass the customer id

Responses

200 200

Returns customer preferences

Body
application/json
Object
status
string
Example:
OK
messages
Array
string
Example:
success
customer_preferences
Object
first_name
string

Customer first name

Example:
Vlad
last_name
string

Customer last name

Example:
Smith
locale
string

The customer locale; default is en_US

Example:
en_US
notification_pref_details
Array

Notification preferences for the user

Object
channel
string

The opt in channel

Example:
sms/whatsapp
contact
string

The contact information for sms channel

Example:
+917777777777
contact_detail_list
Array

List of contacts for whatsapp channel

Example:
[{"contact":"+917777777777"}, {"contact":"+918888888888"}]
Object
contact
string

The contact information for whatsapp channel

Example:
{"contact":"+918888888888"}
modified_datetime
string

The last time the record has been modified

Example:
2018-04-10T17:33:36.742Z
Post Customer
POST /customer-preferences/customer/{customer_id}

Authentication

basicAuth

Create a new customer and notification preference record for a customer. A customer notification preference is considered as an opt-in for notifications in the prefered channel for all new orders.

Path variables

customer_id
string required

The unique identifier that represents the customer

Request body

application/json

The customer’s notification preferences

Object
customer_preferences
Object

The notifiation preferences for the customer

traffic_source
string required

Location where the user updated opt in preferences

Enumeration:
MY_ACCOUNT_PAGE
ORDER_CONFIRMATION_PAGE
first_name
string required

Customer first name

Example:
John
last_name
string required

Customer last name

Example:
Doe
notification_pref_details
Array required

Notification preferences for the user

Object
channel
string required

The opt in channel

Example:
sms/whatsapp
contact
string

Mandatory only if channel is sms

Example:
phone number
contact_detail_list
Array

Mandatory only if channel is whatsapp

Object
contact
string

The contact information for the channel

Example:
phone number
string
locale
string

The customer locale; default is en_US

Example:
en_US

Responses

201 201

ITEM CREATED

Put Customer
PUT /customer-preferences/customer/{customer_id}

Authentication

basicAuth

Update an existing customer record to add or modify notification preferences for a customer. Modifications include changing preference details or opting out of notifications. In order to conform to REST, full resource representation is expected. For example, if an optional field (phone number) is blank in the request, the API will delete the existing phone number from the customer preferences.

Path variables

customer_id
string required

The unique identifier that represents the customer

Request body

application/json

The customer’s notification preferences

Object
customer_preferences
Object

The notifiation preferences for the customer

traffic_source
string required

Location where the user updated opt in preferences

Enumeration:
MY_ACCOUNT_PAGE
ORDER_CONFIRMATION_PAGE
first_name
string required

Customer first name

Example:
John
last_name
string required

Customer last name

Example:
Doe
notification_pref_details
Array required

Notification preferences for the user

Object
channel
string required

The opt in channel

Example:
sms/whatsapp
contact
string

Mandatory only if channel is sms

Example:
phone number
contact_detail_list
Array

Mandatory only if channel is whatsapp

Object
contact
string

The contact information for the channel

Example:
phone number
locale
string

The customer locale; default is en_US

Example:
en_US
modified_datetime
string required

The most recent time when the user updated their preferences

Example:
2017-12-21T23:34:06.114905

Responses

201 201

ITEM CREATED

Order Level Opt In
GET /order-preferences/customer/{customer_id}
POST /order-preferences/customer/{customer_id}/order/{order_id}
PUT /order-preferences/customer/{customer_id}/order/{order_id}
Get Order
GET /order-preferences/customer/{customer_id}

Authentication

basicAuth

Retrieve order preferences for a given customer ID for a guest customer.

Path variables

customer_id
string required

pass the customer id

Request parameters

order_id
string optional

Pass in an order id to return results for one order

is_include_inactive
boolean optional

Default false, all orders will be returned, set to true if inactive orders should be returned

Responses

200 200

Returns customer preferences

Body
application/json
Object
status
string
Example:
OK
messages
Array of unknown
order_preferences
Array
Object
order_id
string

Order to which the user has subscribed

Example:
1
first_name
string

Customer first name

Example:
Nanda
last_name
string

Customer last name

Example:
Kumar
locale
string

The customer locale; default is en_US

Example:
en_US
is_guest
string
Example:
false
is_active
string

Informs whether the order is active or not

Example:
true
notification_pref_details
Array

Notification preferences for the user

Object
channel
string

The opt in channel

Example:
sms/whatsapp
contact
string

The contact information for sms channel

Example:
+917777777777
contact_detail_list
Array

List of contacts for whatsapp channel

Example:
[{"contact":"+917777777777"}, {"contact":"+918888888888"}]
Object
contact
string

The contact information for whatsapp channel

Example:
{"contact":"+918888888888"}
modified_datetime
string

The last time the record was modified

Example:
2018-04-10T22:02:41.349Z
Post Order
POST /order-preferences/customer/{customer_id}/order/{order_id}

Authentication

basicAuth

Create a new order-level preference for a guest customer opt-in. The guest customer will receive notifications for the specific order.

Path variables

customer_id
string required

The unique identifier that represents the customer

order_id
string required

Order number

Request body

application/json

The customer’s notification preferences for the order

Object
order_preferences
Object
traffic_source
string required

Location where the user updated opt in preferences

Enumeration:
MY_ACCOUNT_PAGE
ORDER_CONFIRMATION_PAGE
order_number
string required

Order number for the opt in

Example:
123435
first_name
string required

Customer first name

Example:
John
last_name
string required

Customer last name

Example:
Doe
notification_pref_details
Array required

Notification preferences for the user

Object
channel
string required

The opt in channel

Example:
sms/whatsapp
contact
string required

Mandatory only if channel is sms

Example:
phone number
contact_detail_list
Array

Mandatory only if channel is whatsapp

Object
contact
string

The contact information for the channel

Example:
phone number
locale
string

The customer locale; default is en_US

Example:
en_US
is_guest
boolean required

Determines whether the use is a guest. Set this to true whenever an opt in is captured on the my account page or the order confirmation page

Example:
true

Responses

201 201

ITEM CREATED

application/json
Put Order
PUT /order-preferences/customer/{customer_id}/order/{order_id}

Authentication

basicAuth

Update an existing customer order-level record to add or modify notification preferences for a customer. Modifications include changing preference details or opting out of notifications. In order to conform to REST, full resource representation is expected. For example, if an optional field (phone number) is blank in the request, the API will delete the existing phone number from the customer preferences.

Path variables

customer_id
string required

The unique identifier that represents the customer

order_id
string required

Order number

Request body

application/json

The customer’s notification preferences

Object
customer_preferences
Object
traffic_source
string required

Location where the user updated opt in preferences

Enumeration:
ORDER_CONFIRMATION_PAGE
MY_ACCOUNT_PAGE
order_number
string required
Example:
123435
first_name
string required
Example:
John
last_name
string required

Customer last name

Example:
Doe
notification_pref_details
Array required

Notification preferences for the user

Object
channel
string required

The opt in channel

Example:
sms/whatsapp
contact
string required

Mandatory only if channel is sms

Example:
phone number
contact_detail_list
Array

Mandatory only if channel is whatsapp

Object
contact
string

The contact information for the channel

Example:
phone number
locale
string

The customer locale; default is en_US

Example:
en_US
is_guest
boolean

Determines whether the use is a guest. Set this to true whenever an opt in is captured on the my account page or the order confirmation page

Example:
true
modified_datetime
string required

The most recent time when the user updated their preferences

Example:
2017-12-21T23:34:06.114905

Responses

201 201

ITEM CREATED

application/json