---
title: "aid_receipts_customer_segment_post"
method: POST
path: "/accounts/{aid}/receipts/customer_segment"
tags: ["segment"]
---

# aid_receipts_customer_segment_post

`POST /accounts/{aid}/receipts/customer_segment`

Segment customer by receipt data

scopes:
- admin:receipts
- read:receipts

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required

## Request body

- object
  - `purchase_from` string, date-time
  - `purchase_to` string, date-time
  - `store_ids` string[]
  - `items` object[]
    - `id` string
    - `group` string

## Response `200`

Customer matching segmentation

- object
  - `customers` object[]
    - `customer_id` string, uuid
    - `purchases` integer

## Other responses

- `400` — Bad / Invalid request
- `401` — Access forbidden, invalid JWT token was used
- `403` — Forbidden
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
