I have been worked out Creating Appointments from my Application to Zimbra by using Zimbra SOAP API.
Then i want's to Accept / Decline / Tentative zimbra appointments from my application itself. So that should get update in Zimbra calander.
Here i tried SendInviteReplyRequest Command from Zimbramail Services to send the Appointment accepted invitation.
My Code :
<SendInviteReplyRequest id="{mail-item-id}"
I have found that we have to give
id={mail-item-id}
as an attributes of SendInviteReplyRequest command. But i don't know where should i get this id={mail-item-id} from Zimbra ?
Thanks in advance
If you want to Accept, Decline and Tentative of the appointment. First, We have to get the {mail-item-id} to pass as id into SendInviteReplyRequest.
The below code will help us to get the {mail-item-id} which is invitation id of the appointment. So we have to pass our Zimbra Appointment Id as a uid into GetAppointmentRequest.
<GetAppointmentRequest xmlns="urn:zimbraMail">
<uid>Your Zimbra Unique Id</uid>
</GetAppointmentRequest>
Above said function will give the response below
<GetAppointmentResponse xmlns="urn:zimbraMail">
<appt uid="4cp5d81f-85e4-4949-a3ca-3a7d502cte8f" rev="96915">
<inv compNum="0" id="1" type="appt" seq="7"></inv>
</appt>
</GetAppointmentResponse>
from the response once xml result parse into array then ['APPT']['INV']['ID'] value have to set into id of the SendInviteReplyRequest.
$mail-item-id = ['APPT']['INV']['ID'];
<SendInviteReplyRequest id="'.$mail-item-id.'">
Related
We use
PATCH https://graph.microsoft.com/v1.0/users/{userId}/{messageId}/
to update the just created email draft in order to send it later.
During the call we get 400 error with the next text -> '{"error":{"code":"ErrorInvalidPropertySet","message":"Set action is invalid for property."}}'
We get it only for several mailboxes.
What could be the possible reason?
Is it related to the mailbox configuration? What should we pay attention to?
If you are trying to update a message use
PATCH /users/{id | userPrincipalName}/messages/{messageid}
this way. This error mainly occurs when you try to set a read only property. Please check if the payload which you are using is having any property with readonly access. Also go through this document.
The issue was in internetMessageHeaders field.
We used this field in our PATCH payload, but it is not presented in PATCH method at all and sometimes Microsoft Graph API returns 400, but sometimes not.(even in case of no error this field is ignored)
So if you face this issue - just check whether you send the internetMessageHeaders field in your payload or not.
I guess it could be applied to all other readonly fields.
Get customer by email
https://localhost/biobays/wp-json/wc/v2/customers/2 getting customer by id is working. But
https://localhost/biobays/wp-json/wc/v2/customers/email/test#t.com or https://localhost/biobays/wp-json/wc/v2/customers?email=test#t.com are not working
I expect the user info do be retrieved.
I'm having an empty response.
PS: this work great on old v3 https://localhost/biobays/wc-api/v3/customers/email/test#t.com
Joe,
I make a little test and this is the call you need to do to the API:
$params = array("email" => "test#t.com");
$getContact = $wcApi->get('customers',$params);
echo "<pre>";
print("<pre>".print_r($getContact , true)."</pre>");
echo"</pre>";
If you will test the url make the call like this:
https://localhost/biobays/wp-json/wc/v2/customers?email=test%40t.com&consumer_key=YOUR_CONSUMER_KEY&consumer_secret=YOUR_CONSUMER_SECRET
If no e-mail exists one empty array is returned.
For new version api tested on 5.8.x , this seems to working fine
https://yourdomain.com/wp-json/wc/v3/customers?email=xxxxxxx#gmail.com
I am using ruby's Net::IMAP object and I can retrieve a set of emails using either:
IMAP.all ..args..
Or
IMAP.find ..args..
But is there anyway of retrieving a specific email, preferably by the message-id header for example?
Is this possible or am I limited to all and find and trying to narrow the result set with better arguments?
I didn't understand what technology you're using with IMAP. However the IMAP Specification provides the ability to search by a variety of fields, including email headers. You can use the following IMAP command to retrieve the UID of an email with Message-Id <53513DD7.8090606#imap.local>:
0005 UID SEARCH HEADER Message-ID <53513DD7.8090606#imap.local>
This will then give you a response such as the following:
* SEARCH 1
0005 OK UID completed
In my case the email with Message-Id <53513DD7.8090606#imap.local> was the first one, so the SEARCH command returned a matching UID of 1.
You can then retrieve the message using a UID FETCH command, such as the following:
0006 UID FETCH 1 BODY[]
Naturally, if you know the UID in advance, you can skip the UID SEARCH step, but that depends on your application.
For anybody else who is looking at this, these keys will do the trick:
keys: ['HEADER', 'MESSAGE-ID', message_id]
Just to give a full ruby solution incase it's helpful to someone else.
Bear in mind that if the message is in a subfolder you'll need to manually search through each folder to find the message you are after.
search_message_id = "<message-id-you-want-to-search-for>"
email = "youremail-or-imap-login"
password = "yourpassword"
imap = Net::IMAP.new("imap.example.com", 993, ssl: true)
imap.login(email, password)
imap.select("Inbox")
imap.search(["HEADER", "Message-ID", search_message_id]).each do |message_id|
envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
puts "Id:\t#{envelope.message_id}"
puts "From:\t#{envelope.from[0].mailbox}##{envelope.from[0].host}"
puts "To:\t#{envelope.to[0].mailbox}##{envelope.to[0].host}"
puts "Subject:\t#{envelope.subject}"
end
imap.logout
imap.disconnect
You can change the above to search all sub-folders by doing:
folders = imap.list("", "*")
folders.each do |folder|
imap.select(folder.name)
imap.search # ...
end
Question: Is there a way (api call) to get the first product id in a magento install via the soap api.
I'm attempting to download all the products from a magento system and insert them into a different database (I do the conversion myself so that's not a bother) What is hard to understand though is how do I get a list of the product id's without getting all of them, if all I know is that the site is up.
Here's the info I have.
soap end point
soap username
soap apikey (aka password)
Here's what I don't know.
the id of any of the products
the date any of the products were created on or last edited.
For my initial load, I have to do a where product id in, because I expect 20 to 40k product lists won't come back in one soap call.
So I call
where id in (1 -> 100) Nope
where id in (101-> 200) Nope..
Now as you can imagine that code smells something fierce. It works, but I have to think there is a better way..
To expand my question: Is there a better way?
I can post the XML that I'm sending if that helps. The language I'm using to create the soap(xml) is vim, so I don't have code I can paste.
Try This
$client = new SoapClient('http://localhost/magento8/index.php/api/soap/?wsdl');
$session = $client->login('soap username', 'soap apikey');
$filters=array('entity_id'=>array(array('lt'=>'1','gt'=>'100')));//get fist 100 result
$result = $client->call($session, 'catalog_product.list',array($filters));
var_dump($result);
for more attributes check this
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/using_collections_in_magento
I need to determine when a user's paypal subscription is set to end/renew. I know that the easiest way to do this would be to extrapolate it from the time when the initial subscr_signup gets sent through, based on the subscription interval value, but because I'm working with some 3rd party software, it's not possible (or at least, not ideal).
It seems to me that I ought to be able to send a query to paypal to get this info based on txn_id, but I can't find any documentation that implies that this is the case.
if you send a request with:
TRXTYPE = R -this is to tell it recurring profiles
ACTION = I - this is to tell it to make an inquiry
ORIGPROFILEID = XXX - this is the profile you want to look up
PAYMENTHISTORY = N - this will tell it not to return payment history
from there the array will return something like this:
RESULT[1]=0
RPREF[12]=XXXXX
PROFILEID[12]=XXX
STATUS[6]=ACTIVE
PROFILENAME[1]=0
START[8]=10182006
TERM[1]=0
NEXTPAYMENT[8]=10182009
PAYPERIOD[4]=QTER
TENDER[1]=C
AMT[5]=0.00
ACCT[16]=XXXXXXXXXXXXXXXX
EXPDATE[4]=0101
AGGREGATEAMT[6]=0.00
AGGREGATEOPTIONALAMT[5]=0.00
MAXFAILPAYMENTS[1]=0
NUMFAILPAYMENTS[1]=1
RETRYNUMDAYS[1]=4
NAME[11]=BLAHBLAH
ZIP[5]=12345
What you are looking for is the START, but pretty much all the items in the array are self explanitory.