# Getting started

## Asynchronous and synchronous calls

The Commerce API suite uses both asynchronous and synchronous calls. The [product management APIs](/commerce-api/admin-apis/product-management.md) send asynchronous API requests to [Global Commerce](https://gc.digitalriver.com/gc/ent/login.do) when:

* [Creating](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md#creating-an-individual-or-base-product), [updating](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md#updating-an-individual-or-base-product), [deploying](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deploying-a-product.md), [retiring](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/retiring-a-product.md), or [deleting a base or individual product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deleting-a-base-or-individual-products-locale.md)
* [Adding](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/adding-or-updating-a-product-variation.md#adding-a-product-variation-to-a-base-product), [updating](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/adding-or-updating-a-product-variation.md#updating-a-specific-product-variation), or [deleting a product variation](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deleting-a-product-variation.md)
* [Deleting a base or individual product's locale](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deleting-a-base-or-individual-products-locale.md)

All other API requests are synchronous and return data immediately.

Asynchronous calls allow you to send multiple requests in a small timeframe without waiting for the completion of a request or worrying about timeouts. These calls are sent to [Global Commerce](https://gc.digitalriver.com/gc/ent/login.do) to process product requests. Most products will complete successfully within a few seconds. However, creating or updating a base product with many variations and locales will take longer. For example, creating a base product with ten variations and 55 locales will take 30 seconds to a minute to complete.&#x20;

When Global Commerce receives an asynchronous request, it returns a task identifier (`taskId`) in the response and puts the request in a queue. You can use the `taskId` in synchronous requests to [retrieve product information](/commerce-api/admin-apis/product-management/retrieve-products-synchronous-api.md) and [get the current status of a product](/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api.md).

## Step 1: Obtain API credentials

When you get your credentials, ensure your API keys have [permission to use the Admin APIs](/commerce-api/master/roles-and-permissions.md#commerce-api-suite-roles-and-permissions).

## Step 2: Manage your products

{% hint style="info" %}
Steps marked with Async below indicate the request goes to [Global Commerce,](https://gc.digitalriver.com/gc/ent/login.do) where it is [added to a queue](/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api.md). The remaining steps are synchronous and applied immediately.
{% endhint %}

1. Get your [confidential key (secret)](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/api-structure/api-keys#confidential-keys). You will need the private key to send calls to the Admin APIs.
2. Async. Create a new product. You can [create an individual product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md#creating-an-individual-or-base-product), a [base product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md#creating-an-individual-or-base-product), or a [product with variations](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md#creating-an-individual-or-base-product).
3. [Verify the successful completion of the task](/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api.md) when creating or updating a product.\
   **Note**: You cannot apply additional changes to the product until the system completes the previous task.
4. Choose one of the following options:
   * Async (deployment needed). [Update a base product or individual product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/creating-or-updating-a-product.md#creating-an-individual-or-base-product). You can update any supported attribute for a base or individual product. The change is visible to the shopper on the next deployment.
   * Async (deployment needed). [Add or update a product variation](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/adding-or-updating-a-product-variation.md). You can add or edit any supported attribute for a product variation. The change is visible to the shopper on the next deployment.
   * Async (live change). [Apply a live change to an individual product, base product, or product variation](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/applying-live-changes.md). Update any supported attribute for an individual product, base product, or product variation. The change is visible to the shopper immediately upon completing the request.
   * Async. [Delete a specific locale](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deleting-a-base-or-individual-products-locale.md) or [delete a product variation](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deleting-a-product-variation.md). Update any supported attribute for an individual product or base product or remove a product variation. The change is visible to the shopper immediately upon completing the request.
5. Sync. [Query tasks by task identifier, product identifier, or ERID](/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api.md#verifying-the-successful-completion-of-multiple-products). If you are using ERID, note that the request searches for tasks currently associated with the ERID.\
   **Note**:  Ensure all create and update requests are completed successfully or failed. You cannot deploy or retire a product before the task is completed.
6. Async. [Deploy the product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/deploying-a-product.md).
7. Async. [Retire the product](/commerce-api/admin-apis/product-management/manage-products-asynchronous-api/retiring-a-product.md).

## Step 3: Retrieve product information

{% hint style="info" %}
The following steps are synchronous and applied immediately.
{% endhint %}

Choose one or more of the following options:

* Sync. [Get product information](/commerce-api/shopper-apis/product-discovery/products.md#getting-a-product-by-identifier). The response only returns supported attributes. All product variations (if any) for a base product will appear as a URL in the response.
* Sync. [Get product information limited to a single locale](/commerce-api/admin-apis/product-management/retrieve-products-synchronous-api/getting-a-product-variation.md). The response only returns supported attributes. All product variations (if any) for a base product will appear as a URL in the response.
* Sync. [Get product variation information](/commerce-api/admin-apis/product-management/retrieve-products-synchronous-api/getting-a-product-variation.md). The response only returns supported attributes.&#x20;
* Sync. [Get product variation information limited to a single locale](/commerce-api/admin-apis/product-management/retrieve-products-synchronous-api/getting-a-product-variation-by-locale.md). The response only returns supported attributes. The `localizations` object will only display information for the locale specified in the URL path.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/admin-apis/product-management/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
