Create Order Issue
curl --request POST \
--globoff \
--url 'https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"reportedBy": "<string>",
"issue": {
"order_item_id": "<string>",
"issue_type": "<string>",
"description": "<string>",
"priority": "<string>",
"attachments": [
{}
],
"customer_contacted": true,
"expected_resolution_time": "<string>"
}
}
'import requests
url = "https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues"
payload = {
"storeId": "<string>",
"reportedBy": "<string>",
"issue": {
"order_item_id": "<string>",
"issue_type": "<string>",
"description": "<string>",
"priority": "<string>",
"attachments": [{}],
"customer_contacted": True,
"expected_resolution_time": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: '<string>',
reportedBy: '<string>',
issue: {
order_item_id: '<string>',
issue_type: '<string>',
description: '<string>',
priority: '<string>',
attachments: [{}],
customer_contacted: true,
expected_resolution_time: '<string>'
}
})
};
fetch('https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'storeId' => '<string>',
'reportedBy' => '<string>',
'issue' => [
'order_item_id' => '<string>',
'issue_type' => '<string>',
'description' => '<string>',
'priority' => '<string>',
'attachments' => [
[
]
],
'customer_contacted' => true,
'expected_resolution_time' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"reportedBy\": \"<string>\",\n \"issue\": {\n \"order_item_id\": \"<string>\",\n \"issue_type\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"customer_contacted\": true,\n \"expected_resolution_time\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"reportedBy\": \"<string>\",\n \"issue\": {\n \"order_item_id\": \"<string>\",\n \"issue_type\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"customer_contacted\": true,\n \"expected_resolution_time\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"<string>\",\n \"reportedBy\": \"<string>\",\n \"issue\": {\n \"order_item_id\": \"<string>\",\n \"issue_type\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"customer_contacted\": true,\n \"expected_resolution_time\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"issue_id": "<string>",
"issue_number": "<string>",
"status": "<string>",
"created_at": "<string>",
"assigned_to": "<string>"
}Order Issues
Create Order Issue
Create a new issue report for an order, documenting problems, complaints, or special situations that require attention.
POST
{micro_service_base_url}
/
orders
/
{order_id}
/
issues
Create Order Issue
curl --request POST \
--globoff \
--url 'https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"reportedBy": "<string>",
"issue": {
"order_item_id": "<string>",
"issue_type": "<string>",
"description": "<string>",
"priority": "<string>",
"attachments": [
{}
],
"customer_contacted": true,
"expected_resolution_time": "<string>"
}
}
'import requests
url = "https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues"
payload = {
"storeId": "<string>",
"reportedBy": "<string>",
"issue": {
"order_item_id": "<string>",
"issue_type": "<string>",
"description": "<string>",
"priority": "<string>",
"attachments": [{}],
"customer_contacted": True,
"expected_resolution_time": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: '<string>',
reportedBy: '<string>',
issue: {
order_item_id: '<string>',
issue_type: '<string>',
description: '<string>',
priority: '<string>',
attachments: [{}],
customer_contacted: true,
expected_resolution_time: '<string>'
}
})
};
fetch('https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'storeId' => '<string>',
'reportedBy' => '<string>',
'issue' => [
'order_item_id' => '<string>',
'issue_type' => '<string>',
'description' => '<string>',
'priority' => '<string>',
'attachments' => [
[
]
],
'customer_contacted' => true,
'expected_resolution_time' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"reportedBy\": \"<string>\",\n \"issue\": {\n \"order_item_id\": \"<string>\",\n \"issue_type\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"customer_contacted\": true,\n \"expected_resolution_time\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"reportedBy\": \"<string>\",\n \"issue\": {\n \"order_item_id\": \"<string>\",\n \"issue_type\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"customer_contacted\": true,\n \"expected_resolution_time\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{micro_service_base_url}}/orders/{{order_id}}/issues")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"<string>\",\n \"reportedBy\": \"<string>\",\n \"issue\": {\n \"order_item_id\": \"<string>\",\n \"issue_type\": \"<string>\",\n \"description\": \"<string>\",\n \"priority\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"customer_contacted\": true,\n \"expected_resolution_time\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"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
string
required
The unique identifier of the order where the issue occurred
Request Body
string
required
The unique identifier of the store where the issue occurred
string
required
Employee ID or user ID of the person reporting the issue
object
required
Detailed issue information
Show Issue Object
Show Issue Object
string
ID of the specific order item related to the issue (if applicable)
string
required
Type of issue: “wrong_items”, “missing_items”, “damaged_items”, “delivery_issue”, “payment_issue”, “customer_complaint”, “quality_issue”, “other”
string
required
Detailed description of the issue
string
required
Issue priority level: “low”, “medium”, “high”, “critical”
array
Array of URLs pointing to images, documents, or other evidence related to the issue
boolean
default:"false"
Whether the customer has been contacted about this issue
string
Expected time to resolve the issue (ISO 8601 format)
Response
boolean
Indicates whether the issue was successfully created
string
Confirmation message or error details
string
Unique identifier for the created issue
string
Human-readable issue number for reference
string
Initial issue status (typically “open” or “investigating”)
string
Timestamp when the issue was created
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 and Priorities
Issue Types and Priorities
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
- 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
What Happens When You Create an Issue
What Happens When You Create an Issue
- Issue Registration: Issue is assigned a unique ID and tracking number
- Priority Assessment: System evaluates priority and determines urgency
- Team Assignment: Issue is routed to appropriate resolution team
- Customer Notification: Customer is informed if customer_contacted is true
- Escalation Setup: Automatic escalation timers are set based on priority
- Audit Trail: Complete tracking begins for resolution monitoring
- Analytics Update: Issue data is added to quality metrics and reporting
Use Cases
Common Issue Scenarios
Common Issue Scenarios
Wrong Items Delivered
- Customer received incorrect products
- Include photos of wrong items
- Reference specific order items
- Items were missing from delivery
- Check against packing list
- Verify inventory accuracy
- Damaged or expired products
- Poor product condition
- Food safety concerns
- Late delivery or wrong address
- Driver issues or communication problems
- Weather or logistics complications
- Service quality issues
- Staff behavior concerns
- General dissatisfaction
Error Responses
Common Error Scenarios
Common Error Scenarios
Invalid OrderInvalid Issue TypeMissing Required FieldsInvalid Attachment URL
{
"success": false,
"message": "Order not found or not accessible",
"error_code": "ORDER_NOT_FOUND",
"order_id": "invalid-order-id"
}
{
"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"]
}
{
"success": false,
"message": "Required fields are missing",
"error_code": "MISSING_FIELDS",
"missing_fields": ["issue.description", "issue.priority"]
}
{
"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.

