Follow

Send Direct Push Message

Send Direct Push Message

This API send a direct push message to consumer

Attributes 

Attribute
Value
Path /v3/consumers/{consumerIdentity}/directpushmessage
Support Formats JSON, XML
HTTP Method POST
Authorisation Private Application Key
Secure Yes
Rate Limited No
Cache Timeout TBC
HTTP Codes
  • 200 - OK
  • 400 - Bad Request
  • 409 - Conflict
  • 500 - Internal Server Error. 

Request

The following table contains the details of a typical HTTP Request for this service:

Type
Value
Header

POST /v3/consumers/{consumerIdentity}/directPushMessage HTTP/1.1

Host: merchant.api.vmob.co

Content-Type: application/json

Accept-Language: en-US

x-vmob-authorization: dm1vYi53aW5kb3dzLjE6

Body
{
"messageId": 123,
"requestId": "43068A39-BE65-4BAB-B21F-53208CE638BA"
}
Notes:

ConsumerIdentity could be a consumerId (Guid) or externalConsumerIdToken.

Successful Response

The following table contains the details of a typical successful HTTP Request for this service.

 
Type
Value
Header

HTTP/1.1 200 OK

Content-Type: application/json

Cache-Control: no-store

Pragma: no-cache

Body
 

Unsuccessful Response

The following table contains the details of a typical successful HTTP Request for this service.

 
Type
Value
Header

HTTP/1.1 409 Connflict

Content-Type: application/json

Cache-Control: no-store

Pragma: no-cache

Body
{ 
  "error":"Message is not valid to send.",
  "errorDescription":null,
  "innerException":null
}
Notes:
  • When consumer does not exist, message does not exist, message is expired or not published or not a direct push message type, it is within the push message blackout period, the request id and message id exist in DirectPushMessageLog or the consumer not found in Notification Hub.
  • DirectPushMessageRequestLog should be created to record for each request if the request Id and messageId has not exist in DirectPushMessageRequestLog table.
  • DirectPushMessageLog should record the result of push message sent with error if it failed.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.