> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Order

> Event payload details and trigger documentation for Order data from Boulevard

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/boulevard.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=3132db68030a6f6a3810249eb938cae0" alt="images/boulevard.svg" width="24" height="24" data-path="images/boulevard.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Order event payload from Boulevard.

* `Boulevard Order Completed`
* `Boulevard Order Refund Closed`

<RequestExample>
  ```json Example theme={null}
  {
    "applied_vouchers": [
      {
        "id": "urn:blvd:OrderVoucher:voucher123",
        "voucher": {
          "expires_on": "2024-12-31",
          "id": "urn:blvd:Voucher:voucher123",
          "redeemed_at": "2024-03-15T10:00:00Z",
          "services": [
            {
              "category": {
                "id": "urn:blvd:ServiceCategory:category123",
                "name": "Massage Therapy"
              },
              "created_at": "2024-01-01T00:00:00Z",
              "description": "60-minute therapeutic massage",
              "id": "urn:blvd:Service:service123",
              "is_active": true,
              "name": "Deep Tissue Massage",
              "updated_at": "2024-03-01T00:00:00Z"
            }
          ]
        }
      }
    ],
    "client": {
      "email_address": "jane.smith@email.com",
      "first_name": "Jane",
      "id": "urn:blvd:Client:client123",
      "last_name": "Smith",
      "phone_number": "+15551234567"
    },
    "closed_at": "2024-03-15T12:00:00Z",
    "closed_by": {
      "email_address": "sarah.johnson@spa.com",
      "first_name": "Sarah",
      "id": "urn:blvd:Staff:staff123",
      "last_name": "Johnson",
      "phone_number": "+15551234567",
      "role_name": "Massage Therapist"
    },
    "created_at": "2024-03-01T09:00:00Z",
    "fee_lines": [
      {
        "absolute_amount_cents": 500,
        "calculated_amount_cents": 500,
        "calculated_tax_amount_cents": 45,
        "id": "urn:blvd:OrderFeeLine:fee123",
        "label": "Processing Fee",
        "percentage_amount": 3.5,
        "refunds": [
          {
            "id": "urn:blvd:FeeLineRefund:refund123",
            "order_refund_id": "urn:blvd:OrderRefund:refund123",
            "refund_amount_cents": 500,
            "refunded_at": "2024-03-20T14:30:00Z"
          }
        ],
        "type": "ORDER_FEE_TYPE_BLVD_OFFSET"
      }
    ],
    "id": "urn:blvd:Order:order123",
    "line_groups": [
      {
        "id": "urn:blvd:OrderLineGroup:group123",
        "lines": [
          {
            "current_discount_amount_cents": 0,
            "current_price_cents": 15000,
            "current_subtotal_cents": 15000,
            "discounts": [
              {
                "description": "First Time Client Discount",
                "discount_amount_cents": 1500,
                "discount_percentage": 10,
                "discount_reason": {
                  "id": "urn:blvd:DiscountReason:reason123",
                  "is_hidden": false,
                  "name": "First Time Client"
                },
                "id": "urn:blvd:OrderDiscount:discount123"
              }
            ],
            "id": "urn:blvd:OrderLine:line123",
            "initial_discount_amount_cents": 0,
            "initial_price_cents": 15000,
            "initial_subtotal_cents": 15000,
            "quantity": 1
          }
        ]
      }
    ],
    "location": {
      "address": {
        "city": "San Francisco",
        "country": "US",
        "line1": "1 Acacia Ave.",
        "line2": "Apt 3a.",
        "province": "Alberta",
        "state": "CA",
        "zip_code": "94117"
      },
      "external_id": "LOC001",
      "id": "urn:blvd:Location:loc123",
      "is_remote": false,
      "name": "Downtown Spa",
      "timezone": "America/New_York"
    },
    "note": "Birthday celebration package",
    "number": "ORD-2024-001234",
    "payment_groups": [
      {
        "id": "urn:blvd:OrderPaymentGroup:group123",
        "is_independent_merchant": false,
        "merchant_id": "merchant123",
        "merchant_name": "Downtown Spa",
        "payments": [
          {
            "id": "urn:blvd:OrderPayment:payment123",
            "merchant_id": "merchant123",
            "order_id": "urn:blvd:Order:order123",
            "paid_amount_cents": 17850,
            "payment_method_label": "Visa ending in 1234",
            "refund_amount_cents": 0,
            "refunds": [
              {
                "id": "urn:blvd:OrderPaymentRefund:refund123",
                "is_full_refund": true,
                "refund_amount_cents": 17850,
                "refund_id": "refund123",
                "refunded_at": "2024-03-20T14:30:00Z"
              }
            ]
          }
        ],
        "total_cents": 17850,
        "total_fees_cents": 500,
        "total_paid_cents": 17850,
        "total_unpaid_cents": 0
      }
    ],
    "refunds": [
      {
        "closed_at": "2024-03-20T14:30:00Z",
        "closed_by": {
          "email_address": "sarah.johnson@spa.com",
          "first_name": "Sarah",
          "id": "urn:blvd:Staff:staff123",
          "last_name": "Johnson",
          "phone_number": "+15551234567",
          "role_name": "Massage Therapist"
        },
        "created_at": "2024-03-20T14:00:00Z",
        "id": "urn:blvd:OrderRefund:refund123",
        "number": "REF-2024-001234",
        "payments": [
          {
            "id": "urn:blvd:OrderRefundPayment:payment123",
            "order_payment_id": "urn:blvd:OrderPayment:payment123",
            "refund_amount_cents": 15000,
            "refund_limit_cents": 15000
          }
        ],
        "refund_reason": "ORDER_REFUND_REASON_CUSTOMER_REQUEST",
        "refund_reason_text": "Customer changed mind",
        "status": "ORDER_REFUND_STATUS_CLOSED",
        "summary": {
          "refund_amount_cents": 15000,
          "refund_tax_cents": 1350,
          "refund_total_cents": 16350
        },
        "updated_at": "2024-03-20T14:30:00Z"
      }
    ],
    "summary": {
      "current_discount_amount_cents": 1500,
      "current_fee_amount_cents": 500,
      "current_gratuity_amount_cents": 2000,
      "current_subtotal_cents": 15000,
      "current_tax_amount_cents": 1350,
      "current_total_cents": 17850,
      "initial_discount_amount_cents": 1500,
      "initial_fee_amount_cents": 500,
      "initial_gratuity_amount_cents": 2000,
      "initial_subtotal_cents": 15000,
      "initial_tax_amount_cents": 1350,
      "initial_total_cents": 17850,
      "refund_amount_cents": 0
    },
    "updated_at": "2024-03-15T11:30:00Z"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "applied_vouchers": {
      "id": "Unique identifier for the order voucher.",
      "voucher": {
        "expires_on": "The date when the voucher expires.",
        "id": "Unique identifier for the voucher.",
        "redeemed_at": "When the Voucher was redeemed.",
        "services": {
          "category": {
            "id": "Unique identifier for the service category.",
            "name": "Name of the service category."
          },
          "created_at": "The date and time when the service was created.",
          "description": "Description of the service.",
          "id": "Unique identifier for the service.",
          "is_active": "Whether the service is active.",
          "name": "Name of the service.",
          "updated_at": "The date and time when the service was last updated."
        }
      }
    },
    "client": {
      "email_address": "Client's email address.",
      "first_name": "Client's first name.",
      "id": "Unique identifier for the client in the Boulevard system.",
      "last_name": "Client's last name.",
      "phone_number": "Client's mobile phone number."
    },
    "closed_at": "The date and time when the order was closed.",
    "closed_by": {
      "email_address": "Email address of the staff member.",
      "first_name": "First name of the staff member.",
      "id": "Unique identifier for the staff member.",
      "last_name": "Last name of the staff member.",
      "phone_number": "Mobile phone number of the staff member.",
      "role_name": "Name of the staff member's role."
    },
    "created_at": "The date and time when the order was created.",
    "fee_lines": {
      "absolute_amount_cents": "Absolute amount for the fee in cents. Null if percentage_amount is set.",
      "calculated_amount_cents": "Current calculated amount for the fee in cents.",
      "calculated_tax_amount_cents": "Current calculated tax amount for the fee in cents.",
      "id": "Unique identifier for the fee line.",
      "label": "Human-readable fee label.",
      "percentage_amount": "Percentage amount for the fee. Null if absolute_amount_cents is set.",
      "refunds": {
        "id": "Unique identifier for the fee line refund.",
        "order_refund_id": "ID of the order refund the fee was refunded on.",
        "refund_amount_cents": "Amount of the fee refunded in cents.",
        "refunded_at": "When the fee was refunded."
      },
      "type": "Machine-readable fee type."
    },
    "id": "Unique identifier for the order in the Boulevard system.",
    "line_groups": {
      "id": "Unique identifier for the line group.",
      "lines": {
        "current_discount_amount_cents": "Current discount amount in cents.",
        "current_price_cents": "Current price in cents.",
        "current_subtotal_cents": "Current subtotal in cents.",
        "discounts": {
          "description": "Description of the discount.",
          "discount_amount_cents": "Discount amount in cents.",
          "discount_percentage": "Discount percentage, if applicable.",
          "discount_reason": {
            "id": "Unique identifier for the discount reason.",
            "is_hidden": "Whether the discount reason is hidden.",
            "name": "Name of the discount reason."
          },
          "id": "Unique identifier for the discount."
        },
        "id": "Unique identifier for the order line.",
        "initial_discount_amount_cents": "Initial discount amount in cents.",
        "initial_price_cents": "Initial price in cents.",
        "initial_subtotal_cents": "Initial subtotal in cents.",
        "quantity": "Quantity of the item."
      }
    },
    "location": {
      "address": {
        "city": "City of the Address",
        "country": "Country for the Address.",
        "line1": "Line 1 of the Address",
        "line2": "Line 2 of the Address",
        "province": "Province of the Address.",
        "state": "State of the Address.",
        "zip_code": "Zip (postal) code for the Address."
      },
      "external_id": "External identifier for the location.",
      "id": "Unique identifier for the location.",
      "is_remote": "Indicates that the location is a remote location, and that appointments for this location are carried out remotely.",
      "name": "Name of the location.",
      "timezone": "Timezone associated with the location."
    },
    "note": "An optional note tied to the order.",
    "number": "Unique order number for the business.",
    "payment_groups": {
      "id": "Unique identifier for the payment group.",
      "is_independent_merchant": "Whether this is an independent merchant.",
      "merchant_id": "ID of the merchant.",
      "merchant_name": "Name of the merchant.",
      "payments": {
        "id": "Unique identifier for the payment.",
        "merchant_id": "ID of the merchant.",
        "order_id": "ID of the order.",
        "paid_amount_cents": "Amount paid in cents.",
        "payment_method_label": "Human-readable label for the payment method.",
        "refund_amount_cents": "The total amount refunded, if any, in cents.",
        "refunds": {
          "id": "Unique identifier for the payment refund.",
          "is_full_refund": "Whether this is a full refund.",
          "refund_amount_cents": "Amount refunded in cents.",
          "refund_id": "ID of the refund.",
          "refunded_at": "When the refund was processed."
        }
      },
      "total_cents": "Total amount for this payment group in cents.",
      "total_fees_cents": "Total fees for this payment group in cents.",
      "total_paid_cents": "Total paid for this payment group in cents.",
      "total_unpaid_cents": "Total unpaid for this payment group in cents."
    },
    "refunds": {
      "closed_at": "When the refund was closed.",
      "closed_by": {
        "email_address": "Email address of the staff member.",
        "first_name": "First name of the staff member.",
        "id": "Unique identifier for the staff member.",
        "last_name": "Last name of the staff member.",
        "phone_number": "Mobile phone number of the staff member.",
        "role_name": "Name of the staff member's role."
      },
      "created_at": "The date and time when the order refund was created.",
      "id": "Unique identifier for the order refund.",
      "number": "Refund number.",
      "payments": {
        "id": "Unique identifier for the refund payment.",
        "order_payment_id": "When this payment is one of the original payments on the order, this ID is present and can be used to read more information on the payment.",
        "refund_amount_cents": "Total amount to be refunded to this payment method, including any tax, in cents.",
        "refund_limit_cents": "Maximum amount that can be refunded to this payment method in cents."
      },
      "refund_reason": "Value that describes why this refund was made. When the reason is OTHER, refund_reason_text should also be set.",
      "refund_reason_text": "Additional description, usually available when the refund reason is OTHER.",
      "status": "Closed status of the refund.",
      "summary": {
        "refund_amount_cents": "Total refund amount in cents.",
        "refund_tax_cents": "Refund tax amount in cents.",
        "refund_total_cents": "Total refund including tax in cents."
      },
      "updated_at": "The date and time when the order refund was last updated."
    },
    "summary": {
      "current_discount_amount_cents": "Current discount amount in cents.",
      "current_fee_amount_cents": "Current fee amount in cents.",
      "current_gratuity_amount_cents": "Current gratuity amount in cents.",
      "current_subtotal_cents": "Current subtotal in cents.",
      "current_tax_amount_cents": "Current tax amount in cents.",
      "current_total_cents": "Current total amount in cents.",
      "initial_discount_amount_cents": "Initial discount amount in cents.",
      "initial_fee_amount_cents": "Initial fee amount in cents.",
      "initial_gratuity_amount_cents": "Initial gratuity amount in cents.",
      "initial_subtotal_cents": "Initial subtotal in cents.",
      "initial_tax_amount_cents": "Initial tax amount in cents.",
      "initial_total_cents": "Initial total amount in cents.",
      "refund_amount_cents": "Total refund amount in cents."
    },
    "updated_at": "The date and time when the order was last updated."
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Order" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      `ID` Unique identifier for the order in the Boulevard system.

      ```json CEL theme={null}
      id
      ```

      ```json Example theme={null}
      "urn:blvd:Order:order123"
      ```
    </ResponseField>

    <ResponseField name="number" type="string" required>
      Unique order number for the business.

      ```json CEL theme={null}
      number
      ```

      ```json Example theme={null}
      "ORD-2024-001234"
      ```
    </ResponseField>

    <ResponseField name="note" type="string">
      `HI` An optional note tied to the order.

      ```json CEL theme={null}
      note
      ```

      ```json Example theme={null}
      "Birthday celebration package"
      ```
    </ResponseField>

    <ResponseField name="summary" type="object">
      Summary financial information for the order.

      ```json CEL theme={null}
      summary
      ```

      ```json Example theme={null}
      {
      "current_discount_amount_cents": 1500,
      "current_fee_amount_cents": 500,
      "current_gratuity_amount_cents": 2000,
      "current_subtotal_cents": 15000,
      "current_tax_amount_cents": 1350,
      "current_total_cents": 17850,
      "initial_discount_amount_cents": 1500,
      "initial_fee_amount_cents": 500,
      "initial_gratuity_amount_cents": 2000,
      "initial_subtotal_cents": 15000,
      "initial_tax_amount_cents": 1350,
      "initial_total_cents": 17850,
      "refund_amount_cents": 0
      }
      ```
    </ResponseField>

    <ResponseField name="summary.current_discount_amount_cents" type="int64">
      Current discount amount in cents.

      ```json CEL theme={null}
      summary.current_discount_amount_cents
      ```

      ```json Example theme={null}
      1500
      ```
    </ResponseField>

    <ResponseField name="summary.current_fee_amount_cents" type="int64">
      Current fee amount in cents.

      ```json CEL theme={null}
      summary.current_fee_amount_cents
      ```

      ```json Example theme={null}
      500
      ```
    </ResponseField>

    <ResponseField name="summary.current_gratuity_amount_cents" type="int64">
      Current gratuity amount in cents.

      ```json CEL theme={null}
      summary.current_gratuity_amount_cents
      ```

      ```json Example theme={null}
      2000
      ```
    </ResponseField>

    <ResponseField name="summary.current_subtotal_cents" type="int64">
      Current subtotal in cents.

      ```json CEL theme={null}
      summary.current_subtotal_cents
      ```

      ```json Example theme={null}
      15000
      ```
    </ResponseField>

    <ResponseField name="summary.current_tax_amount_cents" type="int64">
      Current tax amount in cents.

      ```json CEL theme={null}
      summary.current_tax_amount_cents
      ```

      ```json Example theme={null}
      1350
      ```
    </ResponseField>

    <ResponseField name="summary.current_total_cents" type="int64">
      Current total amount in cents.

      ```json CEL theme={null}
      summary.current_total_cents
      ```

      ```json Example theme={null}
      17850
      ```
    </ResponseField>

    <ResponseField name="summary.initial_discount_amount_cents" type="int64">
      Initial discount amount in cents.

      ```json CEL theme={null}
      summary.initial_discount_amount_cents
      ```

      ```json Example theme={null}
      1500
      ```
    </ResponseField>

    <ResponseField name="summary.initial_fee_amount_cents" type="int64">
      Initial fee amount in cents.

      ```json CEL theme={null}
      summary.initial_fee_amount_cents
      ```

      ```json Example theme={null}
      500
      ```
    </ResponseField>

    <ResponseField name="summary.initial_gratuity_amount_cents" type="int64">
      Initial gratuity amount in cents.

      ```json CEL theme={null}
      summary.initial_gratuity_amount_cents
      ```

      ```json Example theme={null}
      2000
      ```
    </ResponseField>

    <ResponseField name="summary.initial_subtotal_cents" type="int64">
      Initial subtotal in cents.

      ```json CEL theme={null}
      summary.initial_subtotal_cents
      ```

      ```json Example theme={null}
      15000
      ```
    </ResponseField>

    <ResponseField name="summary.initial_tax_amount_cents" type="int64">
      Initial tax amount in cents.

      ```json CEL theme={null}
      summary.initial_tax_amount_cents
      ```

      ```json Example theme={null}
      1350
      ```
    </ResponseField>

    <ResponseField name="summary.initial_total_cents" type="int64">
      Initial total amount in cents.

      ```json CEL theme={null}
      summary.initial_total_cents
      ```

      ```json Example theme={null}
      17850
      ```
    </ResponseField>

    <ResponseField name="summary.refund_amount_cents" type="int64">
      Total refund amount in cents.

      ```json CEL theme={null}
      summary.refund_amount_cents
      ```

      ```json Example theme={null}
      0
      ```
    </ResponseField>

    <ResponseField name="applied_vouchers" type="[]object" required>
      Vouchers applied on this order.

      ```json CEL theme={null}
      applied_vouchers
      ```

      ```json Example theme={null}
      [
      {
      "id": "urn:blvd:OrderVoucher:voucher123",
      "voucher": {
      "expires_on": "2024-12-31",
      "id": "urn:blvd:Voucher:voucher123",
      "redeemed_at": "2024-03-15T10:00:00Z",
      "services": [
        {
          "category": {
            "id": "urn:blvd:ServiceCategory:category123",
            "name": "Massage Therapy"
          },
          "created_at": "2024-01-01T00:00:00Z",
          "description": "60-minute therapeutic massage",
          "id": "urn:blvd:Service:service123",
          "is_active": true,
          "name": "Deep Tissue Massage",
          "updated_at": "2024-03-01T00:00:00Z"
        }
      ]
      }
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="applied_vouchers.map(x, x.id)" type="[]string" required>
      `ID` Mapped array of: Unique identifier for the order voucher.

      ```json CEL theme={null}
      applied_vouchers.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "urn:blvd:OrderVoucher:voucher123"
      ]
      ```
    </ResponseField>

    <ResponseField name="applied_vouchers.map(x, x.voucher)" type="[]bool" required>
      Mapped array of: The voucher details.

      ```json CEL theme={null}
      applied_vouchers.map(x, x.voucher)
      ```

      ```json Example theme={null}
      [
      {
      "expires_on": "2024-12-31",
      "id": "urn:blvd:Voucher:voucher123",
      "redeemed_at": "2024-03-15T10:00:00Z",
      "services": [
      {
        "category": {
          "id": "urn:blvd:ServiceCategory:category123",
          "name": "Massage Therapy"
        },
        "created_at": "2024-01-01T00:00:00Z",
        "description": "60-minute therapeutic massage",
        "id": "urn:blvd:Service:service123",
        "is_active": true,
        "name": "Deep Tissue Massage",
        "updated_at": "2024-03-01T00:00:00Z"
      }
      ]
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="client" type="object">
      The client associated with the order.

      ```json CEL theme={null}
      client
      ```

      ```json Example theme={null}
      {
      "email_address": "jane.smith@email.com",
      "first_name": "Jane",
      "id": "urn:blvd:Client:client123",
      "last_name": "Smith",
      "phone_number": "+15551234567"
      }
      ```
    </ResponseField>

    <ResponseField name="client.id" type="string">
      `ID` Unique identifier for the client in the Boulevard system.

      ```json CEL theme={null}
      client.id
      ```

      ```json Example theme={null}
      "urn:blvd:Client:client123"
      ```
    </ResponseField>

    <ResponseField name="client.first_name" type="string">
      `PII` Client's first name.

      ```json CEL theme={null}
      client.first_name
      ```

      ```json Example theme={null}
      "Jane"
      ```
    </ResponseField>

    <ResponseField name="client.last_name" type="string">
      `PII` Client's last name.

      ```json CEL theme={null}
      client.last_name
      ```

      ```json Example theme={null}
      "Smith"
      ```
    </ResponseField>

    <ResponseField name="client.email_address" type="string">
      `PII` Client's email address.

      ```json CEL theme={null}
      client.email_address
      ```

      ```json Example theme={null}
      "jane.smith@email.com"
      ```
    </ResponseField>

    <ResponseField name="client.phone_number" type="string">
      `PII` Client's mobile phone number.

      ```json CEL theme={null}
      client.phone_number
      ```

      ```json Example theme={null}
      "+15551234567"
      ```
    </ResponseField>

    <ResponseField name="fee_lines" type="[]object" required>
      Fee lines applied to the order.

      ```json CEL theme={null}
      fee_lines
      ```

      ```json Example theme={null}
      [
      {
      "absolute_amount_cents": 500,
      "calculated_amount_cents": 500,
      "calculated_tax_amount_cents": 45,
      "id": "urn:blvd:OrderFeeLine:fee123",
      "label": "Processing Fee",
      "percentage_amount": 3.5,
      "refunds": [
      {
        "id": "urn:blvd:FeeLineRefund:refund123",
        "order_refund_id": "urn:blvd:OrderRefund:refund123",
        "refund_amount_cents": 500,
        "refunded_at": "2024-03-20T14:30:00Z"
      }
      ],
      "type": "ORDER_FEE_TYPE_BLVD_OFFSET"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.id)" type="[]string" required>
      `ID` Mapped array of: Unique identifier for the fee line.

      ```json CEL theme={null}
      fee_lines.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "urn:blvd:OrderFeeLine:fee123"
      ]
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.label)" type="[]string" required>
      Mapped array of: Human-readable fee label.

      ```json CEL theme={null}
      fee_lines.map(x, x.label)
      ```

      ```json Example theme={null}
      [
      "Processing Fee"
      ]
      ```
    </ResponseField>

    <ResponseField name="type" type="boulevard.v1.OrderFeeType">
      Mapped array of: Machine-readable fee type.

      ```json CEL theme={null}
      type
      ```

      ```json Example theme={null}
      boulevard.v1.OrderFeeType.ORDER_FEE_TYPE_BLVD_OFFSET
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.absolute_amount_cents)" type="[]int64" required>
      Mapped array of: Absolute amount for the fee in cents. Null if percentage\_amount is set.

      ```json CEL theme={null}
      fee_lines.map(x, x.absolute_amount_cents)
      ```

      ```json Example theme={null}
      [
      500
      ]
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.percentage_amount)" type="[]float64 (double)" required>
      Mapped array of: Percentage amount for the fee. Null if absolute\_amount\_cents is set.

      ```json CEL theme={null}
      fee_lines.map(x, x.percentage_amount)
      ```

      ```json Example theme={null}
      [
      3.5
      ]
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.calculated_amount_cents)" type="[]int64" required>
      Mapped array of: Current calculated amount for the fee in cents.

      ```json CEL theme={null}
      fee_lines.map(x, x.calculated_amount_cents)
      ```

      ```json Example theme={null}
      [
      500
      ]
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.calculated_tax_amount_cents)" type="[]int64" required>
      Mapped array of: Current calculated tax amount for the fee in cents.

      ```json CEL theme={null}
      fee_lines.map(x, x.calculated_tax_amount_cents)
      ```

      ```json Example theme={null}
      [
      45
      ]
      ```
    </ResponseField>

    <ResponseField name="fee_lines.map(x, x.refunds)" type="[]bool" required>
      Mapped array of: Refunds applied to this fee line.

      ```json CEL theme={null}
      fee_lines.map(x, x.refunds)
      ```

      ```json Example theme={null}
      [
      [
      {
      "id": "urn:blvd:FeeLineRefund:refund123",
      "order_refund_id": "urn:blvd:OrderRefund:refund123",
      "refund_amount_cents": 500,
      "refunded_at": "2024-03-20T14:30:00Z"
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="line_groups" type="[]object" required>
      Line item groups for the order.

      ```json CEL theme={null}
      line_groups
      ```

      ```json Example theme={null}
      [
      {
      "id": "urn:blvd:OrderLineGroup:group123",
      "lines": [
      {
        "current_discount_amount_cents": 0,
        "current_price_cents": 15000,
        "current_subtotal_cents": 15000,
        "discounts": [
          {
            "description": "First Time Client Discount",
            "discount_amount_cents": 1500,
            "discount_percentage": 10,
            "discount_reason": {
              "id": "urn:blvd:DiscountReason:reason123",
              "is_hidden": false,
              "name": "First Time Client"
            },
            "id": "urn:blvd:OrderDiscount:discount123"
          }
        ],
        "id": "urn:blvd:OrderLine:line123",
        "initial_discount_amount_cents": 0,
        "initial_price_cents": 15000,
        "initial_subtotal_cents": 15000,
        "quantity": 1
      }
      ]
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="line_groups.map(x, x.id)" type="[]string" required>
      `ID` Mapped array of: Unique identifier for the line group.

      ```json CEL theme={null}
      line_groups.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "urn:blvd:OrderLineGroup:group123"
      ]
      ```
    </ResponseField>

    <ResponseField name="line_groups.map(x, x.lines)" type="[]bool" required>
      Mapped array of: Lines in this group.

      ```json CEL theme={null}
      line_groups.map(x, x.lines)
      ```

      ```json Example theme={null}
      [
      [
      {
      "current_discount_amount_cents": 0,
      "current_price_cents": 15000,
      "current_subtotal_cents": 15000,
      "discounts": [
        {
          "description": "First Time Client Discount",
          "discount_amount_cents": 1500,
          "discount_percentage": 10,
          "discount_reason": {
            "id": "urn:blvd:DiscountReason:reason123",
            "is_hidden": false,
            "name": "First Time Client"
          },
          "id": "urn:blvd:OrderDiscount:discount123"
        }
      ],
      "id": "urn:blvd:OrderLine:line123",
      "initial_discount_amount_cents": 0,
      "initial_price_cents": 15000,
      "initial_subtotal_cents": 15000,
      "quantity": 1
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="location" type="object">
      The location where this transaction was made.

      ```json CEL theme={null}
      location
      ```

      ```json Example theme={null}
      {
      "address": {
      "city": "San Francisco",
      "country": "US",
      "line1": "1 Acacia Ave.",
      "line2": "Apt 3a.",
      "province": "Alberta",
      "state": "CA",
      "zip_code": "94117"
      },
      "external_id": "LOC001",
      "id": "urn:blvd:Location:loc123",
      "is_remote": false,
      "name": "Downtown Spa",
      "timezone": "America/New_York"
      }
      ```
    </ResponseField>

    <ResponseField name="location.id" type="string">
      `ID` Unique identifier for the location.

      ```json CEL theme={null}
      location.id
      ```

      ```json Example theme={null}
      "urn:blvd:Location:loc123"
      ```
    </ResponseField>

    <ResponseField name="location.name" type="string">
      Name of the location.

      ```json CEL theme={null}
      location.name
      ```

      ```json Example theme={null}
      "Downtown Spa"
      ```
    </ResponseField>

    <ResponseField name="location.external_id" type="string">
      `ID` External identifier for the location.

      ```json CEL theme={null}
      location.external_id
      ```

      ```json Example theme={null}
      "LOC001"
      ```
    </ResponseField>

    <ResponseField name="location.timezone" type="string">
      Timezone associated with the location.

      ```json CEL theme={null}
      location.timezone
      ```

      ```json Example theme={null}
      "America/New_York"
      ```
    </ResponseField>

    <ResponseField name="location.address" type="object">
      `PII` Address of the location.

      ```json CEL theme={null}
      location.address
      ```

      ```json Example theme={null}
      {
      "city": "San Francisco",
      "country": "US",
      "line1": "1 Acacia Ave.",
      "line2": "Apt 3a.",
      "province": "Alberta",
      "state": "CA",
      "zip_code": "94117"
      }
      ```
    </ResponseField>

    <ResponseField name="location.address.line1" type="string">
      `PII` Line 1 of the Address

      ```json CEL theme={null}
      location.address.line1
      ```

      ```json Example theme={null}
      "1 Acacia Ave."
      ```
    </ResponseField>

    <ResponseField name="location.address.line2" type="string">
      `PII` Line 2 of the Address

      ```json CEL theme={null}
      location.address.line2
      ```

      ```json Example theme={null}
      "Apt 3a."
      ```
    </ResponseField>

    <ResponseField name="location.address.city" type="string">
      City of the Address

      ```json CEL theme={null}
      location.address.city
      ```

      ```json Example theme={null}
      "San Francisco"
      ```
    </ResponseField>

    <ResponseField name="location.address.province" type="string">
      Province of the Address.

      ```json CEL theme={null}
      location.address.province
      ```

      ```json Example theme={null}
      "Alberta"
      ```
    </ResponseField>

    <ResponseField name="location.address.state" type="string">
      State of the Address.

      ```json CEL theme={null}
      location.address.state
      ```

      ```json Example theme={null}
      "CA"
      ```
    </ResponseField>

    <ResponseField name="location.address.zip_code" type="string">
      Zip (postal) code for the Address.

      ```json CEL theme={null}
      location.address.zip_code
      ```

      ```json Example theme={null}
      "94117"
      ```
    </ResponseField>

    <ResponseField name="location.address.country" type="string">
      Country for the Address.

      ```json CEL theme={null}
      location.address.country
      ```

      ```json Example theme={null}
      "US"
      ```
    </ResponseField>

    <ResponseField name="location.is_remote" type="bool">
      Indicates that the location is a remote location, and that appointments for this location are carried out remotely.

      ```json CEL theme={null}
      location.is_remote
      ```

      ```json Example theme={null}
      false
      ```
    </ResponseField>

    <ResponseField name="payment_groups" type="[]object" required>
      Payment groups for the order.

      ```json CEL theme={null}
      payment_groups
      ```

      ```json Example theme={null}
      [
      {
      "id": "urn:blvd:OrderPaymentGroup:group123",
      "is_independent_merchant": false,
      "merchant_id": "merchant123",
      "merchant_name": "Downtown Spa",
      "payments": [
      {
        "id": "urn:blvd:OrderPayment:payment123",
        "merchant_id": "merchant123",
        "order_id": "urn:blvd:Order:order123",
        "paid_amount_cents": 17850,
        "payment_method_label": "Visa ending in 1234",
        "refund_amount_cents": 0,
        "refunds": [
          {
            "id": "urn:blvd:OrderPaymentRefund:refund123",
            "is_full_refund": true,
            "refund_amount_cents": 17850,
            "refund_id": "refund123",
            "refunded_at": "2024-03-20T14:30:00Z"
          }
        ]
      }
      ],
      "total_cents": 17850,
      "total_fees_cents": 500,
      "total_paid_cents": 17850,
      "total_unpaid_cents": 0
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.id)" type="[]string" required>
      `ID` Mapped array of: Unique identifier for the payment group.

      ```json CEL theme={null}
      payment_groups.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "urn:blvd:OrderPaymentGroup:group123"
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.is_independent_merchant)" type="[]bool" required>
      Mapped array of: Whether this is an independent merchant.

      ```json CEL theme={null}
      payment_groups.map(x, x.is_independent_merchant)
      ```

      ```json Example theme={null}
      [
      false
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.merchant_id)" type="[]string" required>
      Mapped array of: ID of the merchant.

      ```json CEL theme={null}
      payment_groups.map(x, x.merchant_id)
      ```

      ```json Example theme={null}
      [
      "merchant123"
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.merchant_name)" type="[]string" required>
      Mapped array of: Name of the merchant.

      ```json CEL theme={null}
      payment_groups.map(x, x.merchant_name)
      ```

      ```json Example theme={null}
      [
      "Downtown Spa"
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.payments)" type="[]bool" required>
      Mapped array of: Payments in this group.

      ```json CEL theme={null}
      payment_groups.map(x, x.payments)
      ```

      ```json Example theme={null}
      [
      [
      {
      "id": "urn:blvd:OrderPayment:payment123",
      "merchant_id": "merchant123",
      "order_id": "urn:blvd:Order:order123",
      "paid_amount_cents": 17850,
      "payment_method_label": "Visa ending in 1234",
      "refund_amount_cents": 0,
      "refunds": [
        {
          "id": "urn:blvd:OrderPaymentRefund:refund123",
          "is_full_refund": true,
          "refund_amount_cents": 17850,
          "refund_id": "refund123",
          "refunded_at": "2024-03-20T14:30:00Z"
        }
      ]
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.total_cents)" type="[]int64" required>
      Mapped array of: Total amount for this payment group in cents.

      ```json CEL theme={null}
      payment_groups.map(x, x.total_cents)
      ```

      ```json Example theme={null}
      [
      17850
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.total_fees_cents)" type="[]int64" required>
      Mapped array of: Total fees for this payment group in cents.

      ```json CEL theme={null}
      payment_groups.map(x, x.total_fees_cents)
      ```

      ```json Example theme={null}
      [
      500
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.total_paid_cents)" type="[]int64" required>
      Mapped array of: Total paid for this payment group in cents.

      ```json CEL theme={null}
      payment_groups.map(x, x.total_paid_cents)
      ```

      ```json Example theme={null}
      [
      17850
      ]
      ```
    </ResponseField>

    <ResponseField name="payment_groups.map(x, x.total_unpaid_cents)" type="[]int64" required>
      Mapped array of: Total unpaid for this payment group in cents.

      ```json CEL theme={null}
      payment_groups.map(x, x.total_unpaid_cents)
      ```

      ```json Example theme={null}
      [
      0
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds" type="[]object" required>
      Closed refunds against the order.

      ```json CEL theme={null}
      refunds
      ```

      ```json Example theme={null}
      [
      {
      "closed_at": "2024-03-20T14:30:00Z",
      "closed_by": {
      "email_address": "sarah.johnson@spa.com",
      "first_name": "Sarah",
      "id": "urn:blvd:Staff:staff123",
      "last_name": "Johnson",
      "phone_number": "+15551234567",
      "role_name": "Massage Therapist"
      },
      "created_at": "2024-03-20T14:00:00Z",
      "id": "urn:blvd:OrderRefund:refund123",
      "number": "REF-2024-001234",
      "payments": [
      {
        "id": "urn:blvd:OrderRefundPayment:payment123",
        "order_payment_id": "urn:blvd:OrderPayment:payment123",
        "refund_amount_cents": 15000,
        "refund_limit_cents": 15000
      }
      ],
      "refund_reason": "ORDER_REFUND_REASON_CUSTOMER_REQUEST",
      "refund_reason_text": "Customer changed mind",
      "status": "ORDER_REFUND_STATUS_CLOSED",
      "summary": {
      "refund_amount_cents": 15000,
      "refund_tax_cents": 1350,
      "refund_total_cents": 16350
      },
      "updated_at": "2024-03-20T14:30:00Z"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.id)" type="[]string" required>
      `ID` Mapped array of: Unique identifier for the order refund.

      ```json CEL theme={null}
      refunds.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "urn:blvd:OrderRefund:refund123"
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.number)" type="[]string" required>
      Mapped array of: Refund number.

      ```json CEL theme={null}
      refunds.map(x, x.number)
      ```

      ```json Example theme={null}
      [
      "REF-2024-001234"
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.payments)" type="[]bool" required>
      Mapped array of: Payment details for the order refund.

      ```json CEL theme={null}
      refunds.map(x, x.payments)
      ```

      ```json Example theme={null}
      [
      [
      {
      "id": "urn:blvd:OrderRefundPayment:payment123",
      "order_payment_id": "urn:blvd:OrderPayment:payment123",
      "refund_amount_cents": 15000,
      "refund_limit_cents": 15000
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="refund_reason" type="boulevard.v1.OrderRefundReason">
      Mapped array of: Value that describes why this refund was made. When the reason is OTHER, refund\_reason\_text should also be set.

      ```json CEL theme={null}
      refund_reason
      ```

      ```json Example theme={null}
      boulevard.v1.OrderRefundReason.ORDER_REFUND_REASON_CUSTOMER_SERVICE
      boulevard.v1.OrderRefundReason.ORDER_REFUND_REASON_DEFECTIVE_PRODUCT
      boulevard.v1.OrderRefundReason.ORDER_REFUND_REASON_OTHER
      boulevard.v1.OrderRefundReason.ORDER_REFUND_REASON_STAFF_ERROR
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.refund_reason_text)" type="[]string" required>
      Mapped array of: Additional description, usually available when the refund reason is OTHER.

      ```json CEL theme={null}
      refunds.map(x, x.refund_reason_text)
      ```

      ```json Example theme={null}
      [
      "Customer changed mind"
      ]
      ```
    </ResponseField>

    <ResponseField name="status" type="boulevard.v1.OrderRefundStatus" required>
      Mapped array of: Closed status of the refund.

      ```json CEL theme={null}
      status
      ```

      ```json Example theme={null}
      boulevard.v1.OrderRefundStatus.ORDER_REFUND_STATUS_CLOSED
      boulevard.v1.OrderRefundStatus.ORDER_REFUND_STATUS_OPEN
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.summary)" type="[]bool" required>
      Mapped array of: Summary totals of the refund.

      ```json CEL theme={null}
      refunds.map(x, x.summary)
      ```

      ```json Example theme={null}
      [
      {
      "refund_amount_cents": 15000,
      "refund_tax_cents": 1350,
      "refund_total_cents": 16350
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.created_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: The date and time when the order refund was created.

      ```json CEL theme={null}
      refunds.map(x, x.created_at)
      ```

      ```json Example theme={null}
      [
      "2024-03-20T14:00:00Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.updated_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: The date and time when the order refund was last updated.

      ```json CEL theme={null}
      refunds.map(x, x.updated_at)
      ```

      ```json Example theme={null}
      [
      "2024-03-20T14:30:00Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.closed_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: When the refund was closed.

      ```json CEL theme={null}
      refunds.map(x, x.closed_at)
      ```

      ```json Example theme={null}
      [
      "2024-03-20T14:30:00Z"
      ]
      ```
    </ResponseField>

    <ResponseField name="refunds.map(x, x.closed_by)" type="[]bool" required>
      Mapped array of: The staff member who closed the refund.

      ```json CEL theme={null}
      refunds.map(x, x.closed_by)
      ```

      ```json Example theme={null}
      [
      {
      "email_address": "sarah.johnson@spa.com",
      "first_name": "Sarah",
      "id": "urn:blvd:Staff:staff123",
      "last_name": "Johnson",
      "phone_number": "+15551234567",
      "role_name": "Massage Therapist"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="closed_at" type="timing.v1.Timestamp">
      The date and time when the order was closed.

      ```json CEL theme={null}
      closed_at
      ```

      ```json Example theme={null}
      "2024-03-15T12:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="closed_by" type="object">
      The staff member that closed the order.

      ```json CEL theme={null}
      closed_by
      ```

      ```json Example theme={null}
      {
      "email_address": "sarah.johnson@spa.com",
      "first_name": "Sarah",
      "id": "urn:blvd:Staff:staff123",
      "last_name": "Johnson",
      "phone_number": "+15551234567",
      "role_name": "Massage Therapist"
      }
      ```
    </ResponseField>

    <ResponseField name="closed_by.id" type="string">
      `ID` Unique identifier for the staff member.

      ```json CEL theme={null}
      closed_by.id
      ```

      ```json Example theme={null}
      "urn:blvd:Staff:staff123"
      ```
    </ResponseField>

    <ResponseField name="closed_by.first_name" type="string">
      `PII` First name of the staff member.

      ```json CEL theme={null}
      closed_by.first_name
      ```

      ```json Example theme={null}
      "Sarah"
      ```
    </ResponseField>

    <ResponseField name="closed_by.last_name" type="string">
      `PII` Last name of the staff member.

      ```json CEL theme={null}
      closed_by.last_name
      ```

      ```json Example theme={null}
      "Johnson"
      ```
    </ResponseField>

    <ResponseField name="closed_by.email_address" type="string">
      `PII` Email address of the staff member.

      ```json CEL theme={null}
      closed_by.email_address
      ```

      ```json Example theme={null}
      "sarah.johnson@spa.com"
      ```
    </ResponseField>

    <ResponseField name="closed_by.phone_number" type="string">
      `PII` Mobile phone number of the staff member.

      ```json CEL theme={null}
      closed_by.phone_number
      ```

      ```json Example theme={null}
      "+15551234567"
      ```
    </ResponseField>

    <ResponseField name="closed_by.role_name" type="string">
      Name of the staff member's role.

      ```json CEL theme={null}
      closed_by.role_name
      ```

      ```json Example theme={null}
      "Massage Therapist"
      ```
    </ResponseField>

    <ResponseField name="created_at" type="timing.v1.Timestamp" required>
      The date and time when the order was created.

      ```json CEL theme={null}
      created_at
      ```

      ```json Example theme={null}
      "2024-03-01T09:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="updated_at" type="timing.v1.Timestamp" required>
      The date and time when the order was last updated.

      ```json CEL theme={null}
      updated_at
      ```

      ```json Example theme={null}
      "2024-03-15T11:30:00Z"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
