Add special via foursquare api, got code 200 but special doesn't show up - foursquare

I am trying to add a special via the foursquare api Add special endpoint.
I am generating a proper POST request and getting a similar response to what the api should return. But it still wont show up on the specials on foursquare.
Do I need to add a campaign too for it to show up?
This is the response object I am getting:
{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":0}}],"response":{"special":{"id":"51ed8c2a498e821be0469850","type":"friends","status":"New
- in review","count1":10,"name":"Friends Special...!","text":"Everyone gets free cookies??","unlockedText":"hgc","autoRedeem":false}}}
Any ideas on what needs to be done?
PS: I am able to add a special manually on foursquare!!
This venue is an office and according to this api doc offices and homes aren't allowed to add specials. This is a bit of a conflict.
Is it that offices are not allowed to add specials only via the API since I am able to create a special manually on foursquare.

Alright so, got the answer.. Create a special then create a campaign works!!
But I'm still wondering how I was able to add a special when the documentation clearly says that homes and offices aren't allowed to do so!

Related

DocuSign Template Prefil Fields Through API

I was a user of Right Signature, where we can create merge fields, and we can send the data through post request,
I have recently migrated to Docusign,
I see that they have prefil fields.
What I want to achieve is, Create Prefil fields, like Owner Name, Owner Email, etc,
And supply this fields through DOCUSIGN API, and send them. Is this functionality even possible.
I could not find any documentation, or perhaps I do not have the right search. Can some one point me to it, what will be the syntax for sending the templates, with prefil fields.
Thanks.
Anything you can do from the web app - you can do from API.
The term "pre-fill fields" means something very specific, but I'm not sure exactly what you want.
Any field in DocuSign can be "pre-filled" such that the value is set by the sender. The field can be read-only or can be edited by the person that it is assigned to.
You can also use pre-fill fields that are specific for the sender and therefore cannot be modified by anyone except the sender.
All of this is possible with the API, I suggest you first try it with the web app to understand. You can do everything for free with a developer account - try it and see if it serves your need.

How do i fetch only internal messages from O365 using Graph API

I wan't to fetch only messages that are only internal to organization.
Right now the way i see is fetch domains first then for each message see if from/sender domain belongs to that message , based on that differentiate.
But this is lengthy process and not a foolproof technique.
Is there any GRAPH API query i can use which readily provides this ?
It does not apear that the REST API queries for Office 365 includes this information directly in the messages. From the Version 2.0 And the Beta this is not included in message output.
However, it looks like you might be able to get it from the REST API via the headers.
Try the following query:
https://graph.microsoft.com/beta/me/messages?$select=internetMessageHeaders&$top=1
This takes top one messages and shows you the email header of the message.
In the header look for X-OriginatorOrg. The value should be the main domain of your organisation.
Alternatively you can look at the X-MS-Exchange-Organization-MessageDirectionalityheader. If the value here is Originating it should come from inside your own organisation.

Office 365 Unified API Exchange folders

I'm starting to look at the new Office 365 Unified API (specifically around Exchange for the moment).
In the existing Mail API at you can make an authenticated call to https://outlook.office365.com/api/v1.0/me/folders/Inbox/messages in order to get messages in the Inbox. You can also hit folders/Drafts/messages, folders/SentItems/messages and folders/DeletedItems/messages to retrieve messages from Drafts, Sent Items and Deleted Items respectively. This is documented at https://msdn.microsoft.com/office/office365/APi/mail-rest-operations#AllMailAPIoperations.
Problem is, I can't find (either in documentation at https://msdn.microsoft.com/office/office365/HowTo/office-365-unified-api-reference#msg_ref_relationship_Messages or by messing about on https://graphexplorer2.azurewebsites.net) how to drill into these folders when accessing via the Office 365 Unified API.
The documented URL to access messages via the new Unified API is https://graph.microsoft.com/beta/me/Messages, and so I was hoping I could hit something like Messages/Inbox or Messages/folders/Inbox, but no luck so far.
Does anyone know if these paths are currently missing or addressed differently, or if it's the intention that you find what you want by using $search rather than drilling into specific folders?
This isn't currently supported in Unified API, but is high on our priority list, and we are working on it. Sorry for the confusion. You can continue to use outlook.office365.com endpoint for now, to access folder info.
Having checked back (and read through https://graph.microsoft.com/beta/$metadata) this has now been implemented. You access folders via MailFolders/[folder name]/messages, so:
https://graph.microsoft.com/beta/me/MailFolders/Inbox/messages
https://graph.microsoft.com/beta/me/MailFolders/Drafts/messages
https://graph.microsoft.com/beta/me/MailFolders/SentItems/messages
..etc.

foursquare api who's been there

I which to display on my website a the list of maybe the last 5 peoples who checked in my venue.
I didn't find any method in the api to do that, the closest was showing your friend...
I tell my boss that it wasn't possible to do that then he shows me this site :
http://www.brooklynmuseum.org/community/foursquare/
How is it possible to get this kind of list and if possible with no authentication (my server will do the call no a real person so no oauth...)
thanks !
You can use the Venue Push API (documented here) to notify your website whenever a user checks in to your managed venue, which you can use to update such a list.

foursquare api venue details specialsnearby not being returned

When making a Foursquare venue details API call, the specialsNearby field does not exist in the json response. I have tried hundreds of different venues, and none of them contain this field (they do contain the 'specials' field though).
I'm using v2 of the foursquare API, and giving it a version string of v=20120417.
Any assistance in obtaining the nearby specials would be much appreciated!
It does look like we've stopped sending down the specialsNearby field -- once I can confirm with a few of the other dev's, we'll update the docs accordingly.
Edit: We have indeed deprecated this field in favor of the Explore endpoint below.
But, no need to worry -- there's an easy way to get the same info!
Check out our Explore endpoint -- https://developer.foursquare.com/docs/venues/explore
Pass "intent=specials" to that endpoint, and you'll get all the nearby specials.

Resources