---
title: "POST billing status update (M2M)"
method: POST
path: "/machine-to-machine/billing-status-update"
tags: ["Machine to Machine"]
---

# POST billing status update (M2M)

`POST /machine-to-machine/billing-status-update`

## Request

- Base URL: `https://api.equipmentshare.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.equipmentshare.com/machine-to-machine/billing-status-update`
- Auth: HTTP bearer

Applies rental status changes (SetRentalStatus), sale item fulfillment status changes and service visit billing status changes in one unit of work. Requires header `X-M2M-USER-ID`. Include `rentals`, `sale_item_fulfillments` and/or `service_occurrences`; any key may be omitted when empty. At least one of the lists must be non-empty. A service visit's `billing_status` moves to `billing_pending` when it is not billed and is Completed, Partially Completed, a billable Customer Cancelled, or Scheduled on a series billed as scheduled; back to `billing_pending` from `billing_approved` (an approval rolled back); to `billing_approved` from `billing_pending`; and to null (off its invoice) from `billing_pending`. The visit status never changes. Sending the value a visit already has does nothing.

## Request body

- BillingStatusUpdateRequest
  - `rentals` BillingStatusUpdateRentalRequest[]
    - `rental_id` integer, required
    - `rental_status_id` integer, required
  - `sale_item_fulfillments` BillingStatusUpdateSaleItemFulfillmentRequest[]
    - `quantity` number, float, nullable
    - `sale_item_fulfillment_id` integer, required
    - `sale_items_status_id` integer, required
  - `service_occurrences` BillingStatusUpdateServiceOccurrenceRequest[]
    - `billing_status` 'billing_pending' | 'billing_approved', nullable, required
    - `service_occurrence_id` integer, required

## Response `204`

Updates committed successfully; empty body.

## Other responses

- `400`: Missing X-M2M-USER-ID, schema validation error, unknown fulfillment or service occurrence ids, or invalid fulfillment status or visit billing status transitions.
- `401`: Unauthorized — valid machine Bearer token required.

## Changes

- **2026-11-23** `a664d8744ee7`: 1 breaking, 1 warning
  - added the new required request property `service_occurrences/items/billing_status`
  - removed the request property `service_occurrences/items/service_occurrence_status_id`
- **2026-11-11** `36b33c6d16fa`: 1 info
  - added the new optional request property `service_occurrences`

[Operation history](https://skmtc.dev/equipmentshare/apis/es-api/changes/machine-to-machine/billing-status-update/post.md)

---

[API](https://skmtc.dev/equipmentshare/apis/es-api.md) - [All operations](https://skmtc.dev/equipmentshare/apis/es-api/llms.txt) - [OpenAPI document](https://skmtc.dev/equipmentshare/apis/es-api/revisions/40651e1558ac?raw)
