Create event with a venue with Graph API - facebook

Is it possible to set the venue when creating a location using Graph API? So that it's actually linked to the Facebook Place.
The goal is to show the map, but I'm fairly certain that for some reason requires a Place.
{
"name": "Dans till Zlips",
"start_time": "2011-09-11T00:00:00",
"end_time": "2011-09-11T03:00:00",
"location": "Yesterday",
"street": "Skyttevägen 4",
"city": "Vallentuna",
"country": "Sweden"
}
I think this should show a place. It does not. Setting longitude, latitude or venue id (suppose that's the id of the Place) does not work.
Right now I have to manually change the location in the event edit menu if I want to have it linked, which isn't really fun or feasible when you have a couple of hundred events.

There's a (currently undocumented) parameter which will mark a created event as taking place at a particular Place - When creating the event add the location_id parameter and set it to the ID of the Facebook Place you want

Related

Is there any easy method to getting the Column Title when using GET Row with the Smartsheet API?

Is there any easy method to getting the Column Title when using GET Row with the API? New to API. I'm utilizing Microsoft Power Automate for these calls to push updates to Teams and such (more custom than what comes natively from Smartsheet).
I'm utilizing this address from the documentation:
https://api.smartsheet.com/2.0/sheets/{SheetID}/rows/{rowID}, and then I add this string to the end of that URL to get discussions and columns: "?include=discussions,columns"
which will include a separate array named "Columns".
What I'm wanting to do is get the "Column title" within the initial GET Row action. It would show up within the "cells" array when doing a GET Row API call.
Here's an example of what is obtained in the "cells" array when GET Row is used:
"cells": [
{
"columnId": 4151830841190276,
"value": "New task.",
"displayValue": "New task."
}
]
And here's an example of what's obtained in that Columns array, which comes separate:
"columns": [
{
"id": 4151830841190276,
"version": 0,
"index": 3,
"title": "Item Name",
"type": "TEXT_NUMBER",
"primary": true,
"validation": false,
"width": 300
}
Which is fine, I can do lookups to bridge the gap between the ColumnID I obtain from "get row" and the Columns array that's also returned...but ideally I'd like to just get the ColumnID Title in the native "GET Row" action, preventing this workaround. Any ideas, or am I doing it the best way?
You can't get column information (title, type, options...) while specifically reading rows.
You have 2 options:
Make another call to get the column information
https://smartsheet-platform.github.io/api-docs/#get-column)
Read all
the sheet (both columns and rows at once)
https://smartsheet-platform.github.io/api-docs/#get-sheet
Both solution should be working, I would suggest the second solution since only one API call is needed, but need more work processing the data.

Azure DevOps Picklist howto know which ID is for what picklist?

When I GET the picklist by id using the REST api, it returns a json like this.
{
"items": [
"Orange",
"Blue"
],
"id": "65a8a40d-6c22-45ce-af0a-bdfdfdfd335",
"name": "picklist_aef2c045-0d2d-4f92-kjdf-56eea553e1ef",
"type": "String",
"isSuggested": false,
"url": "https://dev.azure.com/organization/_apis/work/processes/lists/65a8a40d-6c22-45ce-af0a-bdfdfdfd335"
}
My current aim is to make a script that updates the items within a picklist, but in order to update, I need to know the id of that picklist. All I know from azure devops is the label of the picklist. Is there a way to get the corresponding id with the label? Or is there an alternative? Even if I get the entire list of all picklists within the collection, it still doesn't tell me which is associated to which label so it's not usable for me.
Is there a way to get the corresponding id with the label? Or is there an alternative?
The essence of Picklist is the work item field.
You could get the target PickList id with the Rest API: Fields - Get or Fields - List.
The custom picklist field name: custom.fieldname.
For example:

Get parent FB event from recurring FB event

Facebook recently added recurrences to their events. So a parent event 887104098135547, will have some event_times like so:
"event_times": [
{
"id": "887104171468873",
"start_time": "2018-06-22T20:00:00+0200",
"end_time": "2018-06-22T21:00:00+0200",
"ticket_uri": "http://www.s-d-a.pl/zapisy/id29/"
},
{
"id": "887104121468878",
"start_time": "2018-06-15T20:00:00+0200",
"end_time": "2018-06-15T21:00:00+0200",
"ticket_uri": "http://www.s-d-a.pl/zapisy/id29/"
},
...
If I start with event recurrence id 887104171468873, I can fetch it and treat it just like a FB Event (name, start_time, end_time, description, place, etc). It represents the singular instance of that recurrence, its times, and the attendees.
However, there is no way to get the parent templated event id, as far as I can tell. And likewise, there is no way to tell that this recurrence event id is actually a recurrence and not a full id. :(
This is causing problems for my system, where sometimes it fetches Pages and gets the parent IDs (and uses them in the system), and sometim[[es it fetches Users and gets the events they're RSVPing too, and gets the recurrence sub-events, with no great way to figure out how to canonicalize them back to the parent ID.
Has anyone else figured out how to do this?
Ok, looks like this is confirmed as being not possible. FB knows it is an issue and it is on their roadmap. https://developers.facebook.com/bugs/126142654873570/?ref=messenger_notif_bug_close

Uber developers API /request/[request_id] endpiont does not have waypoints for UberPOOL

I am trying to read the waypoints for UberPOOL trips, but they are not being populated by the API. This is the process that I am going through:
Call the /history endpoint to get a list of trips
Call the /request/[request_id] for each trip to get the details
Check the product id and make sure it is a "POOL" type product
Read the waypoints node
...but none of the trips have any waypoints. What am I doing wrong? Ideally, I would like the start/end location of each UberPOOL trip, and was hoping to the the waypoints as a workaround, because the start location in the history is just the city and not the actual pickup location.
Waypoints are available only for trips with the status 'not-completed', we will update our documentation accordingly. Thanks for bringing this up.
The following fields are populated only when a trip is active:
driver
vehicle
location
eta
surge_multiplier
pickup
destination
riders
waypoints
An example response for a completed trip request:
{
"status": "completed",
"product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
"request_id": "2b61e340-27bd-4937-8304-122009e4a393",
"driver": null,
"location": null,
"vehicle": null,
"shared": false
}

Updating BigCommerce Pricing in Bulk with API

I am trying to figure out the best way to update our prices via the API
Normal SKUs are fine, but the price of items with options seems a little less straightforward.
Using the GET v2/products?sku=XXXX there is only the base price of the item, not the price of the item with the option(s) selected
We also need the SKU of the item when the option(s) is(are) selected as my updated price list has SKU and Price
What is the best method of gathering this information, and then updating the prices?
Thanks for your help!
The V3 API provides a much better interface for this.
If all of your product's options are related to SKUs, you can GET all of the details of the product with its variants via
/v3/catalog/products?include=variants
This will show you option information along with all pricing - the calculated_price property will give you an idea of what the real price will be when you click on the option values for that SKU on the storefront - so it will take into account (for example) Product Rules and other things that might be going on in the background.
Editing SKUs (such as their price) can also be done via the endpoint.
Example:
PUT /v3/catalog/products/6606?include=variants (where 6606 is the Product ID)
{
"variants": [
{
"id": 25858,
"product_id": 6606,
"price": 10
},
{
"id": 25859,
"product_id": 6606,
"price": 11
},
{
"id": 25860,
"product_id": 6606,
"price": 13
}
]
}
This would update the prices of these 3 variants on the product (you'd get their IDs from the GET response).
If the product is "simple", meaning it has no child SKUs, you'll also see the product represented as a variant with sku_id=null. So you can actually use this endpoint to update the prices of simple products as well.