Reasons
Reasons
List all reasons.
Authorizations
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+
Query parameters
reasonTypestring · enumOptional
Possible values:
ENUM | Description |
---|---|
DISCOUNT | Reason for discounts |
RETURN | Reason for returns |
RMA | Reason for return to supplier |
pageNumberintegerOptional
Reference to a specific page in a result set.
pageSizeintegerOptional
The number of items per page in a result set.
sortBystringOptional
Defines which field the resource list is sorted by.
sortDirectionstring · enumOptional
Possible values:
ENUM | Description |
---|---|
ASC | Sort in ascending order |
DESC | Sort in descending order |
Responses
200
Reason list response
application/json
get
GET /v2/tenants/{tenantUid}/reasons HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200
Reason list response
{
"items": [
{
"code": "text",
"createdAt": "2025-07-30T18:11:59.469Z",
"description": "text",
"lastModifiedAt": "2025-07-30T18:11:59.469Z",
"reasonUid": "text",
"type": "DISCOUNT"
}
],
"paging": {
"pageNumber": 1,
"pageSize": 1,
"totalCount": 1
}
}
Create new reason
Authorizations
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+
Body
codestringRequired
descriptionstringRequired
typestring · enumRequired
Possible values:
ENUM | Description |
---|---|
DISCOUNT | Reason for discounts |
RETURN | Reason for returns |
RMA | Reason for return to supplier |
reasonUidstringOptionalPattern:
^[A-Za-z0-9-_]+
Responses
200
Reason response
application/json
post
POST /v2/tenants/{tenantUid}/reasons HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 73
{
"code": "text",
"description": "text",
"type": "DISCOUNT",
"reasonUid": "text"
}
200
Reason response
{
"code": "text",
"createdAt": "2025-07-30T18:11:59.469Z",
"description": "text",
"lastModifiedAt": "2025-07-30T18:11:59.469Z",
"reasonUid": "text",
"type": "DISCOUNT"
}
Get details for the reason.
Authorizations
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+
reasonUidstringRequiredPattern:
Reference to a reason.
^[A-Za-z0-9-_]+
Responses
200
Reason response
application/json
get
GET /v2/tenants/{tenantUid}/reasons/{reasonUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200
Reason response
{
"code": "text",
"createdAt": "2025-07-30T18:11:59.469Z",
"description": "text",
"lastModifiedAt": "2025-07-30T18:11:59.469Z",
"reasonUid": "text",
"type": "DISCOUNT"
}
Update details of the reason.
Authorizations
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+
reasonUidstringRequiredPattern:
Reference to a reason.
^[A-Za-z0-9-_]+
Body
codestringOptional
descriptionstringOptional
Responses
200
Reason response
application/json
put
PUT /v2/tenants/{tenantUid}/reasons/{reasonUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"code": "text",
"description": "text"
}
200
Reason response
{
"code": "text",
"createdAt": "2025-07-30T18:11:59.469Z",
"description": "text",
"lastModifiedAt": "2025-07-30T18:11:59.469Z",
"reasonUid": "text",
"type": "DISCOUNT"
}
Delete a reason.
Authorizations
Path parameters
tenantUidstringRequiredPattern:
Reference to a tenant.
^[A-Za-z0-9-_]+
reasonUidstringRequiredPattern:
Reference to a reason.
^[A-Za-z0-9-_]+
Responses
204
No Content
delete
DELETE /v2/tenants/{tenantUid}/reasons/{reasonUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204
No Content
No content
Was this helpful?