Problems

These are the shared problems for the Bunnings APIs. These problems are all compliant with RFC 7807 though some include extensions to the base application/problem+json type. Refer to the individual pages for schema definitions.

A complete description of Bunnings' Error Code design can be found here.

Problems returned in this format include a Problem Type URL that can be used to decide how to interpret the rest of the response. The URL is of the format https://problem.api.bunnings.com.au?type=<problemName>, for example: https://problem.api.bunnings.com.au?type=invalidServerState.

Problem Types

Request Error

Request problems found

This indicates that error(s) were found in the incoming request, they are likely to be a low-level issues such as invalid values for the type or missing fields. A generic high-level error code is used to describe all request problems as the problem represents an issue with the caller.

Specification

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

requestError:
  type: object
  description: RFC 7807 compliant 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:
            grouping:
                type: array
                properties:
                    code:
                        type: string
                    message:
                        type: string
        

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=requestError",
    "title": "One or more validation errors occurred",
    "status": 400,
    "errors": {
        "checkoutRequest": [
            {
                "message": "The checkoutRequest field is required.",
                "code": "E-CHK-0300"
            }
        ],
        "$.basket.customer.teamMemberId": [
            {
                "message": "The JSON value could not be converted to System.String. Path: $.basket.customer.teamMemberId | LineNumber: 29 | BytePositionInLine: 34.",
                "code": "E-CHK-0300"
            }
        ]
    }
}

Validation Error

Validation problems found

A request didn't pass validation stage of processing. Typically, this is after the request was accepted by the API and further validation was performed. This can include checks like:

  • Mutually exclusive fields
  • Conditionally mandatory fields
  • Field value range checks
Specification

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

problem:
    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:
                <field name>:
                    type: array
                    properties:
                        code:
                            type: string
                        message:
                            type: string

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=validationError",
    "title": "Bad Request",
    "status": 400,
    "errors": {
        "errors": {
            "CheckoutAttempt.Basket.FulfilmentRequirements[0].EstimateForPostCode": [
                {
                    "message": "EstimateForPostCode and DeliveryAddressRef are mutually exclusive",
                    "code": "E-CHK-0002"
                }
            ],
            "Line": [
                {
                    "message": "EstimateForPostCode and DeliveryAddressRef cannot be mixed in one request",
                    "code": "E-CHK-0008"
                }
            ]
        }
    }
}
Links

Problems

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.

Specification

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

problem:
    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"
            }
        ]
    }
  }
}

Marketplace Error

Marketplace problems found

An external Marketplace API raised an error. Bunnings integrates with external APIs to manage its Marketplace, these errors encapsulate problems caused due to deliberate decisions (limits on shipping) or configuration problems.

Specification

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

problem:
    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:
                <offerId>:
                    type: array
                    properties:
                        code:
                            type: string
                        message:
                            type: string

Problem Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=marketplaceError",
    "title": "Bad Request",
    "status": 400,
    "errors": {
        "3010": [
            {
                "message": "Marketplace shipping zone WA_PERTH_METRO not allowed",
                "code": "E-CHK-0036"
            }
        ],
        "3012": [
            {
                "message": "Invalid Marketplace Offer ID",
                "code": "E-CHK-0035"
            }
        ]
    }
}

Invalid Server State

Invalid Server State

The server state path parameter passed to the operation is not valid.

Server state is an opaque string returned by the server as part of an objects _meta and should be used to fill into a links href template. It should be copied directly into an http resource request. Server state is part of the way the API implements the HATEOAS pattern and is used by the server to manage workflow state.

Specification

The invalid server state problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Problem Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=invalidServerState",
    "title": "Server state provided by the client is invalid",
    "status": 400
}

Invalid Authorisation Token

Invalid Authorisation Token

The authorisation token provided with request to access resource is not valid. token string in request Authrorisation bearer header is required to validate the identity of user to whether user has access to asked resource.

Specification

The invalid authorisation token problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=invalidAuthorisationToken",
    "title": "Access Token provided by the client was found not valid for this request",
    "status": 401
}

Missing Resource

Missing Resource

This is used to indicate the requested item was not found.

Specification

The problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=missingResource",
    "title": "Order not found",
    "detail": "order id:12345",
    "status": 404,
    "traceId": "|<id>."
}

Dirty Resource

Dirty Resource

This is used to indicate the requested action passed out-of-date information.

Specification

The problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=missingResource",
    "title": "This record has been updated on the server, please perform the request again",
    "detail": "12345 != 23456",
    "status": 422,
    "traceId": "|<id>."
}

Unhandled Error

Unhandled error

This is usually used to return status information after an unhandled exception is caught. The trace ID returned should be sufficient to find the internal details that caused the problem.

Specification

The problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=unhandled",
    "title": "Error",
    "detail": "An error occured while processing a request.",
    "status": 500,
    "traceId": "|<id>."
}

Unsupported Character

Unsupported Character detected in request

Unsupported character detected in request sent to server. Supported charset are Windows-1252 and ISO8859-1

Specification

The Unsupported character problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Problem Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=unsupportedCharacter",
    "title": "Invalid encoded character detected.",
    "status": 415
}

Resource Not Found

Resource Not Found

 

Requested resource not found.

Specification

The resource not found problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=resourceNotFound",
    "title": "Requested resource not found.",
    "status": 404
}

Invalid Scope

Invalid Scope

Scope present in token does not match to API scope.

Specification

The invalid Scope problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example

 

{ "type": "https://problem.api.bunnings.com.au?type=invalidScope", "title": "Scope present in token does not match to API scope.", "status": 400 }

Invalid Audience

Invalid Audience

Audience present in token does not match to API audience.

Specification

The invalid audience problem includes no additional properties on the base RFC 7807 problem. so uses the base specification

problem:
    type: object
    description: RFC 7807 compliant problem.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        instance:
            type: string
            format: uri

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=invalidAudience",
    "title": "Audience present in token does not match to API audience.",
    "status": 400
}

Basket Submission Error

Basket submission problems found

A request failed to successfuly process an order submission. Typically, this is after the request is accepted by the API and further processing is performed. This can include failures like:

  • Invalid prices
  • Invalid account details
  • Invalid items
Specification

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

problem:
    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:
                <field name>:
                    type: array
                    properties:
                        code:
                            type: string
                        message:
                            type: string

Specification

 

Example
{
    "type": "https://problem.api.bunnings.com.au?type=basketSubmissionError",
    "title": "Basket submission error",
    "status": 400,
    "detail": "Please refer to the errors for additional details.",
    "errors": {        
        "submissionAttempt": [                    
            {
                "message": "Duplicate Order Number",
                "code": "E-ORD-1010"
            }
        ]
    }
}
Links

Provider Not Supported

Provider Not Supported

This is used to indicate the requested operation was not supported by the provider.

Problem Type

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

problem:
    type: object
    description: >|
This problem is used to describe the error received when a user
did an invalid operation against an API. The instance will provide
the url, the title the error and specific details around the invalid
operation that occurred.
This problem is based off the RFC 7807 compliant problem type.
    required:
    - type
    properties:
        type:
            type: string
            format: uri
        title:
            type: string
        status:
            type: integer
        detail:
            type: string
        traceId:
            type: string

Specification

Example
{
    "type": "https://problem.api.bunnings.com.au?type=providerNotSupported",
    "title": "Provider Not Supported",
    "detail": "Provider type is not supported for this operation",
    "status": 400,
    "traceId": "|<id>."
}

Error Codes

All Bunnings APIs return RFC 7807 compliant error messages, but some also support extended Error Code functionality. Each of these APIs has a unique set of error codes. Refer to the links before for details:

Checkout API

Checkout API error codes
Short error code Name Description
E-CHK-0001 InvalidStreetType The address' street type is not one of the standard values. Note that both full and abbreviated names can be used, for example: "st" or "street."
E-CHK-0002 EstimateAndAddressMutuallyExclusive The request received specified both a delivery address as well an requested an estimate for a postcode. These are mutually exclusive.
E-CHK-0003 MarketplaceNotValidForNZ Marketplace purchases are not supported in New Zealand.
E-CHK-0004 MarketplaceNotValidForInstore Marketplace purchases can only be made on-line and not in-store.
E-CHK-0005 MarketplaceWithoutDetail Marketplace orders must include the details of the specified offer.
E-CHK-0006 PreferredDeliveryTypeInvalidForContext It is not possile to specify this preffered delivery type for this context, for example: courier delivery with on-line orders.
E-CHK-0009 MarketplaceMustBeDelivery Marketplace items must have a delivery fulfilment type.
E-CHK-0010 InvalidAddressRef A fulfilment requirements has an invalid address references.
E-CHK-0011 DuplicateFulfilmentIds Multiple fulfilment requirements share the same ID.
E-CHK-0012 DuplicateDeliveryAddressIds Multiple addresses share the same ID.
E-CHK-0013 InvalidFulfilmentRef A line has an invalid fulfilment requirements references.
E-CHK-0014 InvalidQuantity The line's quantity was less than 1.
E-CHK-0015 InvalidGiftQuantity The line's quantity must be 1 for gifts.
E-CHK-0016 MissingQuantity The quantity field is required for the line type.
E-CHK-0017 InvalidSize The size value is less than 0.
E-CHK-0018 MissingFulfilmentRequirementRef The line requires a fulfilment requirement reference.
E-CHK-0019 MissingItemNumber The line requires an item number.
E-CHK-0020 DuplicateLineIds Multiple lines share the same ID.
E-CHK-0021 CustomerDetailsAlsoHasAsMe The customer details have AsMe set but also include a PowerPassAccountNumber or TeamMemberId. Furthermore, it is not valid to pass TeamMemberCustomer or segments.
E-CHK-0022 CustomerMemberOrCustomerMustBeSet The call must include a TeamMemberId or TeamMemberCustomer.
E-CHK-0023 CustomerMemberIdMissing If a TeamMemberCustomer is passed then a TeamMemberId is required.
E-CHK-0024 CustomerMemberCantBePowerpass If a TeamMemberID is passed it cannot have a PowerPassAccountNumber.
E-CHK-0025 CustomerSegmentsRequireMemberOrPowerpass If segments are passed then either a TeamMemberID or PowerPassAccountNumber must be passed.
E-CHK-0026 BunningsDoesNotDeliverToSuburb Bunnings does not delivery to the requested suburb.
E-CHK-0027 ItemHasNoItemPrice No price can be found for the item.
E-CHK-0029 LineNumberInvalid The line number is must be greater than 0.
E-CHK-0030 StreetOrLotMustBeProvided A street or lot number must be included with an address.
E-CHK-0031 DeliveryAddressRequired An address is required for delivery fulfilments unless they are an estimate.
E-CHK-0032 EstimatePostcodeRequired If an estimate is requested then a EstimatePostcodeRequired must be provided.
E-CHK-0033 ItemNotFound The item was not found.
E-CHK-0035 MarketplaceOfferNotFound The Offer passed was not found in the Marketplace.
E-CHK-0036 MarketplaceShippingZoneNotAllowed The Offer cannot be delivered to the requested address.
E-CHK-0037 MarketplaceShippingTypeNotAllowed The Offer cannot be delivered using the shipping type.
E-CHK-0038 MarketplaceShippingZoneNotFound A shipping zone has not been set up for the postcode.
E-CHK-0039 LocationNotFound The location could not be found.
E-CHK-0040 LogisticsApiNotFound Delivery response could not be found.
E-CHK-0041 ItemPriceNotFound A price could not found for the item.
E-CHK-0042 ItemDetailsNotFound An item could be found with an item location but details were not available for it.
E-CHK-0043 LocationCodeNotCached The locationCode could not be found.
E-CHK-0044 LocationConfigurationErrorsFound The location was found but has configuration errors.
E-CHK-0045 PreferredDeliveryNotAllowedForDirect The item has a preferred delivery type of direct delivery however the item is not set for direct delivery.
E-CHK-0046 ItemDeliveryOnly The item is marked as delivery only at the location.
E-CHK-0047 ItemHasSizeButIsWholeUnitOnly The item has specified a size, but the item is whole unit only.
E-CHK-0048 ItemLacksSizeButIsWholeUnitOnly The item requires a size since the item is not whole unit only.
E-CHK-0049 ItemHasNoValidSupplier The item has no Suppliers for the location.
E-CHK-0050 ItemHasNoZoningInformation Zoning information could not be found for the item.
E-CHK-0051 CantCheckoutUsingClosedInactiveStore A checkout was attempted on a closed or inactive store.
E-CHK-0052 CantCheckoutRestrictedItem A checkout was attempted for a restricted item.
E-CHK-0053 CantCheckoutExclusiveItem A checkout was attempted for an exclusive item.
E-CHK-0054 CantCheckoutItemTooLong The item exceeds the maximum length.
E-CHK-0055 CantCheckoutItemTooMany The item order exceeds the maximum quantity.
E-CHK-0056 LocationNotCached Location has not been set up for country
E-CHK-0057 MarketplaceMustGoToSameAddress Marketplace items must be delivered to the same address
E-CHK-0058 TimberTallySizeMismatch TimberTally failed match sizes
E-CHK-0059 LocationDoesntHandleCollection Location does not handle 'Click&Collect' or 'Drive&Collect' for item(s)
E-CHK-0060 LocationDoesntHandleDelivery Location does not handle 'Click&Deliver' for item(s)
E-CHK-0061 ItemLessThanMinSize Item is less than the minimum allowed size
E-CHK-0062 ItemMoreThanMaxSize Item is more than the maximum allowed size
E-CHK-0063 ItemInvalidSizeIncrement Item does not match the allowed size increment
E-CHK-0064 FulfilmentDataNotNeeded A line includes a FulfilmentRef which is not needed for the checkoutFulfilmentRulesSet value
E-CHK-0065 ContextNotValidForRoles The sales context is not valid for the security roles provided
E-CHK-0066 MarketplaceNotSupportedByContext Marketplace items are not supported for this context
E-CHK-0067 CustomerCantTransactInThisState The customer account cannot transact in this state
E-CHK-0068 StateNotAllowedForCountry The state cannot be supplied for this country
E-CHK-0069 StateMandatoryForCountry The state must be supplied for this country
E-CHK-0070 AddressCountryMandatory The country is mandatory for address
E-CHK-0071 AddressLocalityMandatory The locality/suburb is mandatory for address
E-CHK-0072 MarketplaceNotSupportedByUser Marketplace items are not supported for this type of user
E-CHK-0073 InvalidStateForCountry The state is invalid for the country
E-CHK-0074 SpecifiedItemNotSellable The item is not sellable
E-CHK-0075 ActualItemNotSellable The item mapped is not sellable
E-CHK-0076 DeliveryAddressNotSupportedByUser Delivery addresses are not supported for this user
E-CHK-0077 ItemNotFoundAtLocation The item is not found at Location
E-CHK-0078 ItemNotFoundForCountry The item is not found in the country
E-CHK-0079 StoresNotFoundForCountry Stores not found for Country
E-CHK-0080 ServerStateNotFoundForLocation Exceptional Trading Hours details cannot be fetched
E-CHK-0081 MiraklOrdersNotFoundForMarketLine Mirakl order not found for market line
Shipment call
Short error code Name Description
E-CHK-0200 ShipmentsMissing Shipments must be passed to the API.
E-CHK-0201 ShipmentsMissingMismatchCount Mismatch between the number of shipments and tokens.
E-CHK-0202 ShipmentsJwtInvalid Something was wrong with the token. Refer to logs for more details.
General
ENVIRONMENT Base URL
Sandbox https://ordering.sandbox.api.bunnings.com.au/ordering/
Test https://ordering.stg.api.bunnings.com.au/ordering/
Live https://ordering.api.bunnings.com.au/ordering/

Transaction API

Transaction API error codes
Short error code Name Description
E-CHK-0300 InvalidRequest A bad request was passed. One or more fields wre invalid.
E-CHK-0301 SystemError External API resonded with Problem details

CommercialCustomer API

Commercial Customer API error codes
Short error code Name Description
E-TRA-0001 InvalidTransactionRef  
E-TRA-0002 InvalidPageSize  
E-TRA-0003 InvalidTransactionSource  
E-TRA-0004 InvalidLocation  
E-TRA-0005 InvalidItemType  
E-TRA-0006 InvalidItemNumber  
E-TRA-0007 InvalidItemBarcode  
E-TRA-0008 InvalidCustomerType  
E-TRA-0009 InvalidTenderType  
E-TRA-0010 InvalidEftAccountType  
E-TRA-0011 InvalidEftCardType  

Ordering API

Ordering API error codes
Short error code Name Description
E-ORD-0006 ServiceHttpResponse Downstream service is unavailabe. Please check the error message or investigate the logs for futher information.
E-ORD-0007 LocationValidation Location is invalid. Please check the error message or investigate the logs for futher information.
E-ORD-0008 PriceValidation Pricing in invalid. Please check the error message or investigate the logs for futher information.
E-ORD-0009 CheckoutValidation Checkout validation failed. Please check the error message or investigate the logs for futher information.
E-ORD-2000 BasketSubmission Basket processing has failed. Please check the error message or investigate the logs for futher information.
E-ORD-1030 DataStore Basket processing has failed due to an error in the downstream data store. Please check the error message or investigate the logs for futher information.
E-ORD-0025 FlybuysValidation Flybuys information is incorrect for order, please reverify and try again.
E-ORD-0026 OnePassValidation OnePass information is incorrect for order, please reverify and try again.
General
Short error code Name Description
E-ORD-0010 GeneralValidation A bad request was passed. One or more fields were invalid.