Marketing API Version

Vehicle

Reading

Represents a vehicle in a catalog.

Example

Graph API Explorer
GET /v2.11/{vehicle-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{vehicle-id}',
    '{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 */
/* make the API call */
FB.api(
    "/{vehicle-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{vehicle-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{vehicle-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription

id

numeric string

The id of the object

address

VehicleLocationAddressData

Address data as given by advertiser/user

applinks

Represents a vehicle applinks in a catalog

availability

enum

Availability of the vehicle

body_style

enum

BodyStyle of the vehicle

condition

enum

Condition of the vehicle (e.g. EXCELLENT)

currency

string

Represents a currency of vehicle in a catalog

dealer_id

string

Alphanumeric identifier of the dealer

dealer_name

string

Dealer Name of the vehicle listed

dealer_phone

string

Contact phone of the dealer

description

string

Description of the vehicle

drivetrain

enum

Drivetrain of the vehicle (e.g. 4X4)

exterior_color

string

Exterior color of the vehicle

fuel_type

enum

Fuel type of the vehicle

images

list<string>

Represents an images of vehicle in a catalog

interior_color

string

Interior color of the vehicle

make

string

Represents a make of vehicle in a catalog

mileage

VehicleCatalogItemMileageData

Represents a mileage of vehicle in a catalog

model

string

Represents a model of vehicle in a catalog

price

string

Represents a price of vehicle in a catalog

sale_currency

string

Represents a sale currency of vehicle in a catalog

sale_price

string

Represents a sale price of vehicle in a catalog

state_of_vehicle

enum

Essential to know whether the vehicle is new or used

title

string

Represents the title of the vehicle

transmission

enum

Represents the transmission of the vehicle

trim

string

Trim of this automobile. E.g. '"hybrid":false,"turbo":true'

url

string

URL field: VehicleURL (external page for the item)

vehicle_id

string

Unique identifier of item in catalog

vin

string

Vehicle Identification Number

year

unsigned int32

Year of this automobile. E.g. 2017

Edges

No edges

Validation Rules

ErrorDescription
100Invalid 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.