Skip to content

Latest commit

 

History

History
63 lines (55 loc) · 1.49 KB

problems.md

File metadata and controls

63 lines (55 loc) · 1.49 KB

Application problems found

Application problems have been found that are unlikely to be resolved by immediately repeating the request. They can represent issues such as misconfigured prices or store settings.

Problem Type

type = https://problem.api.bunnings.com.au?type=problems

Specification

The problems response is based on the base RFC 7807 problem. This is extended to include code/description collection

problems:
    type: object
    description: RFC 7807 superset problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri
        errors:
            type: object
            properties:
                problems:
                    type: array
                    properties:
                        code:
                            type: string
                        message:
                            type: string

Problem Specification

Example

{
    "type": "https://problem.api.bunnings.com.au?type=problems",
    "title": "Bad Request",
    "status": 400,
    "errors": {
        "problems": [
            {
                "message": "Pricing API did not find a price for item: 3314001",
                "code": "E-CHK-0027"
            }
        ]
    }
}