> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adobe Commerce REST

> Admin operations: products, orders, inventory, shipments, invoices, and customer management.

The Adobe Commerce REST connector lets your workflows interact with a Magento 2 / Adobe Commerce store via the REST API. Best for admin and back-office operations: product CRUD, order management, inventory, shipments, and invoices.

<Note>
  For storefront operations like catalog browsing, cart management, and checkout flows, use the [Adobe Commerce GraphQL](/connectors/integrations/adobe-commerce-graphql) connector instead; it supports precise field selection and is optimized for storefront use cases.
</Note>

<Note>
  For the full API reference, see the [Adobe Commerce REST API documentation](https://developer.adobe.com/commerce/webapi/rest/).
</Note>

<Snippet file="connection-note.mdx" />

## Connection setup

<Steps>
  <Step title="Create an Integration in Magento Admin">
    Go to **System → Integrations → Add New Integration**. Give it a name (e.g., "Spojit") and configure the **API** tab to grant access to the resources your workflows need.
  </Step>

  <Step title="Activate and copy the tokens">
    Click **Activate** on the integration. Copy the **Access Token**; this is a permanent token that works until revoked.
  </Step>

  <Step title="Add the connection in Spojit">
    Go to **Connections** in Spojit, click **Add Connection**, select **Adobe Commerce REST**, and enter:

    * **Base URL**: Your store URL (e.g., `https://mystore.com`)
    * **Access Token**: The integration access token
    * **Store Code** (optional): Defaults to `default`
  </Step>
</Steps>

## Tools

### Products

<AccordionGroup>
  <Accordion title="list-products: Search/list products">
    <ParamField body="query" type="string">
      Filter by product name (uses 'like' matching with % wildcards).
    </ParamField>

    <ParamField body="sku" type="string">
      Filter by exact SKU.
    </ParamField>

    <ParamField body="status" type="number">
      Filter by status: `1` = enabled, `2` = disabled.
    </ParamField>

    <ParamField body="typeId" type="string">
      Filter by product type: `simple`, `configurable`, `grouped`, `bundle`, `virtual`, `downloadable`.
    </ParamField>

    <ParamField body="pageSize" type="number" default="20">
      Number of results per page.
    </ParamField>

    <ParamField body="currentPage" type="number" default="1">
      Page number.
    </ParamField>

    <ParamField body="sortField" type="string">
      Field to sort by (e.g., `name`, `price`, `created_at`).
    </ParamField>

    <ParamField body="sortDir" type="string">
      Sort direction: `ASC` or `DESC`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "query": "shirt",
      "status": 1,
      "pageSize": 5,
      "currentPage": 1,
      "sortField": "price",
      "sortDir": "ASC"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "items": [
        {
          "id": 42,
          "sku": "WS-001",
          "name": "Blue Cotton Shirt",
          "attribute_set_id": 4,
          "price": 29.99,
          "status": 1,
          "visibility": 4,
          "type_id": "simple",
          "created_at": "2025-01-15 10:30:00",
          "updated_at": "2025-03-20 14:22:10",
          "weight": 0.5,
          "extension_attributes": {
            "stock_item": {
              "item_id": 42,
              "product_id": 42,
              "qty": 150,
              "is_in_stock": true
            }
          },
          "custom_attributes": [
            { "attribute_code": "description", "value": "<p>A comfortable blue cotton shirt.</p>" },
            { "attribute_code": "url_key", "value": "blue-cotton-shirt" }
          ]
        }
      ],
      "search_criteria": {
        "filter_groups": [
          { "filters": [{ "field": "name", "value": "%shirt%", "condition_type": "like" }] },
          { "filters": [{ "field": "status", "value": "1", "condition_type": "eq" }] }
        ],
        "page_size": 5,
        "current_page": 1,
        "sort_orders": [{ "field": "price", "direction": "ASC" }]
      },
      "total_count": 12
    }
    ```
  </Accordion>

  <Accordion title="get-product: Get product by SKU">
    <ParamField body="sku" type="string" required>
      Product SKU.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "sku": "WS-001"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 42,
      "sku": "WS-001",
      "name": "Blue Cotton Shirt",
      "attribute_set_id": 4,
      "price": 29.99,
      "status": 1,
      "visibility": 4,
      "type_id": "simple",
      "created_at": "2025-01-15 10:30:00",
      "updated_at": "2025-03-20 14:22:10",
      "weight": 0.5,
      "extension_attributes": {
        "website_ids": [1],
        "category_links": [
          { "position": 0, "category_id": "5" }
        ],
        "stock_item": {
          "item_id": 42,
          "product_id": 42,
          "stock_id": 1,
          "qty": 150,
          "is_in_stock": true,
          "manage_stock": true
        }
      },
      "media_gallery_entries": [
        {
          "id": 101,
          "media_type": "image",
          "label": "Front view",
          "position": 1,
          "disabled": false,
          "types": ["image", "small_image", "thumbnail"],
          "file": "/w/s/ws-001-front.jpg"
        }
      ],
      "custom_attributes": [
        { "attribute_code": "description", "value": "<p>A comfortable blue cotton shirt.</p>" },
        { "attribute_code": "short_description", "value": "Blue cotton shirt, lightweight and breathable." },
        { "attribute_code": "url_key", "value": "blue-cotton-shirt" },
        { "attribute_code": "meta_title", "value": "Blue Cotton Shirt" }
      ]
    }
    ```
  </Accordion>

  <Accordion title="create-product: Create a product">
    <ParamField body="product" type="object" required>
      Product object with `sku`, `name`, `price`, `attribute_set_id`, `type_id`, etc.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "product": {
        "sku": "WS-002",
        "name": "Red Running Shoes",
        "price": 89.99,
        "attribute_set_id": 4,
        "type_id": "simple",
        "status": 1,
        "visibility": 4,
        "weight": 1.2,
        "extension_attributes": {
          "stock_item": {
            "is_in_stock": true,
            "qty": 200
          }
        },
        "custom_attributes": [
          { "attribute_code": "description", "value": "<p>Lightweight red running shoes.</p>" },
          { "attribute_code": "url_key", "value": "red-running-shoes" }
        ]
      }
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 43,
      "sku": "WS-002",
      "name": "Red Running Shoes",
      "attribute_set_id": 4,
      "price": 89.99,
      "status": 1,
      "visibility": 4,
      "type_id": "simple",
      "created_at": "2025-04-01 09:15:00",
      "updated_at": "2025-04-01 09:15:00",
      "weight": 1.2,
      "extension_attributes": {
        "website_ids": [1],
        "stock_item": {
          "item_id": 43,
          "product_id": 43,
          "stock_id": 1,
          "qty": 200,
          "is_in_stock": true
        }
      },
      "custom_attributes": [
        { "attribute_code": "description", "value": "<p>Lightweight red running shoes.</p>" },
        { "attribute_code": "url_key", "value": "red-running-shoes" }
      ]
    }
    ```
  </Accordion>

  <Accordion title="update-product: Update product by SKU">
    <ParamField body="sku" type="string" required>
      Product SKU.
    </ParamField>

    <ParamField body="product" type="object" required>
      Product fields to update.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "sku": "WS-002",
      "product": {
        "price": 79.99,
        "status": 1,
        "custom_attributes": [
          { "attribute_code": "description", "value": "<p>Lightweight red running shoes, now on sale.</p>" }
        ]
      }
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 43,
      "sku": "WS-002",
      "name": "Red Running Shoes",
      "attribute_set_id": 4,
      "price": 79.99,
      "status": 1,
      "visibility": 4,
      "type_id": "simple",
      "created_at": "2025-04-01 09:15:00",
      "updated_at": "2025-04-01 12:30:45",
      "weight": 1.2
    }
    ```
  </Accordion>

  <Accordion title="delete-product: Delete product by SKU">
    <ParamField body="sku" type="string" required>
      Product SKU.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "sku": "WS-002"
    }
    ```

    **Example response:**

    ```json theme={null}
    true
    ```
  </Accordion>
</AccordionGroup>

### Orders

<AccordionGroup>
  <Accordion title="list-orders: Search/list orders">
    <ParamField body="status" type="string">
      Filter by order status (e.g., `pending`, `processing`, `complete`, `canceled`, `closed`).
    </ParamField>

    <ParamField body="customerEmail" type="string">
      Filter by customer email address.
    </ParamField>

    <ParamField body="createdAfter" type="string">
      Filter orders created after this date (`YYYY-MM-DD HH:MM:SS`).
    </ParamField>

    <ParamField body="createdBefore" type="string">
      Filter orders created before this date (`YYYY-MM-DD HH:MM:SS`).
    </ParamField>

    <ParamField body="minGrandTotal" type="number">
      Filter orders with grand total greater than or equal to this value.
    </ParamField>

    <ParamField body="pageSize" type="number" default="20">
      Number of results per page.
    </ParamField>

    <ParamField body="currentPage" type="number" default="1">
      Page number.
    </ParamField>

    <ParamField body="sortField" type="string">
      Field to sort by (e.g., `created_at`, `grand_total`, `increment_id`).
    </ParamField>

    <ParamField body="sortDir" type="string">
      Sort direction: `ASC` or `DESC`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "status": "processing",
      "pageSize": 5,
      "sortField": "created_at",
      "sortDir": "DESC"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "items": [
        {
          "entity_id": 1001,
          "increment_id": "000000101",
          "state": "processing",
          "status": "processing",
          "store_id": 1,
          "customer_email": "jane@example.com",
          "customer_firstname": "Jane",
          "customer_lastname": "Smith",
          "grand_total": 119.98,
          "subtotal": 109.98,
          "tax_amount": 10.00,
          "shipping_amount": 5.00,
          "total_qty_ordered": 2,
          "base_currency_code": "USD",
          "created_at": "2025-03-28 16:42:00",
          "updated_at": "2025-03-28 17:10:00",
          "items": [
            {
              "item_id": 2001,
              "sku": "WS-001",
              "name": "Blue Cotton Shirt",
              "qty_ordered": 2,
              "price": 29.99,
              "row_total": 59.98
            }
          ],
          "payment": {
            "method": "checkmo",
            "additional_information": []
          }
        }
      ],
      "search_criteria": {
        "filter_groups": [
          { "filters": [{ "field": "status", "value": "processing", "condition_type": "eq" }] }
        ],
        "page_size": 5,
        "current_page": 1
      },
      "total_count": 23
    }
    ```
  </Accordion>

  <Accordion title="get-order: Get order by ID">
    <ParamField body="id" type="number" required>
      Order entity ID.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": 1001
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "entity_id": 1001,
      "increment_id": "000000101",
      "state": "processing",
      "status": "processing",
      "store_id": 1,
      "customer_email": "jane@example.com",
      "customer_firstname": "Jane",
      "customer_lastname": "Smith",
      "grand_total": 119.98,
      "subtotal": 109.98,
      "tax_amount": 10.00,
      "shipping_amount": 5.00,
      "total_qty_ordered": 2,
      "base_currency_code": "USD",
      "created_at": "2025-03-28 16:42:00",
      "items": [
        {
          "item_id": 2001,
          "order_id": 1001,
          "sku": "WS-001",
          "name": "Blue Cotton Shirt",
          "qty_ordered": 2,
          "qty_invoiced": 0,
          "qty_shipped": 0,
          "price": 29.99,
          "row_total": 59.98
        }
      ],
      "billing_address": {
        "firstname": "Jane",
        "lastname": "Smith",
        "street": ["123 Main St"],
        "city": "Austin",
        "region_code": "TX",
        "postcode": "73301",
        "country_id": "US",
        "telephone": "5125551234"
      },
      "payment": {
        "method": "checkmo",
        "additional_information": []
      },
      "extension_attributes": {
        "shipping_assignments": [
          {
            "shipping": {
              "address": {
                "firstname": "Jane",
                "lastname": "Smith",
                "street": ["123 Main St"],
                "city": "Austin",
                "region_code": "TX",
                "postcode": "73301",
                "country_id": "US"
              },
              "method": "flatrate_flatrate"
            },
            "items": []
          }
        ]
      },
      "status_histories": [
        {
          "status": "processing",
          "comment": null,
          "created_at": "2025-03-28 16:42:00"
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="create-invoice: Create invoice">
    <ParamField body="orderId" type="number" required>
      The order entity ID to invoice.
    </ParamField>

    <ParamField body="capture" type="boolean" default="true">
      Whether to capture payment.
    </ParamField>

    <ParamField body="items" type="array">
      Specific items and quantities to invoice. Omit to invoice all items.
    </ParamField>

    <ParamField body="notify" type="boolean" default="false">
      Send invoice email notification to customer.
    </ParamField>

    <ParamField body="comment" type="string">
      Invoice comment.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "orderId": 1001,
      "capture": true,
      "items": [
        { "order_item_id": 2001, "qty": 2 }
      ],
      "notify": true,
      "comment": "Invoice for order #000000101"
    }
    ```

    **Example response:**

    ```json theme={null}
    1501
    ```

    The response is the newly created invoice entity ID.
  </Accordion>

  <Accordion title="create-shipment: Create shipment">
    <ParamField body="orderId" type="number" required>
      The order entity ID to ship.
    </ParamField>

    <ParamField body="items" type="array">
      Specific items and quantities to ship. Omit to ship all items.
    </ParamField>

    <ParamField body="tracks" type="array">
      Tracking information for the shipment.
    </ParamField>

    <ParamField body="notify" type="boolean" default="false">
      Send shipment email notification to customer.
    </ParamField>

    <ParamField body="comment" type="string">
      Shipment comment.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "orderId": 1001,
      "items": [
        { "order_item_id": 2001, "qty": 2 }
      ],
      "tracks": [
        {
          "track_number": "1Z999AA10123456784",
          "title": "UPS",
          "carrier_code": "ups"
        }
      ],
      "notify": true,
      "comment": "Shipped via UPS Ground"
    }
    ```

    **Example response:**

    ```json theme={null}
    1601
    ```

    The response is the newly created shipment entity ID.
  </Accordion>
</AccordionGroup>

### Customers, Inventory & Store

<AccordionGroup>
  <Accordion title="list-customers: Search customers">
    Search customers with filters.
    <ParamField body="email" type="string">Filter by email.</ParamField>
    <ParamField body="firstname" type="string">Filter by first name (uses 'like' matching).</ParamField>
    <ParamField body="lastname" type="string">Filter by last name (uses 'like' matching).</ParamField>
    <ParamField body="groupId" type="number">Filter by customer group ID.</ParamField>
    <ParamField body="createdAfter" type="string">Filter customers created after this date (`YYYY-MM-DD HH:MM:SS`).</ParamField>
    <ParamField body="pageSize" type="number" default="20">Results per page.</ParamField>
    <ParamField body="currentPage" type="number" default="1">Page number.</ParamField>
    <ParamField body="sortField" type="string">Field to sort by (e.g., `email`, `firstname`, `created_at`).</ParamField>
    <ParamField body="sortDir" type="string">Sort direction: `ASC` or `DESC`.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "email": "jane@example.com"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "items": [
        {
          "id": 1,
          "group_id": 1,
          "email": "jane@example.com",
          "firstname": "Jane",
          "lastname": "Smith",
          "store_id": 1,
          "website_id": 1,
          "created_at": "2025-01-10 08:15:00",
          "updated_at": "2025-03-20 11:30:00",
          "addresses": [
            {
              "id": 1,
              "firstname": "Jane",
              "lastname": "Smith",
              "street": ["123 Main St"],
              "city": "Austin",
              "region_id": 57,
              "postcode": "73301",
              "country_id": "US",
              "telephone": "5125551234",
              "default_billing": true,
              "default_shipping": true
            }
          ],
          "extension_attributes": {
            "is_subscribed": false
          }
        }
      ],
      "search_criteria": {
        "filter_groups": [
          { "filters": [{ "field": "email", "value": "jane@example.com", "condition_type": "eq" }] }
        ],
        "page_size": 20,
        "current_page": 1
      },
      "total_count": 1
    }
    ```
  </Accordion>

  <Accordion title="get-customer: Get customer by ID">
    <ParamField body="id" type="number" required>Customer ID.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": 1
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 1,
      "group_id": 1,
      "email": "jane@example.com",
      "firstname": "Jane",
      "lastname": "Smith",
      "store_id": 1,
      "website_id": 1,
      "created_at": "2025-01-10 08:15:00",
      "updated_at": "2025-03-20 11:30:00",
      "addresses": [
        {
          "id": 1,
          "firstname": "Jane",
          "lastname": "Smith",
          "street": ["123 Main St"],
          "city": "Austin",
          "region_id": 57,
          "postcode": "73301",
          "country_id": "US",
          "telephone": "5125551234",
          "default_billing": true,
          "default_shipping": true
        }
      ],
      "extension_attributes": {
        "is_subscribed": false
      }
    }
    ```
  </Accordion>

  <Accordion title="create-customer: Create customer">
    <ParamField body="customer" type="object" required>Customer object with `email`, `firstname`, `lastname`, etc.</ParamField>
    <ParamField body="password" type="string">Customer password (if omitted, customer must reset password).</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "customer": {
        "email": "john@example.com",
        "firstname": "John",
        "lastname": "Doe",
        "website_id": 1,
        "group_id": 1
      },
      "password": "SecurePass123!"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 2,
      "group_id": 1,
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Doe",
      "store_id": 1,
      "website_id": 1,
      "created_at": "2025-04-01 14:00:00",
      "updated_at": "2025-04-01 14:00:00",
      "addresses": [],
      "extension_attributes": {
        "is_subscribed": false
      }
    }
    ```
  </Accordion>

  <Accordion title="get-source-items: Get inventory source items">
    Get inventory levels across sources (MSI - Multi Source Inventory).
    <ParamField body="sku" type="string">Filter by SKU.</ParamField>
    <ParamField body="sourceCode" type="string">Filter by source code (e.g., `default`).</ParamField>
    <ParamField body="pageSize" type="number" default="20">Number of items per page.</ParamField>
    <ParamField body="currentPage" type="number" default="1">Page number.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "sku": "WS-001",
      "sourceCode": "default"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "items": [
        {
          "sku": "WS-001",
          "source_code": "default",
          "quantity": 150,
          "status": 1
        }
      ],
      "search_criteria": {
        "filter_groups": [
          { "filters": [{ "field": "sku", "value": "WS-001", "condition_type": "eq" }] },
          { "filters": [{ "field": "source_code", "value": "default", "condition_type": "eq" }] }
        ],
        "page_size": 20,
        "current_page": 1
      },
      "total_count": 1
    }
    ```
  </Accordion>

  <Accordion title="get-store-config: Get store configuration">
    No parameters required.

    **Example response:**

    ```json theme={null}
    [
      {
        "id": 1,
        "code": "default",
        "website_id": 1,
        "locale": "en_US",
        "base_currency_code": "USD",
        "default_display_currency_code": "USD",
        "timezone": "America/Chicago",
        "weight_unit": "lbs",
        "base_url": "https://mystore.com/",
        "base_link_url": "https://mystore.com/",
        "base_media_url": "https://mystore.com/media/",
        "secure_base_url": "https://mystore.com/",
        "secure_base_link_url": "https://mystore.com/"
      }
    ]
    ```
  </Accordion>
</AccordionGroup>

### Coupons

<AccordionGroup>
  <Accordion title="list-coupons: Search coupon codes">
    Search and list coupon codes with optional filtering by code or rule ID. Returns paginated results.
    <ParamField body="code" type="string">Filter by coupon code (uses 'like' matching).</ParamField>
    <ParamField body="ruleId" type="number">Filter by cart price rule ID.</ParamField>
    <ParamField body="pageSize" type="number" default="20">Number of coupons per page.</ParamField>
    <ParamField body="currentPage" type="number" default="1">Page number.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "code": "SUMMER",
      "pageSize": 5
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "items": [
        {
          "coupon_id": 1,
          "rule_id": 5,
          "code": "SUMMER2025",
          "usage_limit": 100,
          "usage_per_customer": 1,
          "times_used": 12,
          "is_primary": true,
          "created_at": "2025-05-01 00:00:00",
          "type": 0
        }
      ],
      "search_criteria": {
        "filter_groups": [
          { "filters": [{ "field": "code", "value": "%SUMMER%", "condition_type": "like" }] }
        ],
        "page_size": 5,
        "current_page": 1
      },
      "total_count": 3
    }
    ```
  </Accordion>
</AccordionGroup>

### Advanced

<AccordionGroup>
  <Accordion title="raw-rest-request: Execute any REST endpoint">
    Execute any Adobe Commerce REST API endpoint not covered by other tools.

    See the [Adobe Commerce REST API reference](https://developer.adobe.com/commerce/webapi/rest/quick-reference/) for all available endpoints.

    <ParamField body="method" type="string" required>
      HTTP method: `GET`, `POST`, `PUT`, or `DELETE`.
    </ParamField>

    <ParamField body="path" type="string" required>
      Path after `/rest/{storeCode}/V1/` (e.g., `cmsBlock/1` or `products/attribute-sets/sets/list`).
    </ParamField>

    <ParamField body="body" type="object">
      Request body (for POST/PUT).
    </ParamField>

    <ParamField body="queryParams" type="string">
      Query string parameters (without leading `?`).
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "method": "GET",
      "path": "cmsBlock/1"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 1,
      "identifier": "footer-links",
      "title": "Footer Links",
      "content": "<ul><li><a href=\"/about\">About Us</a></li></ul>",
      "creation_time": "2025-01-01 00:00:00",
      "update_time": "2025-02-15 10:30:00",
      "active": true
    }
    ```
  </Accordion>
</AccordionGroup>
