# 88. Mutation: Export ZonesMap as Zipped Shapefile

Generate a zip archive with the selected "ZonesMap" as shapefile.

{% hint style="info" %}
The archive consists of \*.shp, \*.shx, \*.prj, \*.dbf files in EPSG:4326.
{% endhint %}

### 1. Preparation

* The attribute `vectorAnalysisMaps` contains an array of ZonesMaps (VectorAnalysisMaps) objects to be exported. Each such object includes a pair of `fieldUuid` (linkage to the selected Field) and `uuid` (linkage to the selected ZonesMap).
* The boolean attribute `asMultiGeometry` determines whether zones are exported as `Polygons` or `MultiPolygons` (when set to `true` ).
* The boolean attribute `onlyProductColumns` specifies if only columns with products (RX) should be included in the shapefile (when `true`). Otherwise, all statistical attributes and zone IDs will be included as columns.
* The attribute `archiveName` holds the name of the generated zip archive.
* The attribute `filePostfix` allows for custom postfixes to be added to the exported files and archive.

{% code overflow="wrap" lineNumbers="true" %}

```graphql
mutation exportData {
  exportData(
    input: {
      filePostfix:"_GP" 
      vectorAnalysisMaps:[
        {
          uuid:"<placeholder_zones_map_uuid>"
          fieldUuid:"<placeholder_field_uuid>"
        },
        {
          uuid:"<placeholder_zones_map_uuid>"
          fieldUuid:"<placeholder_field_uuid>"
        }
      ]
      asMultiGeometry:true 
      onlyProductColumns:true 
      archiveName:"ArchivedZonesMaps"
    }
  ) {
    archiveUrl
    
    zippedVectorAnalysisMaps {
      uuid
      fieldUuid
      status
    }
    ignoredVectorAnalysisMaps  {
      uuid
      fieldUuid
      status
    } 
  }
}
```

{% endcode %}

### 2. Download the generated archive

After execution of the GraphQL query, it is possible to download it using `curl` or a similar approach.

{% code overflow="wrap" lineNumbers="true" %}

```bash
curl '<archiveUrl>' --compressed >> '<archiveUrl>'
```

{% endcode %}


---

# Agent Instructions: 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.geopard.tech/geopard-tutorials/api-docs/geopard-api-requests-overview/88.-mutation-export-zonesmap-as-zipped-shapefile.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.
