Orders Experience API

(0 reviews)

home

The Orders Experience API allows you to easily submit orders to JB HiFi, as well as make queries about existing orders you may have.


Acquiring JB APIM Token and API Request Access

User has to follow few steps before they call actual resource/endpoint. User should acquire JB APIM token and complete client application registration as needed to proceed further.

  • Acquiring JB APIM Token
(1) Acquiring JB APIM Token

Below are steps to get access token for accessing appropriate resources from client end:

Method: GET

Input Header(s):

    - Ocp-Apim-Subscription-Key
            - Required: Yes
            - Description: APIM Subscription Key
            - Type: string
            - Example: <value of **subscriptionKey**>
    - x-jbg-company
            - Required: Yes
            - Description: JBG Company
            - Type: string
            - Example: <value of target **company**> [ JBH ]
    - x-jbg-country
            - Required: Yes
            - Description: JBG Country
            - Type: string
            - Example: <value of **country**> [ AU ]
    - x-env
            - Required: Yes
            - Description: Application Environment Name
            - Type: string
            - Example: <value of **environment**> [ UAT ]
    - x-partner
            - Required: Yes
            - Description: Partner Name or Customer Name
            - Type: string
            - Example: <value of **partner**>

Response Details: API response will contain the JWT token for future usage with APIM.

  {
      "token" : "xxxxxxxxxxxxxxxxxxx"
  }
  • Call for Requested Resource/Endpoint:

User can invoke subsequence calls as per their need: Ex: Submit Orders ( POST /orders ) , Query Orders ( GET /orders ) etc.,

Please refer below API Use section for more details.


API Use
1. Submit Orders

Endpoint: /orders

Method: POST

Input Header(s):

None Required

Query Parameters

None Required

Request Payload

{
    "orderNumber"         : "12313",
    "orderNotes"          : "First Order",
    "orderSubmissionDate" : "01-01-2023",
    "orderItems": [
        {
            "SKU"         : "123231",
            "productName" : "Iphone 13",
            "productModel": "23",
            "quantity"    : 2
        }
    ],
    "shippingDetails" : {
          "contact" : {
              "firstName" : "JB",
              "lastName"  : "Business",
              "email"     : "jbbusinessconnect@jbhifi.com.au",
              "phone"     : "0400000000",
              "mobile"    : ""
          },
          "address": {
              "company"       : "Organic intangible algorithm",
              "streetAddress" : "059 Grace Island",
              "city"          : "Imogenhaven",
              "state"         : "Queensland",
              "postcode"      : "5913",
              "country"       : "Australia"
          }
      },
      "billingDetails"  : {
          "contact" : {
              "firstName" : "Loyalty",
              "lastName"  : "Rewards",
              "email"     : "invoices-loyalty-rewards@jbhifi.com.au.invalid",
              "phone"     : "0400000000",
              "mobile"    : ""
          },
          "address" : {
              "company"       : "Synchronised background time-frame",
              "streetAddress" : "625 Nate Crest",
              "city"          : "Christopherview",
              "state"         : "Victoria",
              "postcode"      : "6937",
              "country"       : "Australia"
          }
      }
}

Output Options: JSON

Example Output:

{
  "orderNumber"     : "3483938348398",
  "traceId"         : "1234-2345-34567-874546",
  "totalItemCostEx" : 234.50,
  "totalFreightCostEx"  : 9.99,
  "totalGST"            : 10,
  "orderItemResponses"  : [
    {
        "itemStatus"        : "Success",
        "orderItemReference": "JB_MULE-CN12334-3483938348398",
        "jbApiId"           : "JB_MULE-CN12334-3483938348398",
        "quantity"          : 2,
        "SKU"               : "123231",
        "costEx"            : 234.50

    }
  ]
}
2. Query Orders

Endpoint: /orders

Method: GET

Input Header(s):

None Required

Query Parameters

  • orderNumber
    • Required: Yes
    • Description: Order Id
    • Type: string
    • Example: 12313
  • orderSubmitDate
    • Required: No
    • Description: Order Submission Date
    • Type: string
    • Format: DDMMYYYY
    • Example: 01122023
  • orderStatus
    • Required: No
    • Description: Order Status
    • Type: string
    • Example: Processed

Output Options: JSON

Example Output:

[
  {
      "jbOrderNumber"         : "12313",
      "customerOrderNumber"   : "12313",
      "orderNotes": "First Order",
      "firstName": "John",
      "lastName": "Doe",
      "recipientBusinessName": "Business 1",
      "recipientPhone": "2312312",
      "recipientMobile": "0411223344",
      "recipientEmail": "john.doe@test.com",
      "orderSubmissionDate": "01-01-2023",
      "totalSalesPrice": 234.50,
      "orderItems": [
          {
              "SKU": "123231",
              "quantity": 2,
              "consignmentNoteNumber": "123456",
              "itemCost": 234.50,
              "courier": "Auspost",
              "itemStatus"      : "Draft",
              "itemTrackingURL" : "http://tracking.com.au/123456"
          }
      ],
      "deliveryAddress": {
          "addressLine": "34 Hunter Street",
          "suburb": "Mount Druitt",
          "state": "NSW",
          "postcode": "1234",
          "country": "Australia"
      }
  }
]

Reviews