IBM API Hub
IBM Sterling Intelligent Promising APIs

By IBM Sterling Intelligent Promising

IBM Sterling Intelligent Promising is a stand-alone cloud service solution that provides reliable inventory promises at every stage of a shopper's order lifecycle.


API reference

Get sourcing rules details

GET

/promising/{tenant}/v1/sourcing/rules/{ruleId}

Retrieve details of a specific sourcing rule.

Request URL
https://api.watsoncommerce.ibm.com/promising/{tenant}/v1/sourcing/rules/{ruleId}
Parameters
Name
Description
  • tenant
    REQUIRED
    string
    (path)

    The tenant ID provided by IBM.

  • ruleId
    REQUIRED
    string
    (path)

    The rule identifier for the rule for a tenant.

    Maximum length: 36
  • Accept
    string
    (header)
    application/json
  • Responses
    • 200

      Sourcing rule details response

    • 404

      Rule not found.

    Code snippet
      1curl --request GET \
      2  --url https://api.watsoncommerce.ibm.com/promising/REPLACE_TENANT/v1/sourcing/rules/REPLACE_RULEID \
      3  --header 'accept: application/json'

        Example response

          1{
          2  "name": "my first rule",
          3  "isEnabled": true,
          4  "desc": "my rule desc",
          5  "effectiveDate": {
          6    "from": "2021-10-12T13:00:00Z",
          7    "to": "2021-10-14T13:00:00Z"
          8  },
          9  "lastModifiedTime": "2022-01-13T14:42:00Z",
          10  "expr": {
          11    "and": [
          12      {
          13        "order.channel": {
          14          "eq": "channel"
          15        }
          16      },
          17      {
          18        "order.total": {
          19          "gt": 100
          20        }
          21      },
          22      {
          23        "order.seller": {
          24          "in": [
          25            "seller1",
          26            "seller2"
          27          ]
          28        }
          29      },
          30      {
          31        "order.customerType": {
          32          "eq": "customer"
          33        }
          34      },
          35      {
          36        "order.destination.countryCode": {
          37          "eq": "US"
          38        }
          39      },
          40      {
          41        "order.destination.state": {
          42          "in": [
          43            "MA",
          44            "NH"
          45          ]
          46        }
          47      },
          48      {
          49        "order.destination.city": {
          50          "notin": [
          51            "Nashua",
          52            "Lowell"
          53          ]
          54        }
          55      },
          56      {
          57        "line.deliveryMethod": {
          58          "eq": "SHP"
          59        }
          60      },
          61      {
          62        "line.total": {
          63          "lte": 10
          64        }
          65      },
          66      {
          67        "line.quantity": {
          68          "lte": 10
          69        }
          70      },
          71      {
          72        "item.itemId": {
          73          "in": [
          74            "item1",
          75            "item2"
          76          ]
          77        }
          78      },
          79      {
          80        "item.attribute.primaryInformation.allowGiftWrap": {
          81          "eq": true
          82        }
          83      },
          84      {
          85        "item.attribute.code.nmfcCode": {
          86          "eq": "abc123"
          87        }
          88      },
          89      {
          90        "item.attribute.itemAssignedAttributes": [
          91          {
          92            "itemAttributeGroupPath": "someGroup",
          93            "itemAttributeName": "color",
          94            "eq": "black"
          95          },
          96          {
          97            "itemAttributeGroupPath": "someGroup",
          98            "itemAttributeName": "size",
          99            "in": [
          100              "medium",
          101              "large"
          102            ]
          103          }
          104        ]
          105      }
          106    ]
          107  },
          108  "action": {
          109    "locationRestrictions": {
          110      "node": {
          111        "operator": "in",
          112        "value": [
          113          "Node1",
          114          "Node2"
          115        ]
          116      }
          117    },
          118    "carrierServiceRestrictions": {
          119      "carrierService": {
          120        "operator": "notin",
          121        "value": [
          122          "FedEx_Ground",
          123          "USPS_Overnight"
          124        ]
          125      }
          126    },
          127    "transferRestrictions": "ALWAYS"
          128  }
          129}