Notifications Create API

Route

POST

Purpose


Parameters


view string 100
Possible values
  • default-view
  • default-with-proof
  • internal-applications-view

key string 100
key identifier. Typically in slug form.
token string 100 required
Authentication token for either an application or session.
status string 200
status of the notification.
email_from string 300
Indicates who the email notification is from.
email_subject string 400
Indicates the subject of an email notification.
email_technician string 500

user_id string 600
User ID of associated usere record.
olio_id string 700
order ID
tour_id string 800

client_id string 900

email_to string 1000
Indicates who the email notification is directed to.
email_cc string 1100

email_bcc string 1200

email_body string 1300
Indicates the body of an email notification.
notifyable_type string 1400
Polymorphic Model association by model name
notifyable_id integer 1500
Polymorphic Model association by model ID
updated_at_fm datetime 1600
When the notification was updated in internal apps.
updated_in string 1700
Indicates the app location where notification was last updated.
created_at_fm datetime 1800
When the notification was created in internal apps.
processed integer 1900
Indicates if the notification was processed or not.
processed_at datetime 2000
Indicates when a notification was processed.
processed_at_fm datetime 2100
Indicates when a notification was processed in internal apps.
notification_type string 2200

phone_from string 2300

phone_to string 2400

media_url string 2400

extension string 2500

Request Body Example: application/json

Responses

action-successful 200

This status indicates that the request was successful. If the request returns data, it can be found in the data key.

invalid-token 401

This status is returned when the authentication token passed is invalid.

session-expired 401

This status is returned a session is older than seven days or hasn't been used in 72 hours. The user will need to reauthenticate. We allow our users to save a remember_me preference which will make there sessions last indefinitely.

client-required 401

This status is returned when the user makeing the request doesn't have a client, employee or liaison record. This means that they don't have any roles or permissions. Because we only allow our clients to register as a client, the user should be redirected to the PlanoAuth clients registration page where they can use the `/api/v1/users/client_register` API to register as a client. Eventhough the request will not be successful, this status will still return a `session` object because a session token is needed to register as a user.

missing-param 400

This status is returned when a required param was not passed with the request.

invalid-param 400

This status is returned when a param was invalid when passed. For example, passing an id that doesn't exist or passing an invalid email address.

application-crash 500

This status is returned when there is an internal server error. Please try again later.

mandrill-email-failed 500

This status is returned when there was an issue using Mandrill to send an email. Any time this response is returned, there will be a notification in the production notifications tab so the dev team will be away of the failure. These errors will most likely correlate with a data issue and will need to be invesigated.

invalid-content-type 400

This status is returned if the request was made with the incorrect content-type so the request params could not be read. For more infromation on content-type, please refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type.

route-non-existent 500

Response returned when HTTP route does not exist.

Uncommon Responses

The responses below are not very common.

no-params-decoded Uncommon

This status is returned the request body was decoded, but no params where found.

invalid-encoded-params Uncommon

This status is returned when the request body could not be decoded properly. This generally means that you are requesting a sensative_params API and your request body was not base64 encoded.

route-not-found Uncommon

This status is returned when the route record being requested hasn't been deployed yet.

identify-request-error Uncommon

This status is returned when there is an internal server error before the route could be identified. Please try again later.

service-not-found Uncommon

This status is returned when the route's API service record being requested hasn't been deployed yet.