Skip to main content
POST
{micro_service_base_url}
/
orders
/
{order_id}
/
issues
{
  "success": true,
  "message": "<string>",
  "issue_id": "<string>",
  "issue_number": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "assigned_to": "<string>"
}
This endpoint allows you to create detailed issue reports for orders when problems occur. Issues can range from missing items and wrong products to delivery problems and customer complaints. Each issue is tracked with priority levels, attachments, and resolution workflows.
Issue tracking helps maintain service quality, resolve customer problems efficiently, and identify patterns that can improve operations.

Path Parameters

order_id
string
required
The unique identifier of the order where the issue occurred

Request Body

storeId
string
required
The unique identifier of the store where the issue occurred
reportedBy
string
required
Employee ID or user ID of the person reporting the issue
issue
object
required
Detailed issue information

Response

success
boolean
Indicates whether the issue was successfully created
message
string
Confirmation message or error details
issue_id
string
Unique identifier for the created issue
issue_number
string
Human-readable issue number for reference
status
string
Initial issue status (typically “open” or “investigating”)
created_at
string
Timestamp when the issue was created
assigned_to
string
Employee or team assigned to handle the issue

Request Example

{
  "storeId": "449235c1-3d04-4519-998b-40d2a621e5e0",
  "reportedBy": "b1e46bf5-0e29-4c7e-8ca1-0d7407c67169",
  "issue": {
    "order_item_id": "d2fe3e81-fb54-4d90-9c45-b0f3ed9ed1f1",
    "issue_type": "wrong_items",
    "description": "I ordered the DARK chocolate Muddy Bites and the 10oz bag of Peach Rings, but received milk chocolate and gummy bears instead",
    "priority": "medium",
    "attachments": [
      "https://lula-inventory-service-staging.s3.amazonaws.com/images/dad46dc1-6d6f-4a8f-9602-29f2f5c1231d/Candy/29b4ef50-eeb3-40cb-a04f-112e187fd06a_1732713277583.webp"
    ],
    "customer_contacted": true,
    "expected_resolution_time": "2024-01-15T18:00:00Z"
  }
}

Response Example

{
  "success": true,
  "message": "Issue successfully created and assigned for resolution",
  "issue_id": "issue_123456789",
  "issue_number": "ISS-2024-001234",
  "status": "open",
  "created_at": "2024-01-15T14:30:00Z",
  "assigned_to": "customer_service_team"
}
Issue Types:
  • wrong_items: Customer received different items than ordered
  • missing_items: Items were missing from the order
  • damaged_items: Items arrived damaged or in poor condition
  • delivery_issue: Problems with delivery process or timing
  • payment_issue: Payment processing or billing problems
  • customer_complaint: General customer dissatisfaction
  • quality_issue: Product quality below standards
  • other: Issues not covered by other categories
Priority Levels:
  • low: Minor issues that don’t significantly impact customer experience
  • medium: Moderate issues requiring timely resolution
  • high: Serious issues that significantly impact customer satisfaction
  • critical: Urgent issues requiring immediate attention (safety, major losses)
Automatic Assignment: Issues are automatically assigned to appropriate teams based on issue type and priority. High and critical priority issues trigger immediate notifications.
Evidence Collection: Always include attachments when possible. Photos and documentation help resolve issues faster and provide valuable feedback for process improvement.

Issue Creation Workflow

  1. Issue Registration: Issue is assigned a unique ID and tracking number
  2. Priority Assessment: System evaluates priority and determines urgency
  3. Team Assignment: Issue is routed to appropriate resolution team
  4. Customer Notification: Customer is informed if customer_contacted is true
  5. Escalation Setup: Automatic escalation timers are set based on priority
  6. Audit Trail: Complete tracking begins for resolution monitoring
  7. Analytics Update: Issue data is added to quality metrics and reporting

Use Cases

Wrong Items Delivered
  • Customer received incorrect products
  • Include photos of wrong items
  • Reference specific order items
Missing Items
  • Items were missing from delivery
  • Check against packing list
  • Verify inventory accuracy
Quality Issues
  • Damaged or expired products
  • Poor product condition
  • Food safety concerns
Delivery Problems
  • Late delivery or wrong address
  • Driver issues or communication problems
  • Weather or logistics complications
Customer Complaints
  • Service quality issues
  • Staff behavior concerns
  • General dissatisfaction

Error Responses

Invalid Order
{
  "success": false,
  "message": "Order not found or not accessible",
  "error_code": "ORDER_NOT_FOUND",
  "order_id": "invalid-order-id"
}
Invalid Issue Type
{
  "success": false,
  "message": "Invalid issue type provided",
  "error_code": "INVALID_ISSUE_TYPE",
  "valid_types": ["wrong_items", "missing_items", "damaged_items", "delivery_issue", "payment_issue", "customer_complaint", "quality_issue", "other"]
}
Missing Required Fields
{
  "success": false,
  "message": "Required fields are missing",
  "error_code": "MISSING_FIELDS",
  "missing_fields": ["issue.description", "issue.priority"]
}
Invalid Attachment URL
{
  "success": false,
  "message": "One or more attachment URLs are invalid",
  "error_code": "INVALID_ATTACHMENT",
  "invalid_urls": ["invalid-url-here"]
}
Critical Issues: For critical priority issues involving safety or major financial impact, consider following up with immediate phone or direct communication in addition to creating the issue record.
I