Amazon — API Version Setup

Amazon API Version Setup

EcartAPI supports two versions of the Amazon SP-API integration: v1 (legacy) and v2 (recommended). The version determines how EcartAPI communicates with Amazon for products, fulfillments, webhooks, and more.

We strongly recommend using v2. It is synchronous, returns real-time data, provides complete buyer information via Restricted Data Tokens, and includes endpoints not available in v1 (allowed carriers, inventory updates, fulfillment status updates).


How to configure the version

The API version is set at the app level in the EcartAPI dashboard. It applies to all Amazon integrations connected to that app — it cannot be changed per request.

Steps

  1. Log in to your EcartAPI dashboard.
  2. Go to E-commerce Setup in the left sidebar.
  3. Select Amazon from the list of platforms.
  4. Open the Additional Settings section.
  5. Set the version_api field to either v1 or v2.
  6. Click Save Settings.

Once saved, every API request made with that app's credentials will use the selected version.


Choosing between v1 and v2

v1v2
ProductsReports API (async — generates and downloads a report)Listings API (real-time, paginated with nextToken)
FulfillmentsFeeds API with XML (async)Shipment Confirmation API (synchronous)
Fulfillment updatesNot supportedSupported via PUT /orders/{orderId}/fulfillments/{id}
Buyer dataMay be incompleteComplete via Restricted Data Tokens (RDT)
WebhooksNotifications API via SDKNotifications API via Amazon SQS (native, more reliable)
Allowed carriersNot availableGET /services/allowed — required for fulfillment companyId
Inventory updateNot availablePUT /locations/{locationID}/inventories/{itemId}
Cancel fulfillmentSupportedNot supported (use v1 if required)

When to use v1

Use v1 only if you specifically need to cancel fulfillments (POST /orders/{orderId}/fulfillments/{id}/cancel), which is not available in v2.

When to use v2 (recommended)

Use v2 for all other scenarios. Key advantages:

  • Real-time product data — no waiting for Amazon to generate a report.
  • Synchronous fulfillments — immediate confirmation instead of async feed processing.
  • Complete customer info — shipping address and buyer details are accessible via RDT.
  • package.id support — required if you need to update the fulfillment's tracking later. Retrievable via GET /orders/{orderId}/fulfillments, but best saved at creation time to avoid the extra call.
  • Allowed carriers endpoint — use GET /services/allowed to get valid companyId values before creating fulfillments.

Fulfillments in v2

Creating a fulfillment

The create fulfillment payload in v2 is nested under a fulfillment wrapper and uses companyId (not company) for the carrier identifier:

{
  "fulfillment": {
    "package": {
      "id": "your-unique-package-ref"
    },
    "tracking": {
      "number": "1Z9999999999999999",
      "companyId": "UPS"
    },
    "items": [
      { "id": "order-item-id", "quantity": 1 }
    ]
  }
}

package.id is a string you generate. Use GET /services/allowed to retrieve the valid companyId values for the connected marketplace before creating a fulfillment.

package.id — what it is and when you need it

package.id is a client-generated reference you assign when creating a fulfillment. It is required if you need to update the fulfillment's tracking information later.

It is retrievable. You can recover package.id after creation by calling GET /orders/{orderId}/fulfillments — the response includes a packages.id field that matches the value you submitted. Save it in your system at creation time to avoid the extra lookup.

For an update to succeed, the orderId, package.id, order items, and quantities must be consistent with the original POST.

Updating fulfillment status

There are two distinct update scenarios in v2:

1. Update tracking info — use PUT /orders/{orderId}/fulfillments/{id} with the same payload structure as the create request. Supply the package.id you assigned at creation.

2. Update fulfillment status — use this when Amazon has not automatically updated the shipment status. Valid status values are:

StatusMeaning
ReadyForPickupPackage ready for carrier pickup
PickedUpCarrier has picked up the package
RefusedPickupCarrier refused pickup
{
  "fulfillment": {
    "status": {
      "status": "ReadyForPickup"
    },
    "items": [
      { "id": "order-item-id", "quantity": 1 }
    ]
  }
}

For this status update, the id path parameter can be any non-empty value (e.g. "1") — Amazon does not use fulfillment IDs for status updates; the field exists only to maintain the standard EcartAPI route structure. The items array is optional — omit it to update the entire fulfillment, or include specific items to update only those.


Related resources


Did this page help you?