# Business Ads Custom Pivots Preview
## Reading
Provides ad object data of each custom pivot grouping
#### Example
### HTTP
```
GET /v25.0/{business-id}/ads_custom_pivots_preview HTTP/1.1
Host: graph.facebook.com
```
### PHP SDK
```
/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{business-id}/ads_custom_pivots_preview',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
```
### JavaScript SDK
```
/* make the API call */
FB.api(
"/{business-id}/ads_custom_pivots_preview",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
```
### Android SDK
```
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{business-id}/ads_custom_pivots_preview",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
```
### iOS SDK
```
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{business-id}/ads_custom_pivots_preview"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
```
Try it in [Graph API Explorer](https://developers.facebook.com/tools/explorer/?method=GET&path=%7Bbusiness-id%7D%2Fads_custom_pivots_preview&version=v25.0)
If you want to learn how to use the Graph API, read our [Using Graph API guide](https://developers.facebook.com/docs/graph-api/using-graph-api)
#### Parameters
| Parameter | Description |
| --- | --- |
| `ad_account_ids`<br><br>*array<int64>* | List of ad accounts<br> |
| `date_preset`<br><br>*enum {today, yesterday, this_month, last_month, this_quarter, maximum, data_maximum, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, last_week_mon_sun, last_week_sun_sat, last_quarter, last_year, this_week_mon_today, this_week_sun_today, this_year}* | The date preset<br> |
| `dimensions`<br><br>*array<string>* | dimensions<br> |
| `group_name`<br><br>*string* | group_name<br> |
| `sorting`<br><br>*array<JSON object>* | sorting<br><br><br>`field` *string*<br>field<br><br>**[required]**<br><br><br>`direction` *enum {asc, desc}*<br><br>**Default value: **`"desc"`<br>direction<br> |
| `time_range`<br><br>*{'since':YYYY-MM-DD,'until':YYYY-MM-DD}* | The time range<br><br><br>`since` *datetime*<br>A date in the format of "YYYY-MM-DD", which means from the beginning midnight of that day.<br><br><br>`until` *datetime*<br>A date in the format of "YYYY-MM-DD", which means to the beginning midnight of the following day.<br> |
#### Fields
Reading from this edge will return a JSON formatted result:
```
{
"data": [],
"paging": {},
"summary": {}
}
```
##### data
A list of AdsCustomPivotsPreview nodes.
##### paging
For more details about pagination, see the [Graph API guide](https://developers.facebook.com/docs/graph-api/using-graph-api#paging).
##### summary
Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=__type__).
| Field | Description |
| --- | --- |
| `counts`<br><br>*list<AdsCustomPivotsPreviewCount>* | counts<br><br><br>**[default]**<br> |
#### Error Codes
| Error Code | Description |
| --- | --- |
| 100 | Invalid parameter |
## Creating
You can't perform this operation on this endpoint.
## Updating
You can't perform this operation on this endpoint.
## Deleting
You can't perform this operation on this endpoint.