Skip to main content

Reason Codes (2.0.0)

Download OpenAPI specification:Download

Reason Codes Api

Reason Codes

Reason Codes Api

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

Content type
application/json
{
  • "metadata": { },
  • "reason_codes": [
    ]
}

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

Content type
application/json
{
  • "code": 0,
  • "reason": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "created_at": "string",
  • "created_by": "string",
  • "reason": {
    },
  • "updated_at": "string",
  • "updated_by": "string"
}

Delete reason code

Deletes 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

Responses

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

Content type
application/json
{
  • "code": 0,
  • "reason": {
    }
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "created_at": "string",
  • "created_by": "string",
  • "reason": {
    },
  • "updated_at": "string",
  • "updated_by": "string"
}