aid_receipts_customer_segment_post
curl --request POST \
--url https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_from": "2023-11-07T05:31:56Z",
"purchase_to": "2023-11-07T05:31:56Z",
"store_ids": [
"<string>"
],
"items": [
{
"id": "<string>",
"group": "<string>"
}
]
}
'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment"
payload = {
"purchase_from": "2023-11-07T05:31:56Z",
"purchase_to": "2023-11-07T05:31:56Z",
"store_ids": ["<string>"],
"items": [
{
"id": "<string>",
"group": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
purchase_from: '2023-11-07T05:31:56Z',
purchase_to: '2023-11-07T05:31:56Z',
store_ids: ['<string>'],
items: [{id: '<string>', group: '<string>'}]
})
};
fetch('https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment"
payload := strings.NewReader("{\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"store_ids\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"id\": \"<string>\",\n \"group\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"store_ids\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"id\": \"<string>\",\n \"group\": \"<string>\"\n }\n ]\n}")
.asString();{
"customers": [
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"purchases": 5
}
]
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}segment
Customer segmentation
Segment customer by receipt data
scopes:
- admin:receipts
- read:receipts
POST
https://api.dintero.com/v1
/
accounts
/
{aid}
/
receipts
/
customer_segment
aid_receipts_customer_segment_post
curl --request POST \
--url https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"purchase_from": "2023-11-07T05:31:56Z",
"purchase_to": "2023-11-07T05:31:56Z",
"store_ids": [
"<string>"
],
"items": [
{
"id": "<string>",
"group": "<string>"
}
]
}
'import requests
url = "https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment"
payload = {
"purchase_from": "2023-11-07T05:31:56Z",
"purchase_to": "2023-11-07T05:31:56Z",
"store_ids": ["<string>"],
"items": [
{
"id": "<string>",
"group": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
purchase_from: '2023-11-07T05:31:56Z',
purchase_to: '2023-11-07T05:31:56Z',
store_ids: ['<string>'],
items: [{id: '<string>', group: '<string>'}]
})
};
fetch('https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment"
payload := strings.NewReader("{\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"store_ids\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"id\": \"<string>\",\n \"group\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.dintero.com/v1/accounts/{aid}/receipts/customer_segment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"purchase_from\": \"2023-11-07T05:31:56Z\",\n \"purchase_to\": \"2023-11-07T05:31:56Z\",\n \"store_ids\": [\n \"<string>\"\n ],\n \"items\": [\n {\n \"id\": \"<string>\",\n \"group\": \"<string>\"\n }\n ]\n}")
.asString();{
"customers": [
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"purchases": 5
}
]
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"errors": [
{}
]
}
}Authorizations
Bearer authentication (token authentication) should be used for accessing the API.
Use Get Token to get an access token for client credentials. Pass the token in the request header:
Authorization: Bearer {access_token}where the access_token is JSON Web Tokens (JWT).
Path Parameters
An id that uniquely identifies the account.
Required string length:
9Body
application/json
segmentation on receipt data
Response
Customer matching segmentation
Show child attributes
Show child attributes
Last modified on May 12, 2026
⌘I