> For the complete documentation index, see [llms.txt](https://docs.zaui.com/zapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaui.com/zapi/zapi-calls/booking/generate-barcode-image.md).

# Generate Barcode Image

## zapiGenerateBarCodeImage

<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. |
| zapiAccountId<mark style="color:red;">\*</mark> | integer | Generated by the supplier system.                                               |
| zapiUserId<mark style="color:red;">\*</mark>    | integer | Generated by the supplier system when a new contact is created.                 |
| methodName<mark style="color:red;">\*</mark>    | string  | The method being called.                                                        |
| bookingNumber<mark style="color:red;">\*</mark> | integer | Confirmation number assigned once booking is confirmed.                         |
| type<mark style="color:red;">\*</mark>          | string  | Either A or a for activity or P or p for product                                |
| productId                                       | integer | ID of the product. Not required when running call based on activityID.          |
| activityDate                                    | integer | The travel date.  Format: YYYY-MM-DD                                            |
| activityId                                      | integer | ID of the activity. Not required when running call based on productID.          |

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

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiGenerateBarCodeImage</methodName>
        <methodErrorCode>0</methodErrorCode>
        <methodErrorMessage>
            <![CDATA[Ok]]>
        </methodErrorMessage>
        <activity>
            <activityName>
                <![CDATA[Canyon Icewalk ]]>
            </activityName>
            <activityId>80</activityId>
            <activityDate>2021-11-29</activityDate>
            <activityTime>00:00:00</activityTime>
            <activityTypeId>500</activityTypeId>
        </activity>
        <passengers>
            <seniors>0</seniors>
            <adults>2</adults>
            <students>0</students>
            <children>0</children>
            <infants>0</infants>
            <passengersAsString>
                <![CDATA[2 (ad)]]>
            </passengersAsString>
        </passengers>
        <categoryName>
            <![CDATA[Canyon Walks]]>
        </categoryName>
        <categoryId>8</categoryId>
        <barCodeImage>https://suppliertestsystem.zaui.net/tmp/ZT40242CanyonIcewalk_2021_11_290868f9c.png</barCodeImage>
    </methodResponse>
</response>
```

{% endtab %}

{% tab title="200: OK Product Response" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiGenerateBarCodeImage</methodName>
        <product>
            <productName>
                <![CDATA[Ski Poles]]>
            </productName>
            <productId>6</productId>
            <productDate/>
            <quantity>2.00</quantity>
            <categoryName>
                <![CDATA[Ski Poles]]>
            </categoryName>
            <categoryId>2</categoryId>
            <barCodeImage>https://suppliertestsystem.zaui.net/tmp/ZT40243SkiPoles_2021_11_23089c0cd.png</barCodeImage>
        </product>
    </methodResponse>
</response>
```

{% endtab %}
{% endtabs %}

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

```xml
<request>
	<zapiToken></zapiToken>
	<zapiAccountId></zapiAccountId>
	<zapiUserId></zapiUserId>
	<zapiMethod>
		<methodName>zapiGenerateBarCodeImage</methodName>
		<bookingNumber></bookingNumber>
		<type></type>
		<activityId></activityId>
		<activityDate></activityDate>
		<productId></productId>
	</zapiMethod>
</request>
```

{% endtab %}

{% tab title="Activity Response" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiGenerateBarCodeImage</methodName>
        <methodErrorCode></methodErrorCode>
        <methodErrorMessage></methodErrorMessage>
        <activity>
            <activityName></activityName>
            <activityId></activityId>
            <activityDate></activityDate>
            <activityTime></activityTime>
            <activityTypeId></activityTypeId>
        </activity>
        <passengers>
            <seniors></seniors>
            <adults></adults>
            <students></students>
            <children></children>
            <infants></infants>
            <passengersAsString></passengersAsString>
        </passengers>
        <categoryName></categoryName>
        <categoryId></categoryId>
        <barCodeImage></barCodeImage>
    </methodResponse>
</response>
```

{% endtab %}

{% tab title="Product Response" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiGenerateBarCodeImage</methodName>
        <product>
            <productName></productName>
            <productId></productId>
            <productDate/>
            <quantity></quantity>
            <categoryName></categoryName>
            <categoryId></categoryId>
            <barCodeImage></barCodeImage>
        </product>
    </methodResponse>
</response>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.zaui.com/zapi/zapi-calls/booking/generate-barcode-image.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.
