> ## Documentation Index
> Fetch the complete documentation index at: https://developer.z-api.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Send order

> Send an order message with catalog or custom products

## Overview

With this method you can send order messages, containing products from your catalog or customized at the time of sending. This message is the same as the one sent when you click the "Accept order" or "Send invoice" button.

<Info>
  Available only for WhatsApp **business** accounts. Products without `productId` are treated as custom items.
</Info>

#### Example on WhatsApp

<div style={{ display: "flex", justifyContent: "center" }}>
  <img src="https://mintcdn.com/z-api-8aa3bb40/nNYp_QHy_iUs4_xM/images/send-order-eng.jpeg?fit=max&auto=format&n=nNYp_QHy_iUs4_xM&q=85&s=7fbe7435bccbb016b2f07b3858518140" width="400" data-path="images/send-order-eng.jpeg" />
</div>

***

## Attributes

### Header

<ParamField path="instanceId" type="string" required>
  Your instance ID. Available in the Z-API panel under **Instances**.
</ParamField>

<ParamField path="token" type="string" required>
  Your Z-API instance token.
</ParamField>

### Required

<ParamField body="phone" type="string" required>
  Recipient's phone number in DDI DDD NUMBER format. E.g.: 551199999999
</ParamField>

<ParamField body="order" type="object" required>
  Order data

  <Expandable title="Properties">
    <ParamField body="currency" type="string" required>
      Currency code (e.g.: BRL)
    </ParamField>

    <ParamField body="products" type="array" required>
      Product information related to the order

      <Expandable title="Properties">
        <ParamField body="name" type="string" required>
          Product name
        </ParamField>

        <ParamField body="value" type="number" required>
          Product value
        </ParamField>

        <ParamField body="quantity" type="number" required>
          Quantity
        </ParamField>

        <ParamField body="productId" type="string">
          Catalog product ID
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="discount" type="number">
      Discount amount
    </ParamField>

    <ParamField body="tax" type="number">
      Tax amount
    </ParamField>

    <ParamField body="shipping" type="number">
      Shipping amount
    </ParamField>
  </Expandable>
</ParamField>

### Optional

<ParamField body="paymentSettings" type="object">
  Payment settings

  <Expandable title="Properties">
    <ParamField body="pix" type="object">
      PIX settings

      <Expandable title="Properties">
        <ParamField body="key" type="string">
          PIX key
        </ParamField>

        <ParamField body="keyType" type="string">
          Key type: `cpf`, `cnpj`, `phone`, `email` or `randomKey`
        </ParamField>

        <ParamField body="name" type="string">
          Key name
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="card" type="object">
      Card settings

      <Expandable title="Properties">
        <ParamField body="enabled" type="boolean">
          Enable card payment
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

***

## Request Body

**With catalog products and payment:**

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "phone": "554499999999",
  "order": {
    "currency": "BRL",
    "discount": 10,
    "tax": 10,
    "shipping": 5,
    "products": [
      {
        "productId": "23940797548900636",
        "name": "Product name",
        "value": 10,
        "quantity": 2
      }
    ]
  },
  "paymentSettings": {
    "pix": {
      "key": "PIX Key",
      "keyType": "cpf",
      "name": "Key name"
    },
    "card": {
      "enabled": true
    }
  }
}
```

**Required fields only (custom product):**

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "phone": "554499999999",
  "order": {
    "currency": "BRL",
    "products": [
      {
        "name": "Product name",
        "value": 150,
        "quantity": 1
      }
    ]
  }
}
```

***

## Response

### 200

```json theme={"theme":{"light":"github-light","dark":"poimandres"}}
{
  "zaapId": "3999984263738042930CD6ECDE9VDWSA",
  "messageId": "D241XXXX732339502B68",
  "id": "D241XXXX732339502B68"
}
```

### 405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

### 415

If you receive a 415 error, make sure to add the "Content-Type" header to your request, which in most cases is "application/json".
