Get reason codes by type and tenant
Retrieves all the reason codes of the provided reason code type.
Authorizations:
oauth
path Parameters
type required | string Enum: "returns" "cancellations" "refunds" "exchanges" |
header Parameters
tenant | string Tenant name |
Responses
Response samples
- 200
Content type
application/json
{- "metadata": { },
- "reason_codes": [
- {
- "code": 0,
- "created_at": "string",
- "created_by": "string",
- "reason": {
- "en": "Too small",
- "de": "Zu klein"
}, - "updated_at": "string",
- "updated_by": "string"
}
]
}
Create reason code
Creates a new reason code in the provided reason code type. Once a reason code is added, users must log out from their app and log in again to see the new reason codes.
Authorizations:
oauth
path Parameters
type required | string Enum: "returns" "cancellations" "refunds" "exchanges" |
header Parameters
tenant | string Tenant name |
Request Body schema: application/json
code required | integer <int32> The unique code of the reason for a specific type. |
required | object (Reason) |
Responses
Request samples
- Payload
Content type
application/json
{- "code": 0,
- "reason": {
- "en": "Too small",
- "de": "Zu klein"
}
}
Response samples
- 201
Content type
application/json
{- "code": 0,
- "created_at": "string",
- "created_by": "string",
- "reason": {
- "en": "Too small",
- "de": "Zu klein"
}, - "updated_at": "string",
- "updated_by": "string"
}
Update reason code
Updates the provided reason code.
Authorizations:
oauth
path Parameters
type required | string Enum: "returns" "cancellations" "refunds" "exchanges" |
code required | integer |
header Parameters
tenant | string Tenant name |
Request Body schema: application/json
code required | integer <int32> The unique code of the reason for a specific type. |
required | object (Reason) |
Responses
Request samples
- Payload
Content type
application/json
{- "code": 0,
- "reason": {
- "en": "Too small",
- "de": "Zu klein"
}
}
Response samples
- 200
Content type
application/json
{- "code": 0,
- "created_at": "string",
- "created_by": "string",
- "reason": {
- "en": "Too small",
- "de": "Zu klein"
}, - "updated_at": "string",
- "updated_by": "string"
}