โฑ๏ธ Time to Complete: 2-3 hours
jobAccountNumber saved (from Step 5)A construction company may have multiple projects (job accounts) at the same branch, each with different billing and shipping addresses.
jobAccountNumber in customer sessionGET /branches/v2/customerBranchLocations/{customerCode}https://services-qa.roofhub.pro/branches/v2/customerBranchLocations/CUST12345Authorization: Bearer {token}Content-Type: application/json[
{
"branchCode": "CORAC", // ๐ช Branch identifier
"branchName": "AMERICAN ROOFING SUPPLY - RAPID CITY", // ๐ข Branch display name
"distanceFromShipToInMiles": 499.403, // ๐ Distance from customer ship-to address
"jobAccounts": [ // ๐ CRITICAL - Job accounts for this customer at this branch
{
"jobAccountNumber": 43, // ๐ฏ Required for Step 8 order submission!
"jobAccountName": "TUSING BUILDERS & RFG (SOLON)" // ๐ Job account description
}
]
},
{
"branchCode": "CORMN",
"branchName": "AMERICAN ROOFING SUPPLY - MINNEAPOLIS",
"distanceFromShipToInMiles": 234.567,
"jobAccounts": [
{
"jobAccountNumber": 89, // ๐ฏ Required for Step 8!
"jobAccountName": "CONSTRUCTION PROJECT A"
},
{
"jobAccountNumber": 90, // ๐ฏ Multiple job accounts possible
"jobAccountName": "REMODELING PROJECT B"
}
]
}
]jobAccountNumber: Required for order submission in Step 8 (numeric value)branchCode: Branch identifier for product/pricing queriesdistanceFromShipToInMiles: Helps select nearest branchjobAccounts: Array - customers can have multiple job accounts per branchjobAccountNumber from the desired job account - you'll need it for Step 8! Note: It's a numeric value, not a string.A roofing shingle may be available in 15 colors at one branch but only 8 colors at another. This endpoint tells you exactly what's available where.
productImageUrl)null imagesGET /branches/v2/activeBranchProducts/{branchCode}https://services-qa.roofhub.pro/branches/v2/activeBranchProducts/ATLAuthorization: Bearer {token}Content-Type: application/json[
{
"productId": 6706, // ๐ Unique product identifier
"productName": "Atlas GlassMaster 30 Shingles", // ๐ฆ Product display name
"productOptions": [ // ๐จ Available color/size options
"36\" x 12\" Black Shadow",
"36\" x 12\" Hearthstone Gray",
"36\" x 12\" Weathered Wood"
],
"productVariant": [ // ๐ Variants with UOM details
{
"variantId": 0,
"selectedOption": "36\" x 12\" Black Shadow",
"uoMs": ["SQ", "BD"] // ๐ Available units of measure
},
{
"variantId": 0,
"selectedOption": "36\" x 12\" Hearthstone Gray",
"uoMs": ["SQ", "BD"]
},
{
"variantId": 0,
"selectedOption": "36\" x 12\" Weathered Wood",
"uoMs": ["BD", "SQ"]
}
],
"productDescription": "High-quality architectural shingles", // ๐ Product description
"productFeatures": [ // โจ Key selling points
"30-year warranty",
"Wind resistance up to 130 mph",
"Class A fire rating"
],
"productUOM": ["SQ", "BD"], // ๐ All available UOMs
"productCategory": "Shingles", // ๐๏ธ Category
"manufacturer": "Atlas", // ๐ญ Manufacturer name
"productImageUrl": "https://example.com/image.jpg", // ๐ผ๏ธ Product image (or null)
"allowSubstitution": true, // ๐ Can substitute if out of stock
"primaryItem": true // โญ Is this the primary/default item
},
{
"productId": 94860,
"productName": "Atlas Pinnacle Impact IR Shingle",
"productOptions": [
"14\" x 42\" Desert Shake",
"14\" x 42\" Weathered Wood"
],
"productVariant": [
{
"variantId": 0,
"selectedOption": "14\" x 42\" Desert Shake",
"uoMs": ["BD"]
},
{
"variantId": 0,
"selectedOption": "14\" x 42\" Weathered Wood",
"uoMs": ["BD"]
}
],
"productDescription": "Impact-resistant shingles with IR technology",
"productFeatures": [
"Impact resistant",
"Energy efficient",
"Premium warranty"
],
"productUOM": ["BD"],
"productCategory": "Shingles",
"manufacturer": "Atlas",
"productImageUrl": null,
"allowSubstitution": false,
"primaryItem": false
}
]productId: Use this for pricing (Step 7) and order submission (Step 8)productOptions: Available color/size variantsproductVariant: Maps options to available UOMsproductUOM: Available units of measure (SQ=Square, BD=Bundle)allowSubstitution: Whether alternative products can be substitutedCustomer A gets 18/square (standard rate). Same product, different pricing!
| messageCode | Meaning | Action |
|---|---|---|
0 | Success | Proceed with order |
> 0 | Warning/Error | Check message field |
price = 0 | No pricing | Contact SRS or choose different product |
availableStatus = "Call" | Limited stock | Warn user, allow order |
POST /products/v2/priceAuthorization: Bearer {token}Content-Type: application/json{
"sourceSystem": "SOURCENAME", // ๐ Your integration identifier
"customerCode": "DEMO001", // ๐ค Customer account number
"branchCode": "HWPLY", // ๐ช Branch code
"transactionId": "SPR-1", // ๐ฏ Unique transaction ID
"jobAccountNumber": 1, // ๐ Job account number (numeric)
"productList": [
{
"productId": 77673, // ๐ฆ Product ID from Step 6
"productName": "Ace Insulation Plates",
"productOptions": ["N/A"],
"quantity": 1,
"uom": "PC"
}
]
}[
{
"itemCode": "ACEACEPLT3INI", // ๐ Internal item code
"productId": 77673, // ๐ฆ Matches request product ID
"productName": "Ace Insulation Plates", // ๐ Product name
"productOptions": ["N/A"], // ๐จ Selected options
"priceUOM": "PC", // ๐ Base unit of measure for pricing
"requestedUOM": "PC", // ๐ Requested unit of measure
"uomConversionFactor": 1, // ๐ Conversion factor (1 = no conversion)
"price": 0.25, // ๐ฐ CRITICAL - Unit price for this customer
"availableStatus": "Call for Availability", // โ
Stock status
"transactionId": "SPR-1", // ๐ฏ Matches request transaction ID
"message": "", // ๐ข Additional messages (empty if no issues)
"messageCode": 0 // ๐ข Message code (0 = success)
}
]price: Current unit price for this customeravailableStatus: Stock availability ("In Stock", "Call for Availability", etc.)priceUOM: Base unit of measure for pricinguomConversionFactor: Conversion multiplier between requested and price UOMmessageCode: 0 = success, other values indicate warnings/errors| Aspect | Synchronous | Asynchronous |
|---|---|---|
| Processing | Immediate | Queued |
| Response Time | 1-3 seconds | Instant (queued) |
| Order ID | Immediate | Via webhook later |
| During Maintenance | โ May fail | โ Queued safely |
| Retry Logic | Manual | Automatic |
| Best For | Testing, low volume | Production, high volume |
| Webhook Required | No | Yes |
| Reliability | Medium | High |
| Synchronous (Staging & Production) | Asynchronous (Production Only - Recommended) |
|---|---|
| How it works: Order processed immediately Instant Order ID response Best for: Staging environment testing Low-volume integrations Simple implementations | How it works: Order queued for processing Status updates via webhooks Best for: Production deployments High-volume integrations Maximum reliability Requires webhook setup |
POST /orders/v2/submitAuthorization: Bearer {token}Content-Type: application/jsonasync flag in the request.{
"sourceSystem": "SOURCENAME", // ๐ REQUIRED - Your integration identifier
"customerCode": "DEMO001", // ๐ REQUIRED - From Step 3
"jobAccountNumber": 1, // ๐ REQUIRED - Numeric value from Step 5!
"branchCode": "BRRIV", // ๐ REQUIRED - Branch code
"accountNumber": "DEMO001", // ๐ REQUIRED - Customer account number
"transactionID": "3932cdd6-38e7-4d19-a05c-cd866473bdea", // ๐ REQUIRED - Unique transaction ID
"transactionDate": "2023-05-11T10:49:34.187", // ๐ REQUIRED - ISO 8601 format
"notes": "", // ๐ REQUIRED - Order notes (can be empty string)
"shipTo": { // ๐ REQUIRED - Ship-to address
"name": "John", // ๐ REQUIRED
"addressLine1": "1234 COUNTY LINE ROAD", // ๐ REQUIRED
"addressLine2": "", // ๐ REQUIRED (can be empty)
"addressLine3": "", // ๐ REQUIRED (can be empty)
"city": "ONTARIO", // ๐ REQUIRED
"state": "NY", // ๐ REQUIRED
"zipCode": "14519" // ๐ REQUIRED
},
"poDetails": { // ๐ REQUIRED - PO and delivery details
"poNumber": "5641-8Test", // ๐ REQUIRED - Purchase order number
"reference": "5641: 7GP", // ๐ REQUIRED - Reference (can be empty)
"jobNumber": "", // ๐ REQUIRED - Job number (can be empty)
"orderDate": "2021-04-12", // ๐ REQUIRED - Order date (YYYY-MM-DD)
"expectedDeliveryDate": "2021-04-15", // ๐ REQUIRED - Delivery date (YYYY-MM-DD)
"expectedDeliveryTime": "Anytime", // ๐ REQUIRED - Delivery time (can be "Anytime")
"orderType": "WHSE", // ๐ REQUIRED - "WHSE" (delivery) or "WILLCALL" (pickup)
"shippingMethod": "Ground Drop" // ๐ REQUIRED - Shipping method
},
"orderLineItemDetails": [ // ๐ REQUIRED - Line items array
{
"productId": 75664, // ๐ REQUIRED - Product ID from Step 6
"productName": "CertainTeed Presidential Solaris Shingles", // ๐ REQUIRED - Product name
"option": "Country Gray", // ๐ REQUIRED - Selected color/option
"quantity": 1, // ๐ REQUIRED - Quantity (integer)
"price": 12, // ๐ REQUIRED - Price (integer)
"customerItem": "XXXX", // ๐ REQUIRED - Customer reference
"uom": "SQ" // ๐ REQUIRED - Unit of measure
},
{
"productId": 1443,
"productName": "CertainTeed Landmark Solaris Non-AR Shingles",
"option": "Burnt Sienna",
"quantity": 1,
"price": 12,
"customerItem": "XXXX",
"uom": "SQ"
},
{
"productId": 75621,
"productName": "CertainTeed SwiftStart Starter",
"option": "N/A",
"quantity": 1,
"price": 12,
"customerItem": "XXXX",
"uom": "BD"
}
],
"customerContactInfo": { // ๐ REQUIRED - Customer contact details
"customerContactName": "John Dough", // ๐ REQUIRED - Contact name
"customerContactPhone": "9876543210", // ๐ REQUIRED - Phone number
"customerContactEmail": "jdough@example.com", // ๐ REQUIRED - Email
"customerContactAddress": { // ๐ REQUIRED - Contact address
"addressLine1": "123 Main St",
"city": "Salt Lake City",
"state": "Utah",
"zipCode": "84121"
},
"additionalContactEmails": [ // ๐ REQUIRED - Additional emails array (can be empty)
"test@example.com"
]
}
}400 Bad Request - Missing required field: jobAccountNumber// โ Wrong
{
"customerCode": "DEMO001"
// jobAccountNumber missing
}
// โ
Correct
{
"customerCode": "DEMO001",
"jobAccountNumber": 1 // Required numeric value
}Order submission failed - Invalid job account// โ Wrong - String value
{
"jobAccountNumber": "1" // Wrong: string
}
// โ Wrong - Non-existent number
{
"jobAccountNumber": 999 // Doesn't exist for this customer
}
// โ
Correct - Valid numeric value from Step 5
{
"jobAccountNumber": 43 // From customerBranchLocations response
}Product not found at branchInvalid date format// โ Wrong formats
{
"orderDate": "04/12/2021", // MM/DD/YYYY not accepted
"expectedDeliveryDate": "2021.04.15" // Wrong separator
}
// โ
Correct format: YYYY-MM-DD
{
"orderDate": "2021-04-12",
"expectedDeliveryDate": "2021-04-15"
}Invalid orderType value// โ Wrong
{
"orderType": "Delivery", // Wrong: must be code
"shippingMethod": "Ground" // Incomplete
}
// โ
Correct
{
"orderType": "WHSE", // For delivery (or "WILLCALL" for pickup)
"shippingMethod": "Ground Drop" // From branch shippingMethods array
}Price validation failedInvalid shipping address// โ
All fields required (can be empty string but must exist)
{
"shipTo": {
"name": "John Doe", // Required
"addressLine1": "123 Main St", // Required
"addressLine2": "", // Required (can be empty)
"addressLine3": "", // Required (can be empty)
"city": "Denver", // Required
"state": "CO", // Required (2-letter code)
"zipCode": "80202" // Required (5 or 9 digits)
}
}jobAccountNumber from Step 5jobAccountNumber is numeric (not string)orderType is "WHSE" or "WILLCALL"shippingMethod matches branch available methodsquantity are integersprice are integers (e.g., 12 not 12.00)state is 2-letter code ("CO" not "Colorado")orderID from responsetransactionID from responsequeueID if async{
"message": "Order Submitted", // โ
Order successfully submitted
"transactionID": "ANY-UNIQUE-STRING-02.19.2024.v2.4", // ๐ฏ Your unique transaction ID (matches request)
"orderID": "35818786", // ๐ SAVE THIS! - SRS order ID for tracking
"queueID": "queue-abc123" // ๐ Queue identifier (null for sync, value for async)
}message - Confirmation messagetransactionID - Your unique transaction ID (from request)orderID - SRS order identifier - Use this to track order status via API or webhooksqueueID - Queue identifier (null for synchronous, has value for asynchronous processing)