--- openapi: 3.0.1 info: title: Query Pricing description: "Query Pricing API is used to provided product unit prices for catalogs'\ \ prices. Prices include local Tax rates where relevant. All prices are stored\ \ in the system with a unique id. This id can be used later to lookup the details\ \ of a price.\n## Security\n Depending on the scope held, more or less functionality\ \ is available at an endpoint. There are further access controls in place to ensure\ \ the scope of the price lookup functionality is within a bounds suitable for\ \ the client making the request.\n Gets the detail for a price based on the item numbers provided in the\ \ request." termsOfService: "http://developer.bunnings.com.au/terms" contact: name: Developer Support email: developer@bunnings.com.au version: "1.0" servers: - url: https://pricing.sandbox.api.bunnings.com.au/pricing description: BASE URL - For sandbox access (mock data) - url: https://pricing.stg.api.bunnings.com.au/pricing description: BASE URL - For test access (test data) - url: https://pricing.api.bunnings.com.au/pricing description: BASE URL - For production access (live data) paths: /discovery: get: tags: - "Discovery" summary: Provides an overview to current functionality offered by the API description: "Returns a set of links that are valid operational roots in this API.\ \ These end points can be used for application interaction. Please keep in\ \ mind that some of these link URIs may be templates that will need to be filled\ \ in to be called." operationId: "PRI:001/Discovery/GET" parameters: - name: "x-version-api" in: "header" description: "The API version the client is calling this endpoint at. When\ \ calling this API the client must provided the version of the API they\ \ have been written against this allows the API to correctly support the\ \ calling clients. Clients are still required to support non breaking changes\ \ within the same version" required: true schema: type: "string" example: "1.0" responses: "200": description: "Success" headers: ETag: description: "An ETag of the resource" schema: type: "string" description: "An ETag of the resource" format: "" content: application/json: schema: $ref: "#/components/schemas/EntryPoint" links: PRI:001/Discovery/GET: operationId: "PRI:001/Discovery/GET" description: "Initial discovery endpoint ascertain new entry link availabilities." PRI:003/catalog/prices/POST: operationId: "PRI:003/catalog/prices/POST" description: "Retrieves catalog prices." "400": description: "There was a problem with the request. The details are in an\ \ RFC 7807 compliant problem. [RFC 7807](https://tools.ietf.org/html/rfc7807)" content: application/problem+json: schema: $ref: "#/components/schemas/ProblemDetails" "401": description: "Unauthorized" "403": description: "Forbidden" "429": description: "Too many request back off and try again later" "5XX": description: "An unexpected error has occurred" security: - oauth2: - "pri:pub" - bearer: - "pri:pub" /catalog/prices: post: tags: - "Price Search" summary: Provides an overview to current functionality offered by the API description: "# Catalog Price\nUse this to get prices for items independent\ \ of a basket. This is typically used in\na product lookup type role." operationId: "PRI:003/catalog/prices/POST" parameters: - name: "x-version-api" in: "header" description: "The API version the client is calling this endpoint at. When\ \ calling this API the client must provided the version of the API they\ \ have been written against this allows the API to correctly support the\ \ calling clients. Clients are still required to support non breaking changes\ \ within the same version" required: true schema: type: "string" example: "1.0" - name: "$select" in: "query" description: "Select can optionally be used to project only the required properties\ \ of the entity/entities from the server.\n- list required properties separated\ \ with a ','.\n- property names are case insensitive.\n- '\\\\*' can be\ \ used as a wild card for any property.\n- use '/' to address complex type\ \ properties.\n\nexample: $select=name,address/state,contact/*/phoneNumber" schema: type: "string" requestBody: content: application/json: schema: $ref: "#/components/schemas/CatalogPriceRequest" example: context: country: "AU" location: "7040" items: - itemNumber: "0123456" responses: "200": description: "Success" content: application/json: schema: $ref: "#/components/schemas/CatalogPrices" examples: Retail: summary: "Example retrial customer" value: prices: - itemNumber: "1234567" unitPrice: 1.56 lineUnitPrice: 1.56 priceId: "S1:AU:ec7a0e50-3a71-4f7c-a81b-79a32c8d11be" _meta: _objectUuid: "B79BE6AE-3280-4D40-9FA8-10F4F7FCE186" _objectVersion: "0" _links: [] - itemNumber: "2345678" unitPrice: 5 lineUnitPrice: 5 priceId: "S1:AU:FBC679E8-459B-4167-AE37-D66AB3F7CDEB" _meta: _objectUuid: "230156C7-6081-44E2-B66E-993F30DD54AF" _objectVersion: "0" _links: [] "400": description: "There was a problem with the request. The details are in an\ \ RFC 7807 compliant problem. [RFC 7807](https://tools.ietf.org/html/rfc7807)" content: application/problem+json: schema: $ref: "#/components/schemas/ProblemDetails" "401": description: "Unauthorized" "403": description: "Forbidden" "429": description: "Too many request back off and try again later" "5XX": description: "An unexpected error has occurred" security: - oauth2: - "pri:pub" - bearer: - "pri:pub" components: schemas: Country: enum: - "AU" - "NZ" type: "string" description: "the ISO 3166-1 Alpha-2 code for the country the item requested\ \ belongs to. currently only Australia AU and New Zealand NZ" Context: required: - "country" - "location" type: "object" properties: country: $ref: "#/components/schemas/Country" location: type: "string" description: "the 4 digit bunnings location code." description: "context under which this request is made" HateOasLinks: type: "object" properties: rel: type: "string" description: "Gets or sets the rel." nullable: true href: type: "string" description: "Gets or sets the href." nullable: true methods: type: "array" items: type: "string" description: "Gets or sets the methods." nullable: true description: "Hypermedia links" ProblemDetails: type: "object" properties: type: type: "string" description: "A URI reference [RFC3986] that identifies the problem type.\ \ This specification encourages that, when\r\ndereferenced, it provide\ \ human-readable documentation for the problem type\r\n(e.g., using HTML\ \ [W3C.REC-html5-20141028]). When this member is not present, its value\ \ is assumed to be\r\n\"about:blank\"." nullable: true title: type: "string" description: "A short, human-readable summary of the problem type.It SHOULD\ \ NOT change from occurrence to occurrence\r\nof the problem, except for\ \ purposes of localization(e.g., using proactive content negotiation;\r\ \nsee[RFC7231], Section 3.4)." nullable: true status: type: "integer" description: "The HTTP status code([RFC7231], Section 6) generated by the\ \ origin server for this occurrence of the problem." format: "int32" nullable: true detail: type: "string" description: "A human-readable explanation specific to this occurrence of\ \ the problem." nullable: true instance: type: "string" description: "A URI reference that identifies the specific occurrence of\ \ the problem.It may or may not yield further information if dereferenced." nullable: true additionalProperties: type: "object" description: "A machine-readable format for specifying errors in HTTP API responses\ \ based on https://tools.ietf.org/html/rfc7807." Item: type: "object" properties: itemNumber: type: "string" description: "Bunnings unique identifier\r\nfor Items. This is a 7 digit\ \ numerical." nullable: true example: "0123456" description: "Item" CatalogPriceRequest: required: - "context" - "items" type: "object" properties: context: $ref: "#/components/schemas/Context" items: type: "array" items: $ref: "#/components/schemas/Item" description: "List of catalog items" description: "Catalog price request context and catalog items" CatalogPriceResult: type: "object" properties: itemNumber: type: "string" description: "Bunnings unique identifier\r\nfor Items. This is a 7 digit\ \ numerical." nullable: true example: "0123456" unitPrice: type: "number" description: "this is the unit price for this item including GST, the price\ \ may be more than \r\ntwo decimal places. for example when trying to\ \ hit a specific gst exclusive PowerPass price.\r\n \r\nthis\ \ price includes any transaction level discount (TM Discount) already\ \ applied for a line of a single unit.\r\nwhen calculating a transaction\ \ total this can not just be multiplied by size (length) and quantity." format: "double" example: 1.56 lineUnitPrice: type: "number" description: "The unit price excluding transaction level discount (TM Discount).\ \ Can be used to calculate a line total that will.\r\nthen have the transaction\ \ level discount applied to the subtotal of the lines." format: "double" example: 1.56 priceId: type: "string" description: "price id is an opaque string identifying a unique calculated\ \ price" nullable: true example: "S1:AU:00000062-7d55-4d54-b882-1ab8bc088214" _meta: type: "object" additionalProperties: type: "string" description: "Gets or sets the meta." nullable: true _links: type: "array" items: $ref: "#/components/schemas/HateOasLinks" description: "The links." nullable: true readOnly: true description: "Catalog price for an Item Number including PriceId and Unit Price" CatalogPrices: type: "object" properties: prices: type: "array" items: $ref: "#/components/schemas/CatalogPriceResult" description: "The best individual price for each item in the catalog request." nullable: true description: "Catalog pricing response" EntryPoint: type: "object" properties: _meta: type: "object" additionalProperties: type: "string" description: "Gets or sets the meta." nullable: true _links: type: "array" items: $ref: "#/components/schemas/HateOasLinks" description: "The links." nullable: true readOnly: true description: "Entry points for API" securitySchemes: oauth2: type: "oauth2" flows: clientCredentials: tokenUrl: "https://connect.sandbox.api.bunnings.com.au/connect/token" bearer: type: "http" description: "JWT Authorization header using the Bearer scheme." scheme: "bearer" bearerFormat: "JWT" tags: - name: "Discovery" description: "Discovery endpoints used to get initial links" - name: "Price Search" description: "Perform pricing on some given items"