---
updatedAt: 2026-07-23T18:19:29.000Z
---

# Download tax form PDF

Use **Download tax form** to download a 1099-K PDF for a given payout year. Provide the `formId` you received from the **Get tax forms** API. The API returns JSON metadata plus a base64-encoded PDF payload that you can decode and save.

# How it works

1. Call the endpoint with all required headers and query parameters: `payoutYear`, `taxFormType` (= `1099-K`), and `formId`.
2. On success, the response includes file metadata and `fileContent` (Base64 string).
3. Decode `fileContent` to bytes and write a `.pdf` file.
4. Handle `400`, `404`, `502`, and `500` per the table below.

# Endpoint

```Text bash
GET https://marketplace.walmartapis.com/v1/settings/downloadtaxformprofile
```

## Query parameters

| Name          | Type              | Required | Description                                                            |
| ------------- | ----------------- | -------: | ---------------------------------------------------------------------- |
| `payoutYear`  | integer or string |      Yes | The tax year associated with the payout. For example `2024`.           |
| `taxFormType` | string            |      Yes | The tax form type to download. For example `1099-K`.                   |
| `formId`      | string            |      Yes | Unique ID returned by the **Get tax forms** API. For example, `42303`. |

# Request sample

```curl
curl -G "https://marketplace.walmartapis.com/v1/settings/downloadtaxformprofile" \
  -H "WM_SEC.ACCESS_TOKEN: <redacted>" \
  -H "WM_QOS.CORRELATION_ID: b3261d2d-028a-4ef7-8602-633c23200af6" \
  -H "WM_SVC.NAME: Walmart Marketplace" \
  -H "WM.PARTNER_ID: 10011478510" \
  -H "WM.TENANT_ID: 0" \
  -H "WM_CONSUMER.CHANNEL.TYPE: <your-channel-id>" \
  -H "Accept: application/json" \
  --data-urlencode "payoutYear=2024" \
  --data-urlencode "taxFormType=1099-K" \
  --data-urlencode "formId=484302"
```
```python
import requests

url = "https://marketplace.walmartapis.com/v1/settings/downloadtaxformprofile"

# Query parameters (equivalent to --data-urlencode entries)
params = {
    "payoutYear": "2024",
    "taxFormType": "1099-K",
    "formId": "42303",
}

# Headers from your curl command
headers = {
    "WM_SEC.ACCESS_TOKEN": "<redacted>",  # Replace with your actual token
    "WM_QOS.CORRELATION_ID": "b3261d2d-028a-4ef7-8602-633c23200af6",
    "WM_SVC.NAME": "Walmart Marketplace",
    "WM.PARTNER_ID": "10011478510",
    "WM.TENANT_ID": "0",
    "WM_CONSUMER.CHANNEL.TYPE": "<your-channel-id>",  # Replace with your channel ID
    "Accept": "application/json",  # As in your curl; change to 'application/octet-stream' to download a file
}

try:
    # timeout keeps the call from hanging; adjust as needed
    resp = requests.get(url, headers=headers, params=params, timeout=30)
    resp.raise_for_status()

    # Attempt to parse JSON since Accept=application/json
    try:
        data = resp.json()
        print("Status Code:", resp.status_code)
        print("Response JSON:", data)
    except ValueError:
        # If not JSON, show raw text (or handle as binary if expected)
        print("Status Code:", resp.status_code)
        print("Response Text:", resp.text)

except requests.exceptions.HTTPError as e:
    print("HTTP error:", e)
    print("Response body:", getattr(resp, "text", ""))
except requests.exceptions.Timeout:
    print("Request timed out")
except requests.exceptions.RequestException as e:
    print("Request error:", e)

```

## Modify your code

Follow these steps to turn the sample into a working download.

1. **Use values from Get tax forms**:

* Set `payoutYear` to a year present in `paymentProcessorSummary[].payoutYear`.
* Set `formId` to the `taxForms[].formId` for that year.
* Set `taxFormType` to `1099-K`.

2. **Confirm headers**: Use a fresh access token in `WM_SEC.ACCESS_TOKEN`. Generate a new GUID for `WM_QOS.CORRELATION_ID`.
3. **Decode the file**:The response includes `fileContent` as base64. Decode it and save to a PDF file using `fileName`.
4. **Validate inputs**: If you receive `400 invalid_parameters`, recheck `payoutYear`, `taxFormType`, and `formId`. Ensure `payoutYear` is a 4-digit year and `taxFormType` is `1099-K`.
5. **Handle missing data**: If you receive `404 report_not_found`, call \*\*[Get tax forms](/us-marketplace/docs/get-tax-forms) \*\*again and verify the year actually contains a `1099-K` form.
6. **Plan for transient errors**: For `502 sovos_downstream_error` or `500 internal_error`, implement retries with backoff.

# Response sample

`200 OK`

```json JSON
{
  "partnerId": "10011478510",
  "payoutYear": 2024,
  "taxFormType": "1099-K",
  "fileName": "taxform-2024-1099-K.pdf",
  "contentType": "application/pdf",
"Content-Disposition": "attachment",   "fileContent": "<base64-encoded-pdf-string>"
}
```

## Using the payload

* Decode `fileContent` from base64 and save the file using `fileName`.\
  Example in bash:

```bash
jq -r '.fileContent' response.json | base64 --decode > taxform-2024-1099-K.pdf
```

## Errors and remediation

| HTTP status | Error message                            | Description                                                         | Recommended action                                                                                                                                                                                       |
| ----------- | ---------------------------------------- | :------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400         | Missing mandatory input parameters       | One or more required headers or parameters were not provided.       | Check all required headers, especially authentication and tenant/partner fields; ensure **all required query params** are present and valid, and resend the request.                                     |
| 404         | No record found for the given parameters | No tax form data matches the provided partner, tenant, or `formId`. | Re-check that `formId` corresponds to the selected `payoutYear` and `taxFormType=1099-K`. If needed, call the [Get tax forms API](/us-marketplace/docs/get-tax-forms)  again and pick another year/form. |
| 502         | Error calling downstream service         | The downstream PDF provider returned an error.                      | Treat as transient. Retry with exponential backoff; contact Partner Support with the correlation ID if persistent.                                                                                       |

# Result

The service returns the PDF file of the 1099-K tax form.

# Next steps

* Store PDFs securely and log `WM_QOS.CORRELATION_ID`, `WM.PARTNER_ID`, and `WM.TENANT_ID` with each request.

### Related links

* **[Tax Forms API Guide](/us-marketplace/docs/tax-forms-apis-overview)**
* **Get Tax Forms API Reference**