Order Management via API
Add Order into the system
https://productbackend.versal.one/api/order/addOrder
{
// Mandatory Fields
"company_id": VERPL000972024,
"company_order_id": "ORD-001",
"totalAmount": 1500.75,
"firstName": "John",
"phoneNumber": "+1234567890",
"postalCode": "56789",
"streetAddress1": "123 Main Street",
// Optional Fields
"lastName": "Doe",
"email": "john.doe@example.com",
"streetAddress2": "Apt 4B",
"city": "Springfield",
"state": "Illinois",
"specialInstructions": "Leave package at the front door.",
"products": [
{ "product_id": "101", "quantity": 2, "price": 500 },
{ "product_id": "102", "quantity": 1, "price": 500.75 }
],
"billingStreetAddress1": "456 Elm Street",
"billingStreetAddress2": "Suite 202",
"billingCity": "Springfield",
"billingState": "Illinois",
"billingPostalCode": "56789",
"companyOrderDate": "2024-11-15",
"companyOrderDueDate": "2024-11-20",
"companyOrderDeliveryStatus": "Pending",
"companyOrderPaymentReference": "PAY-123456",
"companyOrderStatus": "Processing",
"companyOrderDescription": "Order description details",
"company_order_other_attributes_1": { "giftWrap": true },
"company_order_other_attributes_2": { "priorityDelivery": false }
}
Update an existing order
https://productbackend.versal.one/api/order/updateOrder/orderId
{
// Mandatory Fields
"company_id": VERPL000972024,
// Optional Fields
"firstName": "Jane",
"lastName": "Smith",
"phoneNumber": "+9876543210",
"email": "jane.smith@example.com",
"postalCode": "12345",
"streetAddress1": "789 Oak Avenue",
"streetAddress2": "Unit 5C",
"city": "Shelbyville",
"state": "Indiana",
"specialInstructions": "Call upon arrival.",
"totalAmount": 2000.50,
"products": [
{ "product_id": "201", "quantity": 3, "price": 600 },
{ "product_id": "202", "quantity": 2, "price": 400.25 }
],
"billingStreetAddress1": "321 Pine Lane",
"billingStreetAddress2": "Office 101",
"billingCity": "Shelbyville",
"billingState": "Indiana",
"billingPostalCode": "12345",
"companyOrderDate": "2024-11-10",
"companyOrderDueDate": "2024-11-25",
"companyOrderDeliveryStatus": "Shipped",
"companyOrderPaymentReference": "PAY-654321",
"companyOrderStatus": "Shipped",
"companyOrderDescription": "Updated order description",
"company_order_other_attributes_1": { "giftWrap": true },
"company_order_other_attributes_3": { "priorityDelivery": true }
}