Update an existing Recipient

Request Parameters

Name Type Description Required?
DataRecipient[]UnavailableNot Required
ExpandSystem.String[]UnavailableNot Required
ProjectIdSystem.Int32UnavailableRequired
ProjectIdSystem.Int32UnavailableRequired

Validation

Name Type Description Required?
ProjectIdSystem.Int32IdRequired

Endpoints

Sample Request
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.phoenixplatform.net" xmlns:tig="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:tig1="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services.Filters">
    <soapenv:Header>
      <PhoenixHeader xmlns="http://api.phoenixplatform.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <AccessToken>[YOUR ACCESS TOKEN]</AccessToken>
         <Phoenix-ProjectId>1</Phoenix-ProjectId>
      </PhoenixHeader>
   </soapenv:Header>
   <soapenv:Body>
      <api1:UpdateRecipient xmlns:api1="http://api.phoenixplatform.com">
         <api1:request>
             <tig:Id>1</tig:Id>
             <tig:MessageId>1</tig:MessageId>
             <tig:RecipientAddress>TestValue[ba52a52e3c5e498ead43bd24f5b176bd]</tig:RecipientAddress>
             <tig:SendDate>2018-12-16T11:50:52.1226829+00:00</tig:SendDate>
             <tig:ReceiveDate>2018-12-16T11:50:52.1226829+00:00</tig:ReceiveDate>
             <tig:Location>POINT(-157.7964 21.3114)</tig:Location>
             <tig:StatusTypeId>Success</tig:StatusTypeId>
             <tig:StatusDesc>TestValue[5510136c75154403a04bd9d11c5456ed]</tig:StatusDesc>
             <tig:ModifyDate>2018-12-16T11:50:52.1226829+00:00</tig:ModifyDate>
             <tig:PhoenixIdentity_UserId>1</tig:PhoenixIdentity_UserId>
             <tig:Reference>TestValue[bf329cfc0abd4dbaa85600c678bae565]</tig:Reference>
         </api1:request>
      </api1:UpdateRecipient>
   </soapenv:Body>
</soapenv:Envelope>
Sample Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
      <ActivityId CorrelationId="d088e8c6-bf1e-4a9d-9e96-3f5faf232af5" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">17abb643-6b2f-4485-b4ff-0afc30697b7d</ActivityId>
   </s:Header>
   <s:Body>
      <MessagingResponse xmlns="http://api.phoenixplatform.com">
         <MessagingResult xmlns:a="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Syndicate.Services.Contracts.Article" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <b:Data xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services" xmlns:b="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Messaging.Model">
              <b:Recipient>
                <b:CreateDate>2018-12-16T11:50:52.1226829Z</b:CreateDate>
                <b:MessageId>0</b:MessageId>
                <b:ModifyDate>2018-12-16T11:50:52.1226829Z</b:ModifyDate>
                <b:RecipientAddress i:nil="true" />
  </b:Recipient>
</b:Data>
            <TotalRecords xmlns="http://schemas.datacontract.org/2004/07/Tigerspike.Phoenix.Services">1</TotalRecords>
         </MessagingResult>
      </MessagingResponse>
   </s:Body>
</s:Envelope>
Resource URL

Sample Request

POST /projects/{projectid}/messages/{messageid}/recipients? HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json; charset=utf-8
Authorization: Bearer [YOUR SUPER SECURE TOKEN]
Content-Length: 998
Host: [CallHost]
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)-
 
[{
 "Id" : 1,
 "MessageId" : 1,
 "RecipientAddress" : "TestValue[6aa68c94cb754cda83f56b0dc90875aa]",
 "SendDate" : "2018-12-16T11:50:52.1216829+00:00",
 "ReceiveDate" : "2018-12-16T11:50:52.1216829+00:00",
 "Location" : "POINT(-157.7964 21.3114)",
 "StatusTypeId" : "Failure",
 "StatusDesc" : "TestValue[fe818bcf71504084a25c325e944c00e9]",
 "ModifyDate" : "2018-12-16T11:50:52.1216829+00:00",
 "PhoenixIdentity_UserId" : 1,
 "Reference" : "TestValue[e3e26b106f094976a57587fa3ba98590]"
}] 
Sample Response
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 200
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,PUT,POST,DELETE,OPTIONS
Access-Control-Allow-Headers: Content-Type

[{
  "MessageId": 0,
  "RecipientAddress": null,
  "CreateDate": "2018-12-16T18:47:38.8995751Z",
  "ModifyDate": "2018-12-16T18:47:38.8995751Z"
}]

Nuget

PM> Install-Package PhoenixServiceHelper

PhoenixServiceHelper Sample

using System;
using System.Collections.Generic;

using Tigerspike.Phoenix.Services.Api.ServiceConfiguration;
using Tigerspike.Phoenix.Services.Api.ServiceRequest;
using PhoenixService = Tigerspike.PhoenixMessaging.V1;
using Tigerspike.Phoenix.Services.Api;

var request = new SoapServiceRequest() { Token = "[YOUR SUPER SECURE TOKEN]", ProjectId = 1 };
var configuration = CustomConfigurationFactory.CreateServiceConfiguration(Assembly.GetExecutingAssembly());

var proxy = new PhoenixServiceHelper<PhoenixService.IPhoenixMessagingService>(configuration);
var response = proxy.Execute(request, o => o.UpdateRecipient(new PhoenixService.UpdateRecipientRequest() 
{ 
    Data = new[] 
    { 
        new PhoenixService.Recipient() 
        {
          Id = 1,
          MessageId = 1,
          RecipientAddress = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          SendDate = DateTime.UtcNow,
          ReceiveDate = DateTime.UtcNow,
          Location = new PhoenixService.DbGeography() { Geography = new PhoenixService.DbGeographyWellKnownValue() { WellKnownText = "POINT(POINT(-157.7964 21.3114))"}},
          StatusTypeId = PhoenixService.StatusTypeEnum.Failure,
          StatusDesc = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]",
          ModifyDate = DateTime.UtcNow,
          PhoenixIdentity_UserId = 1,
          Reference = "TestValue["Guid.NewGuid().ToString().Replace("-",string.Empty)+"]"
        }
    } 
}));