Working With The PromoStandards Service API

Published on September 15, 2017

Did you know that PromoStandards has a service API? Well, it does, and it can be quite useful if you're integrating with multiple suppliers.

The API gives you the ability to query the PromoStandards database to get lists of suppliers that are implementing the standards and distributors who are using them, the service types and services that the standards supports, supplier endpoints, and more.

Let's take a look at a few API calls.


Endpoints by Company Code

Suppose that you wanted to get a list of all of Hit's service endpoints. Using cURL, you'd make a GET request like this:

curl "http://services.promostandards.org/WebServiceRepository/WebServiceRepository.svc/json/companies/Hit/endpoints"

The response will look something like this:

[
  {
    "Service": {
      "ServiceType": {
        "Code": "INV",
        "Name": "Inventory"
      },
      "Status": "Production",
      "Version": "1.2.1",
      "WSDL": "wsdl\/InventoryService\/1.2.1\/InventoryService.wsdl"
    },
    "TestURL": "",
    "URL": "https:\/\/ppds.hitpromo.net\/inventory"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "INVC",
        "Name": "Invoice"
      },
      "Status": "Beta",
      "Version": "0.0.1",
      "WSDL": "wsdl\/InvoiceService\/0.0.1\/InvoiceService.wsdl"
    },
    "TestURL": "https:\/\/dsstandardtest.hitpromo.net\/invoice",
    "URL": "https:\/\/ppds.hitpromo.net\/invoice"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "MED",
        "Name": "Media Content"
      },
      "Status": "Production",
      "Version": "1.1.0",
      "WSDL": "wsdl\/Media ContentService\/1.1.0\/Media ContentService.wsdl"
    },
    "TestURL": "https:\/\/ppds.hitpromo.net\/productMedia",
    "URL": "https:\/\/ppds.hitpromo.net\/productMedia"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "OSN",
        "Name": "Order Shipment Notification"
      },
      "Status": "Production",
      "Version": "1.0.0",
      "WSDL": "wsdl\/Order Shipment NotificationService\/1.0.0\/Order Shipment NotificationService.wsdl"
    },
    "TestURL": "",
    "URL": "https:\/\/ppds.hitpromo.net\/orderShipmentNotification"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "ODRSTAT",
        "Name": "Order Status"
      },
      "Status": "Production",
      "Version": "1.0.0",
      "WSDL": "wsdl\/Order StatusService\/1.0.0\/Order StatusService.wsdl"
    },
    "TestURL": "",
    "URL": "https:\/\/ppds.hitpromo.net\/orderStatus"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "Product",
        "Name": "Product Data"
      },
      "Status": "Production",
      "Version": "1.0.0",
      "WSDL": "wsdl\/Product DataService\/1.0.0\/Product DataService.wsdl"
    },
    "TestURL": "https:\/\/ppds.hitpromo.net\/productData",
    "URL": "https:\/\/ppds.hitpromo.net\/productData"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "PPC",
        "Name": "Product Pricing and Configuration"
      },
      "Status": "Production",
      "Version": "1.0.0",
      "WSDL": "wsdl\/Product Pricing And ConfigurationService\/1.0.0\/Product Pricing And ConfigurationService.wsdl"
    },
    "TestURL": "https:\/\/ppds.hitpromo.net\/pricingAndConfiguration",
    "URL": "https:\/\/ppds.hitpromo.net\/pricingAndConfiguration"
  },
  {
    "Service": {
      "ServiceType": {
        "Code": "PO",
        "Name": "Purchase Order"
      },
      "Status": "Beta",
      "Version": "0.0.7",
      "WSDL": "wsdl\/Purchase OrderService\/0.0.7\/Purchase OrderService.wsdl"
    },
    "TestURL": "https:\/\/dsstandardtest.hitpromo.net\/poService",
    "URL": "https:\/\/ppds.hitpromo.net\/poService"
  }
]

As you can see, an array of services that Hit supports is returned, including the version that they support and their production and test URLs.


Endpoint Types by Company and Service Code

Let's take another example. Suppose that you want information on Starline's support for the Inventory service. Using cURL, you'd make a GET request like this:

curl "http://services.promostandards.org/WebServiceRepository/WebServiceRepository.svc/json/companies/STAR/endpoints/types/INV"

The response will look something like this:

[
  {
    "Service": {
      "ServiceType": {
        "Code": "INV",
        "Name": "Inventory"
      },
      "Status": "Production",
      "Version": "1.2.1",
      "WSDL": "wsdl\/InventoryService\/1.2.1\/InventoryService.wsdl"
    },
    "TestURL": "",
    "URL": "https:\/\/services.starline.com\/inventoryservice\/customerinventoryservice.svc"
  }
]

As you can see, the PromoStandards service API is RESTful and responses are JSON-encoded. It's extremely easy to use, and very fast as well.

Full documentation on the PromoServices service API can be found here: http://promostandards.org/documentation/service_api/