Standard-Order-API icon

Standard-Order-API

(0 reviews)
This is Standard Order API for Order Automation project

Standard Order Experience API

Version: v1.0.0

Status: Production Ready

API Type: Experience Layer

Protocol: REST/HTTPS

Last Updated: June 15, 2026


Table of Contents


Overview

General Information

PropertyValue
API Namestandard-order-api
Versionv1
Base URLhttps://muleqc.diam.compucom.com
Base URI/api/standard-order/
Full Endpointhttps://muleqc.diam.compucom.com/api/standard-order/
ProtocolHTTPS
FormatJSON

Environment URLs

EnvironmentBase URL
Developmenthttps://muledev.diam.compucom.com
QC (Quality Control)https://muleqc.diam.compucom.com
Productionhttps://muleprod.diam.compucom.com

📝 Note: This documentation uses the QC environment (https://muleqc.diam.compucom.com) in all examples. Replace with the appropriate environment URL for your specific needs.

Purpose

The Standard Order Experience API serves as a centralized integration layer for managing device and inventory orders across multiple enterprise clients. It provides a unified interface for order processing, status updates, and workflow orchestration between client systems and backend order management platforms.

Key Features

📝 Order Creation

Accept and process orders from various client portals with comprehensive validation, transformation, and intelligent routing to backend systems such as DIMS or LCAM.

🔄 Status Updates

Receive real-time order status updates from backend systems and propagate them to the appropriate client applications, ensuring seamless communication throughout the order lifecycle.

🔀 Client Routing

Intelligent routing based on client identifiers with support for client-specific data transformations, business rules, and processing workflows.

đŸ›Ąī¸ Error Handling

Comprehensive error handling with automatic retry mechanisms in the Mule runtime. Errors are returned to customers for the order creation flow, and to backend systems for order updates, enabling graceful recovery and retry capabilities.

Use Cases

  • Multi-Client Integration: Single API endpoint serving multiple client organizations with customized requirements and workflows
  • Order Lifecycle Management: End-to-end order tracking from creation through fulfillment
  • System Orchestration: Seamless integration between client portals and backend order management systems
  • Real-Time Status Updates: Bi-directional communication for order status changes

API Architecture

High-Level Architecture

┌──────────────────────────────────────────┐
│         Client Systems & Portals         │
│      (Web, Mobile, ERP Systems)          │
└────────────────â”Ŧ─────────────────────────┘
                 │ HTTPS/REST
                 │
┌────────────────â–ŧ──────────────────────────────────┐
│      Standard Order Experience API                │
│   ┌──────────────────────────────────────────┐    │
│   │   APIKit Router (RAML Validation)        │    │
│   └─────────────â”Ŧ────────────────────────────┘    │
│                 │                                  │
│   ┌─────────────â–ŧ────────────────────────────┐    │
│   │   Client Identification & Routing        │    │
│   │   â€ĸ Parent Customer Number Resolution    │    │
│   │   â€ĸ Dynamic Client Configuration         │    │
│   └─────────────â”Ŧ────────────────────────────┘    │
│                 │                                  │
│   ┌─────────────â–ŧ────────────────────────────┐    │
│   │   Data Transformation Layer              │    │
│   │   â€ĸ Schema Validation                    │    │
│   │   â€ĸ Field Mapping & Truncation           │    │
│   │   â€ĸ Client-Specific Transformations      │    │
│   │   â€ĸ Sales Reference Number Generation    │    │
│   └─────────────â”Ŧ────────────────────────────┘    │
└─────────────────â”ŧ────────────────────────────────┘
                  │
         ┌────────┴────────┐
         │                 │
    ┌────â–ŧ─────────┐  ┌────â–ŧ─────────┐
    │ DIMS System  │  │ LCAM System  │
    │ (Backend)    │  │ (Backend)    │
    └──────────────┘  └──────────────┘

Integration Points

ComponentPurposeProtocolAuthentication
Backend SystemsCore order processing and inventory managementREST/HTTPSBasic Auth / OAuth 2.0
DatabaseSales reference number generation and configuration storageJDBCUsername/Password
Object StoreOAuth token caching and session managementMuleSoft RuntimeN/A

â„šī¸ Architecture Pattern
This API follows the MuleSoft API-Led Connectivity approach as an Experience Layer API. It abstracts client-specific complexities and provides a consistent, easy-to-use interface while delegating core business processing to backend system APIs.


API Endpoints

The API exposes three main endpoints for order creation and status management. All endpoints are prefixed with /api/standard-order/


POST /order

Flow Type: Synchronous

Response Code: 201 Created

Response Time: ~2-5 seconds (typical)

Authentication: Basic Auth

Description

Creates a new order with synchronous processing. This endpoint provides immediate validation, processes the order, and returns confirmation upon successful submission to the backend system (DIMS or LCAM).

Features
  • Comprehensive Field Validation: Enforces backend system field length and format requirements
  • Intelligent Client Routing: Automatic routing based on parent customer number
  • Sales Reference Number Generation: Auto-generates unique order reference numbers if not provided
  • Real-Time Processing: Synchronous order creation with immediate confirmation
Request Example

Endpoint: POST https://muleqc.diam.compucom.com/api/standard-order/order

Headers:

Content-Type: application/json

Authorization: Basic <base64-encoded-credentials>

Body:

json

{

"order": [{

"salesRefNumber": "M0001234",

"customerNumber": "530101390",

"parentCustomerNumber": "799249461",

"entryDate": "08/26/20",

"requestedDate": "08/26/20",

"shipCustomerName": "Dane, Jane",

"shipCity": "FORT MILL",

"shipZipCode": "29707",

"shipAddress1": "8106 Calvin Hall Road",

"shipAddress2": "",

"shipAddress3": "",

"shipState": "SC",

"shipCountry": "US",

"shipPhone": "803-555-0123",

"requestedByEmail": "jane.dane@example.com",

"requestedForEmail": "recipient@example.com",

"requestedForName": "John Smith",

"requestedForPhone": "803-555-0456",

"customerPOReleaseNumber": "1098723456",

"customerPONumber": "PO-2020-08-001",

"viaCode": "bw",

"geoCode": 41,

"token": "",

"creditCardType": "",

"orderDetails": [

{

"orderLine": 1,

"customerPOLine": 1300,

"quantityOrdered": 2.0,

"price": 65.44,

"itemNumber": "R65736",

"description": "APC RACK SCREWS AND NUTS",

"manPartNo": "AR8100"

},

{

"orderLine": 2,

"customerPOLine": 1301,

"quantityOrdered": 1.0,

"price": 24.40,

"itemNumber": "R61591",

"description": "NETGEAR FS108 SWITCH 8 PORTS",

"manPartNo": "FS108NA"

}

],

"udf": [

{

"fieldNumber": 1,

"orderLine": 0,

"fieldName": "user_id",

"fieldDescription": "jdane",

"fieldLevel": "H"

},

{

"fieldNumber": 2,

"orderLine": 0,

"fieldName": "employee_number",

"fieldDescription": "EMP123456",

"fieldLevel": "H"

},

{

"fieldNumber": 3,

"orderLine": 0,

"fieldName": "email-addr",

"fieldDescription": "jane.dane@example.com",

"fieldLevel": "H"

}

],

"memo": [

{

"orderLine": 0,

"type": "o",

"comments": "Please deliver to front door reception desk"

}

]

}]

}

Response Example

201 Created - Success Response

{
  "status": "Success",
  "salesRefNumber": "M0047665"
}

400 Bad Request - Validation Error

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Missing required field: parentCustomerNumber"
  }
}

500 Internal Server Error - System Error

{
  "error": {
    "code": "BACKEND_ERROR",
    "message": "Unable to connect to backend system. Please try again later."
  }
}

POST /orderUpdate

Flow Type: Synchronous

Response Code: 200 OK

Retry Attempts: 3 attempts with exponential backoff

Authentication: Client-Specific (Basic Auth or OAuth 2.0)

Description

Receives order status updates from backend systems (DIMS or LCAM) and routes them to the appropriate client systems. This endpoint handles various order lifecycle events including shipment notifications, invoice generation, and order completion.

Features
  • Automatic Retry Logic: Built-in retry mechanism with exponential backoff for transient failures
  • OAuth Token Refresh: Automatic token refresh for expired OAuth credentials
  • Multi-Client Routing: Intelligent routing based on parent customer number
  • Comprehensive Status Updates: Supports order status, shipment tracking, invoice details, and serial numbers
Request Example

Endpoint: POST https://muleqc.diam.compucom.com/api/standard-order/orderUpdate

Headers:

Content-Type: application/json

Authorization: Depeds on client system

Body:

json

{

"orderHeader": [{

"transactionId": 82,

"salesRefNumber": "M0000286",

"orderNumber": 109593246,

"customerPONumber": "PO-2022-01-027",

"orderDate": "01/27/22",

"scheduledDate": "01/28/22",

"carrierId": "BW",

"orderStatus": "80",

"orderStatusDescription": "Partial Shipment",

"taxAmount": 72.50,

"totalAmount": 1010.00,

"currencyId": "USD",

"invoiceDate": "01/28/22",

"paymentTermId": "09",

"invoiceNumber": 65426326,

"customerNumber": "000054602",

"parentCustomerNumber": "ASSOCPURC",

"shipDate": "01/28/22",

"shipViaDesc": "Ground Shipping",

"dueDate": "02/27/22",

"ppsNumber": 21942216,

"callBackURL": "https://workflow.example.com/callback/243833/OAUpdateCallback/4863287883744102164",

"orderHeaderUdf": [

{

"orderNumber": 109593246,

"fieldName": "employee_number",

"fieldDescription": "EMP123456"

},

{

"orderNumber": 109593246,

"fieldName": "user_id",

"fieldDescription": "jsmith"

}

],

"orderDetails": [

{

"orderNumber": 109593246,

"lineNumber": 1,

"itemNumber": "EN4356",

"quantityOrdered": 2,

"quantityShipped": 2,

"customerPOLine": 1300,

"manPartNo": "32MU59-B",

"itemDescription": "32IN 4K 3840X2160 LED LCD MONITOR"

},

{

"orderNumber": 109593246,

"lineNumber": 2,

"itemNumber": "EG1181",

"quantityOrdered": 1,

"quantityShipped": 0,

"customerPOLine": 1301,

"manPartNo": "KB-800",

"itemDescription": "WIRELESS KEYBOARD"

}

],

"waybill": [

{

"ppsNumber": 21942216,

"packageId": "001",

"waybillNumber": "1Z999AA10123456784"

}

],

"invoiceLine": [

{

"invoiceNumber": 65426326,

"invoiceLinesId": 1,

"customerPOLine": 1300,

"qtyInvoiced": 2,

"itemNo": "EN4356",

"itemPrice": 500.00,

"grossAmount": 1000.00,

"taxAmount": 72.50,

"manPartNo": "32MU59-B",

"itemDescription": "32IN 4K 3840X2160 LED LCD MONITOR",

"invoiceLineUdf": [

{

"documentLineNo": 1,

"fieldName": "warranty_code",

"fieldDescription": "3YR-ONS"

}

],

"serialNumber": [

{

"invoiceLinesId": 1,

"serialNumber": "SN123456789ABC"

},

{

"invoiceLinesId": 1,

"serialNumber": "SN987654321XYZ"

}

]

}

]

}]

}

Response Example

200 OK - Success Response

{
  "status": 200,
  "message": "Order update processed successfully"
}

400 Bad Request - Invalid Payload

{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid order update payload format"
  }
}
Error Handling & Retry Logic
  • Connectivity Issues: Automatic retry with exponential backoff (1s, 2s, 4s intervals)
  • Authentication Failures: OAuth token refresh with automatic retry
  • Timeout Handling: 30-second timeout per attempt with retry on timeout
  • Final Failure: After 3 failed attempts, error details are logged and returned to the backend system

POST /v2/order

Flow Type: Synchronous

Response Code: 201 Created

Version: 2.0

Authentication: OAuth 2.0

Description

This endpoint provides the same order creation functionality as /order but uses OAuth 2.0 authentication instead of Basic Auth. This version is maintained as part of the API versioning strategy to support clients requiring OAuth-based authentication.

Features
  • OAuth 2.0 Authentication: Token-based authentication with automatic refresh
  • Identical Functionality: Same validation, routing, and processing as /order
  • Version Isolation: Future breaking changes will be isolated to this versioned endpoint

â„šī¸ Version Strategy
This endpoint is maintained for API versioning and authentication flexibility. Future breaking changes to the order creation logic will be implemented in this versioned endpoint for OAuth clients, while /order continues to serve clients using Basic Authentication.

Request & Response

The request and response formats are identical to the POST /order endpoint, with the only difference being the authentication method.

Authentication Header:

Authorization: Bearer <oauth-access-token>


Data Models

Create Order Request Schema

{
  "order": [{
    "customerNumber": "string (optional, max 9)",
    "parentCustomerNumber": "string (required, max 14)",
    "entryDate": "string (required, format: MM/DD/YY)",
    "requestedDate": "string (required, format: MM/DD/YY)",
    "customerPONumber": "string (required, max 25)",
    "shipCustomerName": "string (required, max 35)",
    "shipAddress1": "string (required)",
    "shipAddress2": "string (optional, max 35)",
    "shipAddress3": "string (optional, max 35)",
    "shipCity": "string (required)",
    "shipState": "string (required, max 2)",
    "shipZipCode": "string (required, max 9)",
    "shipCountry": "string (required, max 3)",
    "shipPhone": "string (optional, max 25)",
    "requestedForEmail": "string (optional, max 250)",
    "requestedByEmail": "string (optional, max 250)",
    "requestedForName": "string (optional, max 50)",
    "requestedForPhone": "string (optional, max 50)",
    "customerPOReleaseNumber": "string (optional, max 35)",
    "shipPartially": "boolean (optional)",
    "viaCode": "string (optional, max 2)",
    "geoCode": "integer (optional, 0-999999999)",
    "token": "string (optional, max 20)",
    "creditCardType": "string (optional, max 30)",
    "tokenName": "string (optional)",
    "threeDeltaExpire": "string (optional, max 5, format: MM/YY)",
    "partnerBillingStreet": "string (optional, max 50)",
    "partnerBillingZip": "string (optional, max 10)",
    "callBackURL": "string (optional, max 250)",
    "salesRefNumber": "string (optional, max 8)",
    "orderDetails": [{
      "customerPOLine": "integer (optional, 0-999999999)",
      "orderLine": "integer (required, 0-999999999)",
      "quantityOrdered": "integer (required, 0-999999999)",
      "price": "number (required, multipleOf: 0.01)",
      "itemNumber": "string (required)",
      "description": "string (required)",
      "manPartNo": "string (optional)"
    }],
    "udf": [{
      "fieldNumber": "integer (optional, 0-99)",
      "fieldLevel": "string (optional, max 1)",
      "fieldName": "string (optional)",
      "fieldDescription": "string (optional, max 250)",
      "orderLine": "integer (optional, 0-999)"
    }],
    "memo": [{
      "orderLine": "integer (optional, 0-999)",
      "type": "string (optional, max 3)",
      "comments": "string (optional, max 32000)"
    }]
  }]
}

Update Order Request Schema

{
  "orderHeader": [{
    "transactionId": "integer (optional, max 999999999)",
    "salesRefNumber": "string (optional)",
    "customerNumber": "string (optional)",
    "parentCustomerNumber": "string (optional)",
    "orderNumber": "integer (optional, max 999999999)",
    "orderDate": "string (optional, format: MM/DD/YY)",
    "scheduledDate": "string (optional, format: MM/DD/YY)",
    "carrierId": "string (optional)",
    "orderStatus": "string (optional)",
    "orderStatusDescription": "string (optional)",
    "taxAmount": "number (optional, multipleOf: 0.01)",
    "totalAmount": "number (optional, multipleOf: 0.01)",
    "currencyId": "string (optional)",
    "invoiceDate": "string (optional, format: MM/DD/YY)",
    "paymentTermId": "string (optional)",
    "invoiceNumber": "integer (optional, max 999999999)",
    "anticipatedArrivalDate": "string (optional, format: MM/DD/YY)",
    "shipDate": "string (optional, format: MM/DD/YY)",
    "shipViaDesc": "string (optional)",
    "dueDate": "string (optional, format: MM/DD/YY)",
    "ppsNumber": "integer (optional, max 999999999)",
    "callBackURL": "string (optional)",
    "orderDetails": [{
      "orderNumber": "integer (optional, max 999999999)",
      "lineNumber": "integer (optional, max 999)",
      "itemNumber": "string (optional)",
      "quantityOrdered": "integer (optional, 0-999999999)",
      "quantityShipped": "integer (optional, 0-999999999)",
      "customerPOLine": "integer (optional, 0-999999999)",
      "manPartNo": "string (optional)",
      "itemDescription": "string (optional)",
      "orderLineUdf": [{
        "documentLineNo": "integer (optional, max 999999999)",
        "fieldName": "string (optional)",
        "fieldDescription": "string (optional)"
      }]
    }],
    "orderHeaderUdf": [{
      "orderNumber": "integer (optional, max 999999999)",
      "fieldName": "string (optional)",
      "fieldDescription": "string (optional)"
    }],
    "waybill": [{
      "ppsNumber": "integer (optional, max 999999999)",
      "packageId": "string (optional)",
      "waybillNumber": "string (optional)"
    }],
    "invoiceLine": [{
      "invoiceNumber": "integer (optional, max 999999999)",
      "invoiceLinesId": "integer (optional, max 999999999)",
      "customerPOLine": "integer (optional, 0-999999999)",
      "qtyInvoiced": "integer (optional, 0-999999999)",
      "itemNo": "string (optional)",
      "itemPrice": "number (optional, multipleOf: 0.01)",
      "grossAmount": "number (optional, multipleOf: 0.01)",
      "taxAmount": "number (optional, multipleOf: 0.01)",
      "manPartNo": "string (optional)",
      "itemDescription": "string (optional)",
      "invoiceLineUdf": [{
        "documentLineNo": "integer (optional, max 999999999)",
        "fieldName": "string (optional)",
        "fieldDescription": "string (optional)"
      }],
      "serialNumber": [{
        "invoiceLinesId": "integer (optional, max 999999999)",
        "serialNumber": "string (optional)"
      }]
    }]
  }]
}

Field Specifications

Create Order - Header Fields

Field NameTypeRequiredMax LengthDescription
customerNumberString❌ No9The 'sold-to' customer number in the backend system
parentCustomerNumberString✅ Yes14Parent customer number - used for client identification and routing
entryDateString✅ Yes-Order entry date. Format: MM/DD/YY (e.g., 08/26/20)
requestedDateString✅ Yes-Requested delivery date. Format: MM/DD/YY
customerPONumberString✅ Yes25Client purchase order number
shipCustomerNameString✅ Yes35Ship-to recipient name
shipAddress1String✅ Yes-Primary shipping address line
shipAddress2String❌ No35Secondary shipping address line (optional)
shipAddress3String❌ No35Third shipping address line (optional)
shipCityString✅ Yes-Shipping city
shipStateString✅ Yes2Two-letter state/province code (e.g., SC, NY, CA)
shipZipCodeString✅ Yes9Postal/ZIP code
shipCountryString✅ Yes3Country code (e.g., US, CA, MX)
shipPhoneString❌ No25Shipping contact phone number
requestedForEmailString❌ No250Email address of order recipient
requestedByEmailString❌ No250Email address of order requester
requestedForNameString❌ No50Name of order recipient
requestedForPhoneString❌ No50Phone number of order recipient
customerPOReleaseNumberString❌ No35Customer PO release number for blanket orders
shipPartiallyBoolean❌ Notrue/falseAllow partial shipments flag
viaCodeString❌ No2Shipping method code (e.g., bw = Best Way, pr = Priority)
geoCodeInteger❌ No0-999999999Geographic code for routing
tokenString❌ No20Payment token for credit card transactions
creditCardTypeString❌ No30Credit card type (e.g., Visa, MasterCard, Amex)
tokenNameString❌ No-Token identifier name
threeDeltaExpireString❌ No5Payment token expiration date. Format: MM/YY
partnerBillingStreetString❌ No50Partner billing street address
partnerBillingZipString❌ No10Partner billing ZIP code
callBackURLString❌ No250URL for asynchronous status callbacks
salesRefNumberString❌ No8System-generated reference number. Auto-generated if not provided

Create Order - Order Detail Fields

Field NameTypeRequiredMax LengthDescription
customerPOLineInteger❌ No0-999999999Customer PO line number reference
orderLineInteger✅ Yes0-999999999Line item sequence number (must be unique within order)
quantityOrderedInteger✅ Yes0-999999999Quantity of items to order (must be > 0)
priceNumber✅ YesmultipleOf: 0.01Unit price (decimal format, e.g., 100.00)
itemNumberString✅ Yes-SKU or item identifier from catalog
descriptionString✅ Yes-Item description
manPartNoString❌ No-Manufacturer part number

Create Order - UDF (User Defined Fields)

Field NameTypeRequiredMax LengthDescription
fieldNumberInteger❌ No0-99UDF field number identifier
fieldLevelString❌ No1Field level: H = Header, L = Line
fieldNameString❌ No-Custom field name/key
fieldDescriptionString❌ No250Custom field value/description
orderLineInteger❌ No0-999Associated order line number (0 = header level)

Create Order - Memo Fields

Field NameTypeRequiredMax LengthDescription
orderLineInteger❌ No0-999Associated order line number (0 = header level)
typeString❌ No3Memo type code (e.g., o = Order Memo)
commentsString❌ No32000Memo text/comments

Update Order - Header Fields

Field NameTypeRequiredMax LengthDescription
transactionIdInteger❌ No0-999999999Unique transaction identifier
salesRefNumberString❌ No-System-generated reference number
customerNumberString❌ No-Customer number
parentCustomerNumberString❌ No-Parent customer number
orderNumberInteger❌ No0-999999999Backend system order number
orderDateString❌ No-Order date. Format: MM/DD/YY
scheduledDateString❌ No-Scheduled delivery date. Format: MM/DD/YY
carrierIdString❌ No-Carrier/shipping method code
orderStatusString❌ No-Order status code (e.g., 10, 80, 90)
orderStatusDescriptionString❌ No-Order status description (e.g., Open, Partial, Complete)
taxAmountNumber❌ NomultipleOf: 0.01Tax amount
totalAmountNumber❌ NomultipleOf: 0.01Total order amount
currencyIdString❌ No-Currency code (e.g., USD, CAD)
invoiceDateString❌ No-Invoice date. Format: MM/DD/YY
paymentTermIdString❌ No-Payment terms code
invoiceNumberInteger❌ No0-999999999Invoice number
anticipatedArrivalDateString❌ No-Anticipated arrival date. Format: MM/DD/YY
shipDateString❌ No-Shipment date. Format: MM/DD/YY
shipViaDescString❌ No-Shipping method description
dueDateString❌ No-Payment due date. Format: MM/DD/YY
ppsNumberInteger❌ No0-999999999Package processing system number
callBackURLString❌ No-URL for asynchronous status callbacks

Update Order - Order Detail Fields

Field NameTypeRequiredMax LengthDescription
orderNumberInteger❌ No0-999999999Backend system order number
lineNumberInteger❌ No0-999Order line number
itemNumberString❌ No-SKU or item identifier
quantityOrderedInteger❌ No0-999999999Quantity ordered
quantityShippedInteger❌ No0-999999999Quantity shipped
customerPOLineInteger❌ No0-999999999Customer PO line number
manPartNoString❌ No-Manufacturer part number
itemDescriptionString❌ No-Item description

Update Order - Waybill Fields

Field NameTypeRequiredMax LengthDescription
ppsNumberInteger❌ No0-999999999Package processing system number
packageIdString❌ No-Package identifier
waybillNumberString❌ No-Tracking/waybill number (e.g., UPS, FedEx tracking)

Update Order - Invoice Line Fields

Field NameTypeRequiredMax LengthDescription
invoiceNumberInteger❌ No0-999999999Invoice number
invoiceLinesIdInteger❌ No0-999999999Invoice line identifier
customerPOLineInteger❌ No0-999999999Customer PO line number
qtyInvoicedInteger❌ No0-999999999Quantity invoiced
itemNoString❌ No-Item number
itemPriceNumber❌ NomultipleOf: 0.01Item unit price
grossAmountNumber❌ NomultipleOf: 0.01Gross amount (before tax)
taxAmountNumber❌ NomultipleOf: 0.01Tax amount
manPartNoString❌ No-Manufacturer part number
itemDescriptionString❌ No-Item description

Schema Validation Rules

Create Order - Required Fields Validation

Field NameValidation RuleError CodeError Message
parentCustomerNumberRequired, non-empty string, max 14 characters400Missing required field: parentCustomerNumber
entryDateRequired, must match format MM/DD/YY400Invalid date format for entryDate. Expected: MM/DD/YY
requestedDateRequired, must match format MM/DD/YY400Invalid date format for requestedDate. Expected: MM/DD/YY
customerPONumberRequired, non-empty string, max 25 characters400Missing required field: customerPONumber
shipCustomerNameRequired, non-empty string, max 35 characters400Missing required field: shipCustomerName
shipAddress1Required, non-empty string400Missing required field: shipAddress1
shipCityRequired, non-empty string400Missing required field: shipCity
shipStateRequired, exactly 2 characters400Invalid shipState. Must be 2-letter state code (e.g., SC, NY)
shipZipCodeRequired, non-empty string, max 9 characters400Missing required field: shipZipCode
shipCountryRequired, 2-3 characters400Invalid shipCountry. Must be valid country code (e.g., US, CA)
orderDetailsRequired, must be non-empty array400Order must contain at least one order detail line

Create Order - Order Details Required Fields

Field NameValidation RuleError CodeError Message
orderLineRequired, integer, range: 0-999999999400Missing or invalid orderLine number
quantityOrderedRequired, integer > 0, range: 0-999999999400quantityOrdered must be greater than 0
priceRequired, number, multipleOf: 0.01400Invalid price format. Must be decimal (e.g., 100.00)
itemNumberRequired, non-empty string400Missing required field: itemNumber
descriptionRequired, non-empty string400Missing required field: description

Data Type Validations

Data TypeValidation RuleExample ValidExample Invalid
StringMust be text, respect maxLength if specified"John Doe"123 (number), true (boolean)
IntegerMust be whole number, respect min/max range100, 0, 999100.5 (decimal), "100" (string)
NumberMust be numeric, can be decimal, respect multipleOf100.00, 65.44, 0.01"100.00" (string), 100.001 (invalid precision)
BooleanMust be true or false (lowercase)true, false"true" (string), 1/0 (integer), TRUE (uppercase)
Date StringMust match format MM/DD/YY"08/26/20", "12/31/25""2020-08-26", "26/08/20", "8/26/2020"
ArrayMust be JSON array with proper brackets [][{...}, {...}]{...} (object), "array" (string)

Field Length Validations

Field GroupField NameMax LengthTruncation Behavior
Address FieldsshipAddress1System-dependentValidation error if exceeds limit
shipAddress235Validation error if exceeds limit
shipAddress335Validation error if exceeds limit
Email FieldsrequestedForEmail250Validation error if exceeds limit
requestedByEmail250Validation error if exceeds limit
Code FieldsviaCode2Validation error if exceeds limit
shipState2Validation error if exceeds limit
Reference NumberscustomerPONumber25Validation error if exceeds limit
salesRefNumber8Validation error if exceeds limit
Commentsmemo.comments32000Validation error if exceeds limit
UDF Descriptionudf.fieldDescription250Validation error if exceeds limit

Numeric Range Validations

Field NameMinimumMaximumSpecial Rules
orderLine0999999999Must be unique within order
quantityOrdered1999999999Must be greater than 0
price0.00No limitMust be multiple of 0.01 (two decimal places)
customerPOLine0999999999Optional field
geoCode0999999999Optional field
udf.fieldNumber099User-defined field identifier
udf.orderLine0999Associates UDF with order line (0 = header level)
memo.orderLine0999Associates memo with order line (0 = header level)
transactionId0999999999Update order transaction identifier
orderNumber0999999999Backend system order number

â„šī¸ RAML Validation
All requests are validated against RAML 1.0 schema definitions using the MuleSoft APIKit Router. Invalid requests are rejected with HTTP 400 Bad Request before reaching the application logic, ensuring data integrity and security.

âš ī¸ Validation Best Practices
- Always send numeric values as JSON numbers, not strings (e.g., 100 not "100")
- Ensure dates follow the exact format: MM/DD/YY (e.g., 08/26/20)
- Use lowercase for boolean values: true/false
- Empty strings ("") are different from null/missing fields in validation
- Arrays must have at least one item if required (e.g., orderDetails)
- Validate field lengths client-side to avoid unnecessary API calls


Error Handling

Error Response Format

All error responses follow a consistent format for easy parsing and error handling:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Detailed error message describing what went wrong"
  }
}

HTTP Status Codes

Status CodeDescriptionCommon CausesResolution
200 OKRequest successfulOrder update processed successfullyN/A - Success response
201 CreatedResource created successfullyNew order created successfullyN/A - Success response
400 Bad RequestInvalid request payloadMissing required fields, validation errors, invalid data formatReview request payload against schema documentation
401 UnauthorizedAuthentication failedInvalid or missing credentials, expired tokenCheck credentials or refresh OAuth token
403 ForbiddenInsufficient permissionsClient not authorized for requested operationContact support for access permissions
404 Not FoundResource not foundInvalid endpoint URL or order not foundVerify endpoint URL and resource identifiers
408 Request TimeoutRequest timeoutBackend system not responding within timeout periodRetry request after brief delay
500 Internal Server ErrorServer errorBackend connectivity issues, system errors, unexpected exceptionsRetry after delay; contact support if persists
502 Bad GatewayBackend system unavailableBackend system down or unreachableRetry after delay; check system status
503 Service UnavailableService temporarily unavailableSystem maintenance or overloadRetry with exponential backoff

Common Error Codes

Error CodeDescriptionExample Scenario
VALIDATION_ERRORRequest validation failedMissing required field or invalid format
AUTHENTICATION_ERRORAuthentication failedInvalid credentials or expired token
BACKEND_ERRORBackend system errorUnable to connect to DIMS or LCAM
DATABASE_ERRORDatabase operation failedUnable to generate sales reference number
ROUTING_ERRORClient routing failedUnknown parent customer number
TIMEOUT_ERRORRequest timeoutBackend system response timeout
SYSTEM_ERRORUnexpected system errorUnhandled exception or system failure

Retry Strategy

The API implements intelligent retry logic for transient failures:

  • Automatic Retry: Failed requests are automatically retried up to 3 times
  • Exponential Backoff: Retry intervals: 1 second, 2 seconds, 4 seconds
  • Retry Conditions: Retries are attempted for:
    • Network connectivity issues (502, 503, 504)
    • Timeout errors (408)
    • Transient backend errors (500 with retry-able flag)
  • Non-Retry Conditions: No retry for:
    • Validation errors (400)
    • Authentication failures (401)
    • Authorization failures (403)
    • Resource not found (404)

Client Retry Recommendations:

  • Implement exponential backoff in client applications

  • Maximum retry attempts: 3-5

  • Initial retry delay: 1-2 seconds

  • Log all retry attempts for troubleshooting

🚨 Error Monitoring
Critical errors trigger automated alerts for immediate investigation:
- Backend system connectivity failures
- Database connection issues
- Authentication/authorization failures
- High error rates exceeding thresholds
Alerts are sent to the operations team via email, Slack, and monitoring dashboards.


Authentication

The API supports two authentication methods to accommodate different client requirements and security policies.

Supported Authentication Methods

🔐 Basic Authentication

Traditional username and password authentication where credentials are base64-encoded in the Authorization header.

Use Case: Suitable for server-to-server integrations with secure credential storage.

Header Format:

Authorization: Basic <base64-encoded-credentials>

Example:

```

Username: api_user

Password: api_password

Base64 Encoded: YXBpX3VzZXI6YXBpX3Bhc3N3b3Jk

Header:

Authorization: Basic YXBpX3VzZXI6YXBpX3Bhc3N3b3Jk

```

Supported Endpoints:

  • POST /order

  • POST /orderUpdate


đŸŽĢ OAuth 2.0

Token-based authentication with automatic token refresh. Provides enhanced security with time-limited access tokens and refresh capabilities.

Use Case: Recommended for client applications, web portals, and integrations requiring enhanced security.

Supported Grant Types:

  • Client Credentials

  • Resource Owner Password Credentials (ROPC)

Header Format:

Authorization: Bearer <oauth-access-token>

Supported Endpoints:

  • POST /v2/order

  • POST /orderUpdate


OAuth 2.0 Token Endpoints

Development Environment
PropertyValue
Token URLhttps://sandboxapi.compucom.com/oauth/token
Grant Typeclient_credentials or password
Scoperead write (optional)
Production Environment
PropertyValue
Token URLhttps://prodapi.compucom.com/oauth/token
Grant Typeclient_credentials or password
Scoperead write (optional)

OAuth 2.0 Token Request

Client Credentials Grant:

POST /oauth/token HTTP/1.1
Host: sandboxapi.compucom.com
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id=<your-client-id>
&client_secret=<your-client-secret>

Response:

json

{

"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",

"token_type": "Bearer",

"expires_in": 300,

}


OAuth 2.0 Token Flow

The API implements intelligent OAuth token management with caching and automatic refresh:

1. Client requests API access
   ↓
2. Check Object Store for cached token
   ↓
3. If token exists and valid:
   → Use cached token

4. If token missing or expired:
   a. Request new token from OAuth provider
   b. Cache token in Object Store with expiration
   c. Use new token for API request
   ↓
5. Make API request with Bearer token
   ↓
6. If token expires during request:
   → Automatic refresh and retry

Token Caching Benefits:

  • Performance: Reduces authentication overhead by caching tokens

  • Efficiency: Minimizes calls to OAuth token endpoint

  • Reliability: Automatic token refresh ensures uninterrupted service

  • Scalability: Shared token cache across API instances

✅ Token Management Best Practices
- Cache tokens on the client side to reduce token requests
- Implement automatic token refresh before expiration
- Store tokens securely (never log or expose in URLs)
- Use HTTPS for all token requests and API calls
- Monitor token expiration and implement proactive refresh


Authentication Examples

Example 1: Order Creation with Basic Auth
curl -X POST https://muleqc.diam.compucom.com/api/standard-order/order \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic YXBpX3VzZXI6YXBpX3Bhc3N3b3Jk" \
  -d '{
    "order": [{
      "parentCustomerNumber": "799249461",
      "entryDate": "08/26/20",
      "requestedDate": "08/26/20",
      "customerPONumber": "PO-2020-08-001",
      "shipCustomerName": "John Doe",
      "shipAddress1": "123 Main St",
      "shipCity": "New York",
      "shipState": "NY",
      "shipZipCode": "10001",
      "shipCountry": "US",
      "orderDetails": [{
        "orderLine": 1,
        "quantityOrdered": 1,
        "price": 100.00,
        "itemNumber": "ITEM001",
        "description": "Test Product"
      }]
    }]
  }'
Example 2: Order Creation with OAuth 2.0
# Step 1: Get OAuth Token
curl -X POST https://sandboxapi.compucom.com/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=your-client-id" \
  -d "client_secret=your-client-secret"

# Response:
# {
#   "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
#   "token_type": "Bearer",
#   "expires_in": 300
# }

# Step 2: Create Order with Token
curl -X POST https://muleqc.diam.compucom.com/api/standard-order/v2/order \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -d '{
    "order": [{
      "parentCustomerNumber": "799249461",
      "entryDate": "08/26/20",
      "requestedDate": "08/26/20",
      "customerPONumber": "PO-2020-08-001",
      "shipCustomerName": "John Doe",
      "shipAddress1": "123 Main St",
      "shipCity": "New York",
      "shipState": "NY",
      "shipZipCode": "10001",
      "shipCountry": "US",
      "orderDetails": [{
        "orderLine": 1,
        "quantityOrdered": 1,
        "price": 100.00,
        "itemNumber": "ITEM001",
        "description": "Test Product"
      }]
    }]
  }

Standard Order Experience API | Version 1.0.0

Š 2026 CompuCom Systems, Inc. All rights reserved.

Last Updated: June 15, 2026

MuleSoft Anypoint Platform | CompuCom API Portal


Reviews