Managing your Catalogs

Content API is a RESTful API that uses the Catalogs resource to manage catalogs in your Bing Merchant Center (BMC) store.

The following are the base URIs that you may use to call the Content API. You may use either URI.

  • https://content.api.bingads.microsoft.com/shopping/v9.1/bmc/
  • The tenant URL shown under Store Settings in the BMC web application

Each HTTP request must include the user's credentials and your developer token. To specify the user's credentials, set either the AuthenticationToken header or the UserName and Password headers, but not both.

Important

The Bing Ads APIs, including Content API, will stop supporting managed user credentials (username and password) beginning August 1, 2018. At your earliest convenience, please migrate your account to use Microsoft accounts. For information, see We're changing the way you sign in. You will also need to change your code to use OAuth for authentication. For details about using OAuth, see Authentication with OAuth.

To specify your developer token, set the DeveloperToken header.

If you manage catalogs on behalf of other customers, you must set the CustomerId header to the customer ID of the customer whose store you're managing, and the CustomerAccountId header to the account ID of any of the customer's accounts that you manage (it doesn't matter which managed account).

By default, the Content API uses JSON objects to represent the catalogs. To use XML, set the alt query parameter to XML.

For details about using the Catalogs resource, see the following sections.

For a code example that shows how to get, add, update, and delete catalogs, see Managing Catalogs Code Example.

Getting a catalog from the store

To get a catalog from the store, append the following template to the base URI.

{bmcMerchantId}/catalogs/{catalogId}

Set {bmcMerchantId} to your BMC store ID and set {catalogId} to the catalog's ID.

Send an HTTP GET request to the resulting URL. If the catalog was found, the response will contain a Catalog object that contains the catalog's details.

Getting a list of catalogs from the store

To get a list of catalogs from the store, append the following template to the base URI.

{bmcMerchantId}/catalogs

Set {bmcMerchantId} to your BMC store ID.

Send an HTTP GET request to the resulting URL. If the store contains catalogs, the response will contain a Catalogs object that contains the list of catalogs.

Deleting a catalog from the store

To delete a catalog from the store, append the following template to the base URI.

{bmcMerchantId}/catalogs/{catalogId}

Set {bmcMerchantId} to your BMC store ID and set {catalogId} to the catalog's ID.

Send an HTTP DELETE request to the resulting URL. If the catalog was found, it will be deleted.

Adding a catalog to the store

You use catalogs to logically group your products. To add a catalog to the store, append the following template to the base URI.

{bmcMerchantId}/catalogs

Set {bmcMerchantId} to your BMC store ID.

Send an HTTP POST request to the resulting URL. If the catalog was added, the response will contain a Catalog object. The Catalog object will include the catalog's ID, which you use to get and delete the catalog.

The body of the request is a Catalog object. You must specify the following fields.

The name that you specify must be unique within the store, and is limited to a maximum of 70 characters. The market identifies where the products are served. For a list of supported markets, see market. Products are served only if isPublishingEnabled is true. For details about how you can use isPublishingEnabled for testing your app, see Testing your Code in Sandbox.

Updating a catalog in the store

To update a catalog in the store, append the following template to the base URI.

{bmcMerchantId}/catalogs/{catalogId}

Set {bmcMerchantId} to your BMC store ID and set {catalogId} to the catalog's ID.

The body of the request is a Catalog object. You must specify both of the following fields.

Send an HTTP PUT request to the resulting URL. If the catalog was updated, the response will contain the updated Catalog object.