Organization API: Customers: Commerce
The 4 Organization API operations for commerce.
Part of Customers.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| PUT | /api/v1/orgs/{org_slug}/commerce/customer-groups/{group_id}/customers |
Set group customers |
| GET | /api/v1/orgs/{org_slug}/commerce/customers |
Newest first, with each customer's order count, spend and groups |
| GET | /api/v1/orgs/{org_slug}/commerce/customers/{customer_id} |
The customer, their saved addresses, note, tags, groups and spend |
| PATCH | /api/v1/orgs/{org_slug}/commerce/customers/{customer_id} |
Note, tags, tax exemption, VAT id and its check; acceptsmarketing takes only false |
Set group customers
Section titled Set group customersPUT /api/v1/orgs/{org_slug}/commerce/customer-groups/{group_id}/customers
Make customer_ids exactly the group's customers (at most 1000); an
id that is not one of the store's customers is not found.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
group_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
customer_ids |
array of integer | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Newest first, with each customer's order count, spend and groups
Section titled Newest first, with each customer's order count, spend and groupsGET /api/v1/orgs/{org_slug}/commerce/customers
Newest first, with each customer's order count, spend and groups.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
q |
query | string or null | no | Part of an email or a name. |
group_id |
query | integer or null | no | |
limit |
query | integer | no | Default: 50. |
offset |
query | integer | no | Default: 0. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
The customer, their saved addresses, note, tags, groups and spend
Section titled The customer, their saved addresses, note, tags, groups and spendGET /api/v1/orgs/{org_slug}/commerce/customers/{customer_id}
The customer, their saved addresses, note, tags, groups and spend.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
customer_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Note, tags, tax exemption, VAT id and its check; acceptsmarketing takes only false
Section titled Note, tags, tax exemption, VAT id and its check; acceptsmarketing takes only falsePATCH /api/v1/orgs/{org_slug}/commerce/customers/{customer_id}
Note, tags, tax exemption, VAT id and its check; accepts_marketing
takes only false. Changing vat_id clears its check.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
customer_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
accepts_marketing |
boolean or null | no | Only false: a store can turn consent off. |
note |
string or null | no | |
tags |
array of string or null | no | |
tax_exempt |
boolean or null | no | |
vat_id |
string or null | no | |
vat_id_valid |
boolean or null | no | Whether the VAT id was checked and found valid. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |