Skip to main content

Reason Codes (1.0.0)

Download OpenAPI specification:Download

Use this API to manage Reason Codes for discount discretionry or price override.

Reason Codes

Reason Codes API.

List Reason Codes

Retrieves reason codes per locale

Authorizations:
oauth
query Parameters
feature
string
Default: "DISCOUNT"
Enum: "DISCOUNT" "OVERRIDE"

Indicates the feature of the reason code.

header Parameters
Accept-Language
string

The locale of reason codes. if not present all codes from all locales are returned.

Responses

Response samples

Content type
application/json
{
  • "codes": [
    ]
}

Create a Reason Code

Creates a new reason code

Authorizations:
oauth
query Parameters
feature
string
Default: "DISCOUNT"
Enum: "DISCOUNT" "OVERRIDE"

Indicates the feature of the reason code.

header Parameters
Accept-Language
string
Default: en-US

The locale that the reasons codes belong to.

Request Body schema: application/json
code
required
string <= 256 characters

An identifier of the reason code, pattern is '^[^+=%]+$'

name
required
string

The name of the reason code.

Responses

Request samples

Content type
application/json
{
  • "code": "DFT",
  • "name": "defect"
}

Response samples

Content type
application/problem+json
{
  • "message": "Invalid parameter.",
  • "request_id": "ec2f3c9bb016ba971bf6"
}

Get a Reason Code

Retrieves a reason code with all localisations

Authorizations:
oauth
path Parameters
code
required
string <= 256 characters

An identifier of a reason code.

query Parameters
feature
string
Default: "DISCOUNT"
Enum: "DISCOUNT" "OVERRIDE"

Indicates the feature of the reason code.

Responses

Response samples

Content type
application/json
{
  • "localizations": [
    ],
  • "code": "string"
}

Update a Reason Code

Update the name of the reason code.

Authorizations:
oauth
path Parameters
code
required
string <= 256 characters

An identifier of a reason code.

query Parameters
feature
string
Default: "DISCOUNT"
Enum: "DISCOUNT" "OVERRIDE"

Indicates the feature of the reason code.

header Parameters
Accept-Language
string
Default: en-US

The locale of the reason code.

Request Body schema: application/json
name
required
string

The name of the reason code.

Responses

Request samples

Content type
application/json
{
  • "name": "defect"
}

Response samples

Content type
application/problem+json
{
  • "message": "Invalid parameter.",
  • "request_id": "ec2f3c9bb016ba971bf6"
}

Delete a Reason Code

Delete a reason code

Authorizations:
oauth
path Parameters
code
required
string <= 256 characters

An identifier of a reason code.

query Parameters
feature
string
Default: "DISCOUNT"
Enum: "DISCOUNT" "OVERRIDE"

Indicates the feature of the reason code.

header Parameters
Accept-Language
string
Default: en-US

The locale of the reason code.

Responses

Response samples

Content type
application/problem+json
{
  • "message": "Invalid parameter.",
  • "request_id": "ec2f3c9bb016ba971bf6"
}