API Menu

ABC Supply APIs

Order API

This API enables you to place orders to ABC Supply branches using an HTTP REST request. Order requests may specify branches, items, billing, shipping options and etc.


Authentication

The ABC Supply Order API uses the HTTP headers to pass authentication information to all endpoints . You must add the client_id and client_secret on HTTP headers of your request.

  • client_id: [value provided by the enterprise application team]
  • client_secret: [value provided by the enterprise application team]

Usage

Before you can get started with the ABC Supply’s APIs, you will need to register and request access to the ABC Supply Developer Portal. For now, the registration is by invitation only. You will be invited and will receive email to complete the registration.

After you have reviewed the API’s documentation and once you are ready to test it out, you will be provided the client_id and client_secret to begin using the sandbox API. For production, you will be given the API endpoint to use once authorized.

Requests Types

This API exposes 4 resources:

  1. /orders – posts orders (one or many may be posted in a single request)
  2. /confirmations – gets confirmations by batch id (query parameter)
  3. /confirmations/{confirmationNumber} – gets confirmations by confirmation number
  4. /orders/{orderNumber} – gets by order number

End Points

RESOURCE: POST /orders
DESCRIPTION:


Request

Headers

  • client_id
    • StringRequired
  • client_secret
    • StringRequired


curl "https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/orders" \
  -X POST \
  -d "[{\n  \"salesOrder\": {\n    \"typeCode\": \"SO\",\n    \"clientTrackingId\": \"493827\",\n    \"buyerPurchaseOrder\": \"PO-123456890\"\n  },\n  \"communications\": [\n    {\n      \"contactFunctionCode\": \"DC\",\n      \"name\": \"Ryan Donavan\",\n      \"telephone\": \"6108745000\",\n      \"email\": \"abc.buyer@googlemail.com\"\n    }\n  ],\n  \"shipment\": {\n    \"instructionsTypeCode\": \"AT\",\n    \"instructions\": \"Please leave in driveway\",\n    \"deliveryFromTime\": \"10:00\",\n    \"deliveryToTime\": \"10:00\",\n    \"deliveryTypeCode\": \"OTR\"\n  },\n  \"dates\": {\n    \"deliveryRequested\": \"2019-08-30\"\n  },\n  \"branch\": {\n    \"name\": \"ABC Supply of Niles\",\n    \"AbcBranchNumber\": \"18\"\n  },\n  \"billTo\": {\n    \"name\": \"ADVANCED ROOFING\",\n    \"AbcBillToNumber\": \"9876\"\n  },\n  \"shipTo\": {\n    \"addressLine1\": \"550 W Adams St\",\n    \"cityName\": \"Chicago\",\n    \"stateCode\": \"IL\",\n    \"customerJobName\": \"ADVANCED ROOFING\",\n    \"addressLine2\": \"Floor 11\",\n    \"postalCode\": \"60611\"\n  },\n  \"comments\": [\n    {\n      \"typeCode\": \"document_link\",\n      \"message\": \"http://papyrus.com/document?3939\",\n      \"date\": \"2019-11-22T13:56\"\n    }\n  ],\n  \"lines\": [\n    {\n      \"lineNumber\": \"1\",\n      \"quantityOrdered\": 10,\n      \"quantityUom\": \"EA\",\n      \"unitPrice\": 132.98,\n      \"AbcPartNumber\": \"A124R\",\n      \"buyerPartNumber\": \"PLT1M-M\",\n      \"desciption\": \"GAF ENG ROY SOV CHARCOAL 3/S\"\n    }\n  ]\n}]" \
  -H "client_id: " \
  -H "client_secret: " 


POST /api/partners/orderentry/v1/orders HTTP/1.1
Host: abcsupply-dev.cloudhub.io:443
client_id: 
client_secret: 

[{
  "salesOrder": {
    "typeCode": "SO",
    "clientTrackingId": "493827",
    "buyerPurchaseOrder": "PO-123456890"
  },
  "communications": [
    {
      "contactFunctionCode": "DC",
      "name": "Ryan Donavan",
      "telephone": "6108745000",
      "email": "abc.buyer@googlemail.com"
    }
  ],
  "shipment": {
    "instructionsTypeCode": "AT",
    "instructions": "Please leave in driveway",
    "deliveryFromTime": "10:00",
    "deliveryToTime": "10:00",
    "deliveryTypeCode": "OTR"
  },
  "dates": {
    "deliveryRequested": "2019-08-30"
  },
  "branch": {
    "name": "ABC Supply of Niles",
    "AbcBranchNumber": "18"
  },
  "billTo": {
    "name": "ADVANCED ROOFING",
    "AbcBillToNumber": "9876"
  },
  "shipTo": {
    "addressLine1": "550 W Adams St",
    "cityName": "Chicago",
    "stateCode": "IL",
    "customerJobName": "ADVANCED ROOFING",
    "addressLine2": "Floor 11",
    "postalCode": "60611"
  },
  "comments": [
    {
      "typeCode": "document_link",
      "message": "http://papyrus.com/document?3939",
      "date": "2019-11-22T13:56"
    }
  ],
  "lines": [
    {
      "lineNumber": "1",
      "quantityOrdered": 10,
      "quantityUom": "EA",
      "unitPrice": 132.98,
      "AbcPartNumber": "A124R",
      "buyerPartNumber": "PLT1M-M",
      "desciption": "GAF ENG ROY SOV CHARCOAL 3/S"
    }
  ]
}]


const headers = new Headers();
headers.append('client_id', '');
headers.append('client_secret', '');

const body = `[{
  "salesOrder": {
    "typeCode": "SO",
    "clientTrackingId": "493827",
    "buyerPurchaseOrder": "PO-123456890"
  },
  "communications": [
    {
      "contactFunctionCode": "DC",
      "name": "Ryan Donavan",
      "telephone": "6108745000",
      "email": "abc.buyer@googlemail.com"
    }
  ],
  "shipment": {
    "instructionsTypeCode": "AT",
    "instructions": "Please leave in driveway",
    "deliveryFromTime": "10:00",
    "deliveryToTime": "10:00",
    "deliveryTypeCode": "OTR"
  },
  "dates": {
    "deliveryRequested": "2019-08-30"
  },
  "branch": {
    "name": "ABC Supply of Niles",
    "AbcBranchNumber": "18"
  },
  "billTo": {
    "name": "ADVANCED ROOFING",
    "AbcBillToNumber": "9876"
  },
  "shipTo": {
    "addressLine1": "550 W Adams St",
    "cityName": "Chicago",
    "stateCode": "IL",
    "customerJobName": "ADVANCED ROOFING",
    "addressLine2": "Floor 11",
    "postalCode": "60611"
  },
  "comments": [
    {
      "typeCode": "document_link",
      "message": "http://papyrus.com/document?3939",
      "date": "2019-11-22T13:56"
    }
  ],
  "lines": [
    {
      "lineNumber": "1",
      "quantityOrdered": 10,
      "quantityUom": "EA",
      "unitPrice": 132.98,
      "AbcPartNumber": "A124R",
      "buyerPartNumber": "PLT1M-M",
      "desciption": "GAF ENG ROY SOV CHARCOAL 3/S"
    }
  ]
}]`;
	
const init = {
  method: 'POST',
  headers,
  body
};

fetch('https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/orders', init)
.then((response) => {
  return response.json(); // or .text() or .blob() ...
})
.then((text) => {
  // text is the response body
})
.catch((e) => {
  // error in e.message
});


import requests

url = 'https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/orders'
headers = {'client_id': '','client_secret': ''}
body = """[{
  "salesOrder": {
    "typeCode": "SO",
    "clientTrackingId": "493827",
    "buyerPurchaseOrder": "PO-123456890"
  },
  "communications": [
    {
      "contactFunctionCode": "DC",
      "name": "Ryan Donavan",
      "telephone": "6108745000",
      "email": "abc.buyer@googlemail.com"
    }
  ],
  "shipment": {
    "instructionsTypeCode": "AT",
    "instructions": "Please leave in driveway",
    "deliveryFromTime": "10:00",
    "deliveryToTime": "10:00",
    "deliveryTypeCode": "OTR"
  },
  "dates": {
    "deliveryRequested": "2019-08-30"
  },
  "branch": {
    "name": "ABC Supply of Niles",
    "AbcBranchNumber": "18"
  },
  "billTo": {
    "name": "ADVANCED ROOFING",
    "AbcBillToNumber": "9876"
  },
  "shipTo": {
    "addressLine1": "550 W Adams St",
    "cityName": "Chicago",
    "stateCode": "IL",
    "customerJobName": "ADVANCED ROOFING",
    "addressLine2": "Floor 11",
    "postalCode": "60611"
  },
  "comments": [
    {
      "typeCode": "document_link",
      "message": "http://papyrus.com/document?3939",
      "date": "2019-11-22T13:56"
    }
  ],
  "lines": [
    {
      "lineNumber": "1",
      "quantityOrdered": 10,
      "quantityUom": "EA",
      "unitPrice": 132.98,
      "AbcPartNumber": "A124R",
      "buyerPartNumber": "PLT1M-M",
      "desciption": "GAF ENG ROY SOV CHARCOAL 3/S"
    }
  ]
}]"""

req = requests.post(url, headers=headers, data=body)

print(req.status_code)
print(req.headers)
print(req.text)

Response

Headers

  • client_id
    • StringRequired
  • client_secret
    • StringRequired

Body

  • Media type: application/json


[{
"salesOrder": {
"typeCode": "SO",
"clientTrackingId": "989898",
"buyerPurchaseOrder": "PO-123456890"
},
"communications": [
{
"contactFunctionCode": "DC",
"name": "Cesar Nextyear",
"telephone": "1238765400",
"email": "abc.buyer@googlemail.com"
}
],
"shipment": {
"instructionsTypeCode": "AT",
"instructions": "Please leave in driveway",
"deliveryFromTime": "10:00",
"deliveryToTime": "10:00",
"deliveryTypeCode": "OTR"
},
"dates": {
"deliveryRequested": "2019-08-30"
},
"branch": {
"name": "ABC Supply of Anytown",
"AbcBranchNumber": "98"
},
"billTo": {
"name": "ADVANCED ROOFING",
"AbcBillToNumber": "9898"
},
"shipTo": {
"addressLine1": "1060 W Addison St",
"cityName": "Hometown",
"stateCode": "AZ",
"customerJobName": "ROOFTOP VIEW",
"addressLine2": "Floor 13",
"postalCode": "98765"
},
"comments": [
{
"typeCode": "document_link",
"message": "http://papyrus.com/document?9898",
"date": "2019-11-22T13:56"
}
],
"lines": [
{
"lineNumber": "1",
"quantityOrdered": 10,
"quantityUom": "EA",
"unitPrice": 123.45,
"AbcPartNumber": "A123Z",
"buyerPartNumber": "PLT1M-M",
"desciption": "USA ENG ROY SOV CHARCOAL 3/S"
}
]
}]

RESOURCE: GET /confirmations
DESCRIPTION: Return a list of confirmation


Request

Headers

  • client_id
    • StringRequired
  • client_secret
    • StringRequired

curl "https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/confirmations/{confirmationNumber}" \
  -H "client_id: " \
  -H "client_secret: "

GET /api/partners/orderentry/v1/confirmations/{confirmationNumber} HTTP/1.1
Host: abcsupply-dev.cloudhub.io:443
client_id: 
client_secret:


const headers = new Headers();
headers.append('client_id', '');
headers.append('client_secret', '');
	
const init = {
  method: 'GET',
  headers
};
	
fetch('https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/confirmations/{confirmationNumber}', init)
.then((response) => {
  return response.json(); // or .text() or .blob() ...
})
.then((text) => {
  // text is the response body
})
.catch((e) => {
  // error in e.message
});

import requests

url = 'https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/confirmations/{confirmationNumber}'
headers = {'client_id': '','client_secret': ''}

req = requests.get(url, headers=headers)

print(req.status_code)
print(req.headers)
print(req.text)

Parameters

Confirmation Number
confirmationNumber String Required

Response

Body

  • Media type: application/json
  • Any instance of data is allowed.

The API file specifies body for this request but it does not specify the data model.

[
    {
        "batchId": "B9900142",
        "confirmationNumber": "C4-1815453",
        "clientTrackingId": "20191011426",
        "status": "Requested"
    },
    {
        "batchId": "B9900142",
        "clientTrackingId": "201910114235b",
        "status": "Duplicate",
        "duplicateConfirmationNumber": "C4-1815446"
    }
]

RESOURCE: GET /orders/{orderNumber}
DESCRIPTION: Retrieves an order from Order Gateway


Request

Headers

  • client_id
    • StringRequired
  • client_secret
    • StringRequired

curl "https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/orders/{orderNumber}" \
  -H "client_id: " \
  -H "client_secret: " 

GET /api/partners/orderentry/v1/orders/{orderNumber} HTTP/1.1
Host: abcsupply-dev.cloudhub.io:443
client_id: 
client_secret: 


const headers = new Headers();
headers.append('client_id', '');
headers.append('client_secret', '');
	
const init = {
  method: 'GET',
  headers
};
	
fetch('https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/orders/{orderNumber}', init)
.then((response) => {
  return response.json(); // or .text() or .blob() ...
})
.then((text) => {
  // text is the response body
})
.catch((e) => {
  // error in e.message
});

import requests
	
url = 'https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/orders/{orderNumber}'
headers = {'client_id': '','client_secret': ''}
	
req = requests.get(url, headers=headers)
	
print(req.status_code)
print(req.headers)
print(req.text)

Parameters

Order Number
orderNumber Number Required
Max Value 2147483647

Response

Body

  • Media type: application/json
  •  Order Request
  • orderResponse
  • Order request format for submitting order to ABC-Supply


{
"salesOrder": {
"clientTrackingId": "493827",
"buyerPurchaseOrder": "PO-123456890",
"invoiced": false,
"typeCode": "SO",
"status": "Delivered"
},
"communications": [
{
"contactFunctionCode": "DC",
"name": "Ryan Donavan",
"telephone": "6108745000",
"email": "abc.buyer@googlemail.com"
}
],
"shipment": {
"instructionsTypeCode": "AT",
"instructions": "Please leave in driveway",
"deliveryFromTime": "10:00",
"deliveryToTime": "10:00",
"proofOfDeliveryUrl": "http://velocitypodportalweb20180214053156.azurewebsites.net/?orderId=48c0c40-14ce84ad4a93&source=ABC+Supply"
},
"shipmentStatus": [
{
"name": "Delivery Complete",
"typeCode": "CD",
"dateTime": "2019-11-22T13:56",
"deliveryNotes": "Left at the door"
}
],
"dates": {
"deliveryRequested": "2019-08-30"
},
"branch": {
"name": "ABC Supply of Niles",
"AbcBranchNumber": "18"
},
"billTo": {
"name": "ADVANCED ROOFING",
"AbcBillToNumber": "9876"
},
"shipTo": {
"addressLine1": "550 W Adams St",
"cityName": "Chicago",
"stateCode": "IL",
"customerJobName": "ADVANCED ROOFING",
"addressLine2": "Floor 11",
"postalCode": "60611"
},
"lines": [
{
"lineNumber": "1",
"quantityOrdered": 10,
"quantityUom": "EA",
"unitPrice": 132.98,
"AbcPartNumber": "A124R",
"buyerPartNumber": "PLT1M-M",
"desciption": "GAF ENG ROY SOV CHARCOAL 3/S"
}
]
}

RESOURCE: GET /confirmations/{confirmationNumber}
DESCRIPTION: Return a confirmation by confirmation number


Request

Headers

  • client_id
    • StringRequired
  • client_secret
    • StringRequired

curl "https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/confirmations/{confirmationNumber}" \
-H "client_id: " \
-H "client_secret: " 

GET /api/partners/orderentry/v1/confirmations/{confirmationNumber} HTTP/1.1
Host: abcsupply-dev.cloudhub.io:443
client_id: 
client_secret:


const headers = new Headers();
headers.append('client_id', '');
headers.append('client_secret', '');
	
const init = {
  method: 'GET',
  headers
};
	
fetch('https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/confirmations/{confirmationNumber}', init)
.then((response) => {
  return response.json(); // or .text() or .blob() ...
})
.then((text) => {
  // text is the response body
})
.catch((e) => {
  // error in e.message
});

import requests
	
url = 'https://abcsupply-dev.cloudhub.io/api/partners/orderentry/v1/confirmations/{confirmationNumber}'
headers = {'client_id': '','client_secret': ''}
	
req = requests.get(url, headers=headers)
	
print(req.status_code)
print(req.headers)
print(req.text)

Parameters

Confirmation Number
confirmationNumber String Required

Response

Body

  • Media type: application/json
  • Any instance of data is allowed.
  • The API file specifies body for this request but it does not specify the data model.

{
    "confirmationNumber": "C4-1815420",
    "batchId": "B9900122",
    "clientTrackingId": "201910114234b",
    "status": "Requested"
}



Support

The APIs that ABC Supply offers are designed to improve business transactions with us, and we provide you an expected service level you can integrate into your work flow. In addition, to ensure a highly quality experience for all our users, we monitor and place limits on API requests. Exceeding limits may result in your API access being disabled or revoked, so please be aware of the number of requests. If you have questions about API usage, please contact us at apirequest@abcsupply.com


FAQs

Question: What responses should I expect from a Branch Locator request?
Question: Will the Cubs win the World Series in 2022?