Reason Codes (1.0.0)
Download OpenAPI specification:Download
Use this API to manage Reason Codes for discount discretionry or price override.
List Reason Codes
Retrieves reason codes per locale
Authorizations:
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
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "codes": [
- {
- "code": "DFT",
- "name": "defect",
- "locale": "en-us"
}
]
}
Create a Reason Code
Creates a new reason code
Authorizations:
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
- Payload
{- "code": "DFT",
- "name": "defect"
}
Response samples
- 400
- 401
- 403
- 409
- 500
- default
{- "message": "Invalid parameter.",
- "request_id": "ec2f3c9bb016ba971bf6"
}
Get a Reason Code
Retrieves a reason code with all localisations
Authorizations:
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
- 200
- 401
- 403
- 404
- 500
- default
{- "localizations": [
- {
- "name": "defect",
- "locale": "en-us"
}
], - "code": "string"
}
Update a Reason Code
Update the name of the reason code.
Authorizations:
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
- Payload
{- "name": "defect"
}
Response samples
- 400
- 401
- 403
- 404
- 500
- default
{- "message": "Invalid parameter.",
- "request_id": "ec2f3c9bb016ba971bf6"
}
Delete a Reason Code
Delete a reason code
Authorizations:
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
- 401
- 403
- 404
- 500
- default
{- "message": "Invalid parameter.",
- "request_id": "ec2f3c9bb016ba971bf6"
}