# Product by Name

## zapiGetAllMerchandiseByName

<mark style="color:blue;">`GET`</mark> `https://{yourdomainname}.zaui.net/zapi/`

#### Request Body

| Name                                                  | Type    | Description                                                                     |
| ----------------------------------------------------- | ------- | ------------------------------------------------------------------------------- |
| zapiToken<mark style="color:red;">\*</mark>           | integer | Token that must be used for a reseller to communicate with the supplier system. |
| productNameToSearch<mark style="color:red;">\*</mark> | string  | Name of the product to search against.                                          |
| methodName<mark style="color:red;">\*</mark>          | string  | The method being called.                                                        |
| zapiUserId<mark style="color:red;">\*</mark>          | integer | Generated by the supplier system when a new contact is created.                 |
| zapiAccountId<mark style="color:red;">\*</mark>       | integer | Generated by the supplier system.                                               |

{% tabs %}
{% tab title="200: OK " %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiGetAllMerchandiseByName</methodName>
        <methodErrorCode>0</methodErrorCode>
        <methodErrorMessage/>
        <products>
            <product>
                <listPrice>$5.00</listPrice>
                <productId>6</productId>
                <productName>Ski Poles</productName>
                <inventory>-2</inventory>
                <image/>
                <categoryId>2</categoryId>
                <categoryName>Ski Poles</categoryName>
            </product>
        </products>
    </methodResponse>
</response>
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Request" %}

```xml
<request>
	<zapiToken></zapiToken>
	<zapiAccountId></zapiAccountId>
	<zapiUserId></zapiUserId>
	<zapiMethod>
		<methodName>zapiGetAllMerchandiseByName</methodName>
		<productNameToSearch></productNameToSearch>
	</zapiMethod>
</request>
```

{% endtab %}

{% tab title="Response" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
	<zapiVersion>2.0</zapiVersion>
	<error>0</error>
	<message>OK</message>
	<methodResponse>
		<methodName>zapiGetAllMerchandiseByName</methodName>
		<methodErrorCode>0</methodErrorCode>
		<methodErrorMessage></methodErrorMessage>
		<products>
			<product>
				<productId></productId>
				<imageURL></imageURL>
				<listPrice></listPrice>
				<categoryId></categoryId>
				<categoryName></categoryName>
			</product>
			<product>
				<productId></productId>
				<imageURL></imageURL>
				<listPrice></listPrice>
				<categoryId></categoryId>
				<categoryName></categoryName>
			</product>
		</products>
	</methodResponse>
</response>
```

{% endtab %}
{% endtabs %}
