Back

Ecwid API Essential Guide

Aug 13, 20246 minute read

What type of API does Ecwid provide?

Based on the search results, Ecwid appears to have a REST API. The key points are:

  1. REST is one of the most common and popular API types for modern web services.

  2. REST APIs use standard HTTP methods like GET and POST, and are centered around resources identified by URIs.

  3. REST is known for its simplicity and ease of use compared to other API types like SOAP or GraphQL.

  4. Many e-commerce platforms and services tend to use REST APIs due to their flexibility and wide adoption.

To confirm the exact API type used by Ecwid, it would be best to check their official API documentation or developer resources.

Does the Ecwid API have webhooks?

Yes, the official Ecwid API does have webhooks. Ecwid provides a robust webhook system that allows developers to subscribe to various events occurring in an Ecwid store.

Webhook Support

Ecwid offers webhooks as part of its API, allowing developers to receive real-time notifications about various events in an Ecwid store.

Types of Events

Ecwid supports a wide range of webhook events that you can subscribe to. Some of the main event categories include:

  1. Order-related events:

    • order.created: Triggers when a new order is placed.
    • order.updated: Notifies when an order is updated.
    • order.deleted: Fires when an order is deleted.
    • unfinished_order.updated: Triggers for updates to unfinished orders.
    • unfinished_order.deleted: Notifies when an unfinished order is deleted.
  2. Product-related events:

    • product.created: Fires when a new product is created.
    • product.updated: Triggers when any product details are changed, including stock updates.
    • product.deleted: Notifies when a product is deleted.
  3. Category-related events:

    • category.created: Fires when a new category is created.
    • category.updated: Triggers when any details in an existing category are updated.
    • category.deleted: Notifies when a category is deleted.
  4. Customer-related events:

    • customer.created: Triggers when a new customer is created.
    • customer.updated: Fires when any details of an existing customer are updated.
    • customer.personalDataExportRequest: Notifies when customers request to share all personal data.
    • customer.personalDataRemovalRequest: Triggers when customers request to remove all personal data.
  5. Application-related events:

    • application.installed: Fires when the application is installed.
    • application.uninstalled: Triggers when the application is uninstalled.
    • application.subscriptionStatusChanged: Notifies when app subscription status changes.
    • application.storageChanged: Fires when application storage is updated.
  6. Other events:

    • profile.updated: Triggers when general store settings are updated.
    • promotion.created: Fires when a new advanced discount is created.
    • promotion.updated: Triggers when details of any advanced discount are updated.
    • invoice.created: Notifies when a new order tax invoice is generated.
    • review.created, review.updated, review.deleted: For product review events.

Best Practices

When working with Ecwid webhooks, consider the following best practices:

  1. Implement proper security measures to authenticate incoming webhook requests.
  2. Handle webhook events asynchronously to avoid blocking your application.
  3. Implement retry logic for failed webhook processing.
  4. Use the appropriate webhook events for your specific use case to minimize unnecessary processing.

By leveraging Ecwid's webhook system, developers can create real-time integrations and automate various processes based on store events, enhancing the functionality of Ecwid-based e-commerce solutions.

Rate Limits and other limitations

Here are the key points about the API rate limits for the Ecwid API:

Rate Limits

  • You can make up to 600 requests per minute with one application token [2].

  • If you exceed this limit, the token becomes temporarily blocked and the API will respond with a 429 error to all requests during that time [2].

  • Ecwid will permanently block the token and IP pair if you repeatedly exceed the rate limits [2].

Key Considerations

  • The rate limit applies per application token, not per store or user [2].

  • The 600 requests per minute limit is quite generous compared to many other APIs.

  • Temporary blocks are lifted automatically after the rate limit period passes.

  • Permanent blocks require contacting Ecwid support to resolve.

Best Practices

  • Implement rate limiting and backoff logic in your application to avoid hitting the limits.

  • Use caching where possible to reduce the number of API calls needed.

  • Batch requests when feasible to make more efficient use of the rate limit.

  • Monitor your API usage to stay well below the limits.

Summary

The Ecwid API has a straightforward rate limit of 600 requests per minute per application token. Exceeding this results in temporary blocks, with permanent blocks possible for repeated violations. Developers should implement proper rate limiting in their applications to avoid issues.

Latest API Version

Based on the search results provided, there is no specific mention of the most recent version number of the Ecwid API. However, here are the key points regarding the Ecwid API versions and updates:

API Availability

  • The Ecwid API is available on any paid plan [2].

Recent Updates

  • The most recent update mentioned in the search results is from June 11, 2020, when the API documentation was moved to https://api-docs.ecwid.com/.

Key Features and Changes

  • In July 2019, Ecwid introduced the ability to send up to 500 requests to the API simultaneously in one request [4].

  • In May 2019, improvements were made to category image quality for static store pages, and thumbnail image details were added for GET requests for category endpoints in the REST API [4].

  • Multiple requests can now be sent at once to create or update products in the REST API, though API limits should still be respected [4].

Best Practices

  • When working with the Ecwid API, it's important to:
    1. Check the official documentation at https://api-docs.ecwid.com/ for the most up-to-date information.
    2. Respect the API limits when making requests.
    3. Use the latest version of the Ecwid JavaScript SDK when developing applications.

While the search results don't provide a specific version number, they indicate that Ecwid regularly updates its API with new features and improvements. To get the most accurate and current information about the Ecwid API version, it's best to consult the official Ecwid API documentation directly.

How to get a Ecwid developer account and API Keys?

To get a developer account for Ecwid and create an API integration, follow these steps:

1. Sign up for an Ecwid account

To start working with the Ecwid API, you need a store on any paid plan. You can sign up for an Ecwid account at their website. If you're developing an application for a client or want to test in a safe environment, Ecwid may provide you with a free test store with API access.

2. Set up an application

Once you have an Ecwid account:

  1. Log in to your Ecwid Control Panel.
  2. Navigate to the "Develop apps" section.
  3. Set up a custom application, which only takes a few seconds.

3. Configure application settings

On the application's "Details" page, you'll need to configure the following:

  1. Access scopes: Define the permissions your app needs for making different API requests.
  2. Access tokens: You'll receive authorization keys for REST API requests. There are two types:
    • public_token: For publicly available data with GET requests.
    • secret_token: For all requests (keep this secure).
  3. Endpoint: Set up an external URL where Ecwid sends requests for certain APIs (e.g., webhooks, payment, and shipping requests).

4. Obtain necessary credentials

To make API requests, you'll need:

  1. Your store ID: Found in the footer of your Ecwid Control Panel.
  2. Your access token: Provided when you set up the application.

What can you do with the Ecwid API?

Based on the information provided in the search results, here is a list of data models you can interact with using the Ecwid API, along with what is possible for each:

Store Profile

  • Get store name and general settings
  • Get store admin email
  • Get updated statistics
  • Set taxes
  • Update invoice logo
  • Change Starter Site domain
  • Close store for maintenance

Store Limits

  • Get store limits and restrictions (e.g. maximum number of available products)

Catalog

  • Search products
  • Get product options/variations
  • Update product prices
  • Upload images and e-goods
  • Modify product attributes
  • Delete products and categories
  • Create new products

Orders

  • Get sales for a given period
  • Retrieve order details
  • Change order totals
  • Switch order status
  • Cancel orders
  • Delete orders
  • Place new orders

Customers

  • Search customers
  • Retrieve customer data
  • Change customer profile data
  • Add items to customer address book
  • Delete customers
  • Add new customers

Discount Coupons

  • Get list of discount coupons
  • Retrieve coupon details
  • Change coupon expiration date
  • Limit coupon number of uses
  • Update coupon code
  • Delete coupon codes
  • Add new discount coupons

Storefront Customization

  • Attach custom JS/CSS to modify look and feel
  • Add new tab to merchant control panel

Shipping and Payment Methods

  • Add new shipping method
  • Add new payment method

Invoices

  • Get invoices

Store Statistics

  • Get store statistical information

Staff Accounts

  • Get information about staff accounts
  • Send and resend staff account invites
  • Revoke sent invitations and delete staff accounts

Subscriptions

  • Get information about subscriptions
  • Update subscription details

Brands

  • Search product brands

Abandoned Carts

  • Search abandoned carts
  • Get abandoned cart details
  • Update abandoned cart
  • Convert cart to order

Product Types and Attributes

  • Search product types
  • Get product type details
  • Update product type
  • Create product type
  • Delete product type

This list covers the main data models and operations available through the Ecwid API. Each of these areas allows for various interactions and manipulations of store data, enabling developers to create comprehensive integrations and customizations for Ecwid-based e-commerce stores.