Update an order - Fabric

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Skip to main content

Update an order

cURL

curl --request PUT \
  --url https://prod01.oms.fabric.inc/api/v2/order/{orderNumber} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-site-context: <x-site-context>' \
  --data '
{
  "orderNumber": "309019176",
  "channelId": "12",
  "statusCode": "ORDER_CREATED",
  "items": [\
    {\
      "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "lineItemNumber": 1,\
      "itemId": "1234",\
      "sku": "P1234",\
      "shipToId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "channelId": "WHBM",\
      "segment": "P1234",\
      "vendorId": "P1234",\
      "title": "Item",\
      "type": "WEB_SHIP",\
      "subType": "Borderfree",\
      "backorder": true,\
      "orderedQuantity": 60,\
      "backOrderedQuantity": 10,\
      "pendingShippedQuantity": 10,\
      "pendingShippedBackOrderQuantity": 10,\
      "shippedQuantity": 10,\
      "deliveredQuantity": 10,\
      "invoiceQuantity": 10,\
      "cancelledQuantity": 10,\
      "pendingReturnQuantity": 10,\
      "processingReturnQuantity": 10,\
      "rejectedReturnQuantity": 10,\
      "returnedQuantity": 10,\
      "reshippedQuantity": 10,\
      "uom": "EA",\
      "itemUnitPrice": 10,\
      "itemSubTotal": 600,\
      "originalItemSubTotal": 600,\
      "itemFeeTotal": 5,\
      "originalFeeTotal": 5,\
      "itemShippingTotal": 5,\
      "originalShippingTotal": 5,\
      "appeasementTotal": 5.5,\
      "itemDiscountsTotal": 55,\
      "originalDiscounts": 55,\
      "itemTaxTotal": 5,\
      "originalTaxTotal": 555,\
      "itemTotal": 555,\
      "originalItemTotal": 555,\
      "outstandingItemTotal": 555,\
      "originalOutstandingItemTotal": 555,\
      "invoiceTotal": 555,\
      "currency": "USD",\
      "employeeId": "5345HJH",\
      "associateId": "5345HJH",\
      "fees": [\
        {\
          "type": "tax",\
          "value": 34.56,\
          "invoiceQuantity": 34,\
          "refundAmount": 10.4,\
          "quantity": 12\
        }\
      ],\
      "appeasements": [\
        {\
          "appeasementCounter": 1,\
          "reasonCode": "Incorrect item",\
          "subReasonCode": "Late shipping",\
          "value": 34.56,\
          "invoiceValue": 34.56,\
          "payments": [\
            {\
              "paymentCounter": 1,\
              "refundAmount": 40\
            }\
          ]\
        }\
      ],\
      "returns": [\
        {\
          "shipmentId": "12353543",\
          "shipmentLineItemId": "2412341",\
          "shipmentQuantity": 1,\
          "refundAmount": 11.29,\
          "invoicedAmount": 11.29,\
          "returnsCreatedAt": "2022-09-14T14:07:36.861Z"\
        }\
      ],\
      "taxCode": "FR01",\
      "taxDetail": [\
        {\
          "type": "tax",\
          "value": 34.56\
        }\
      ],\
      "discounts": [\
        {\
          "quantity": 2,\
          "amount": 2.4,\
          "unit": "AMOUNT_OFF",\
          "value": 2,\
          "promoId": "HNY2022",\
          "promoCode": "HNY2022",\
          "promoTitle": "Happy New Year",\
          "type": "promotion",\
          "invoiceQuantity": 2,\
          "returnQuantity": 2,\
          "cancelQuantity": 2\
        }\
      ],\
      "attributes": {\
        "isDonation": true,\
        "isGiftCard": false,\
        "isFinalSale": false,\
        "returnsLink": true\
      },\
      "exchangeItem": true,\
      "parentLineItemNumber": 12,\
      "pendingExchangeQuantity": 12,\
      "exchangeQuantity": 13,\
      "refundAmount": 12.4,\
      "lineOrderStatus": "VALID",\
      "infiniteConsent": true,\
      "notes": [\
        {\
          "timestamp": "2022-05-12T09:30:31.198Z",\
          "user": "62272e917b12209e68751d94",\
          "notes": "Extra information to be provided"\
        }\
      ],\
      "gifting": true\
    }\
  ],
  "shipInfo": [\
    {\
      "shipToId": "5349b4ddd2781d08c09890f4",\
      "taxCode": "FR01",\
      "locationNum": "123",\
      "pickup": [\
        {\
          "name": {\
            "first": "John",\
            "middle": "Middle",\
            "last": "Doe"\
          },\
          "email": "john123@gmail.com",\
          "phone": {\
            "number": "55555555555",\
            "type": "MOBILE"\
          },\
          "pickupType": "Primary"\
        }\
      ],\
      "taxDetail": [\
        {\
          "type": "tax",\
          "value": 34.56\
        }\
      ],\
      "shipMethod": "Express Delivery",\
      "shipToType": "SHIP_TO_ADDRESS",\
      "estimatedShipDate": "2022-05-12T09:30:31.198Z",\
      "estimatedDeliveryDate": "2022-05-12T09:30:31.198Z",\
      "shipToPrice": 20,\
      "shipToDiscount": 12.6,\
      "shipToTaxTotal": 12.6,\
      "shipmentInstructions": "User instructions",\
      "attributes": {\
        "isOpenBox": false,\
        "isOTPDElivery": true\
      }\
    }\
  ],
  "version": 123,
  "orderId": "5349b4ddd2781d08c09890f4",
  "orderDate": "2022-05-12T09:30:31.198Z",
  "cancellationDate": "2022-05-12T09:30:31.198Z",
  "allocationDate": "2022-05-12T09:30:31.198Z",
  "cartId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
  "type": "WEB",
  "subType": "International",
  "processName": "CANCEL",
  "employeeId": "43278",
  "retail": {
    "locationNum": 123,
    "cashierId": "C-123",
    "registerId": "113",
    "transactionId": "R123-431-1133-2129"
  },
  "orderSubTotal": 123.45,
  "originalSubTotal": 113.45,
  "orderDiscount": 1.23,
  "originalDiscounts": 1.45,
  "feeTotal": 12.34,
  "originalFeeTotal": 12.34,
  "taxTotal": 12.34,
  "appeasementTotal": 12.34,
  "originalTaxTotal": 12.34,
  "returnTotal": 12.34,
  "cancelTotal": 12.34,
  "invoiceTotal": 12.34,
  "orderTotal": 146.9,
  "originalOrderTotal": 146.9,
  "currency": "USD",
  "statusDescription": "Order Created",
  "attributes": {
    "type": "String/Number/JSON",
    "purchaseOrder": "String",
    "salesRepId": "String",
    "approve": "String",
    "fraudCheckSessionId": "aee6d1face0e4d55948d1e30b6240048",
    "fraudCheckStatus": "UPDATED",
    "fraudCheckTransId": "0R12TQ46",
    "fraudScore": "31"
  },
  "fees": [\
    {\
      "type": "shipping",\
      "value": 34.56,\
      "invoiceValue": 34.56\
    }\
  ],
  "appeasements": [\
    {\
      "appeasementCounter": 1,\
      "reasonCode": "Incorrect item",\
      "subReasonCode": "Late shipping",\
      "value": 34.56,\
      "invoiceValue": 34.56,\
      "payments": [\
        {\
          "paymentCounter": 1,\
          "refundAmount": 40\
        }\
      ]\
    }\
  ],
  "discounts": [\
    {\
      "quantity": 2,\
      "amount": 2.4,\
      "unit": "AMOUNT_OFF",\
      "value": 2,\
      "promoId": "HNY2022",\
      "promoCode": "HNY2022",\
      "promoTitle": "Happy New Year",\
      "type": "promotion",\
      "invoiceQuantity": 2,\
      "returnQuantity": 2,\
      "cancelQuantity": 2\
    }\
  ],
  "customer": {
    "name": {
      "first": "John",
      "middle": "Middle",
      "last": "Doe"
    },
    "email": "john@fabric.inc",
    "phone": {
      "number": "55555555555",
      "type": "MOBILE"
    },
    "userId": "62272e917b12209e68751d94",
    "accountId": "62272e917b12209e68751d94",
    "employeeId": "62272e917b12209e68751d94",
    "company": "fabric"
  },
  "payments": [\
    {\
      "paymentCounter": 1,\
      "paymentDate": "2022-01-27T16:15:58-05:00",\
      "billToId": "62272e917b12209e68751d94",\
      "paymentIdentifier": {\
        "cardIdentifier": "3456",\
        "expirationYear": "2029",\
        "expirationMonth": "2029",\
        "paymentId": "62272e917b12209e68751d94",\
        "fabricPaymentReference": "test"\
      },\
      "paymentProvider": "stripe",\
      "paymentToken": {\
        "token": "pi_34tr6787rt",\
        "paymentType": "VISA"\
      },\
      "paymentMethod": "CREDIT_CARD",\
      "authAmount": 123.2,\
      "chargedAmount": 60,\
      "refundAmount": 40,\
      "currency": "USD",\
      "conversion": 1,\
      "paymentStatus": "OK",\
      "partialCapture": "false",\
      "finalCapture": "false",\
      "paymentLog": "payment response list",\
      "attributes": {\
        "expirationMonth": 12\
      }\
    }\
  ],
  "auditLogs": [\
    {\
      "auditId": "62272e917b12209e68751d94",\
      "auditType": "<string>",\
      "employeeId": "62272e917b12209e68751d94",\
      "auditTimestamp": "2022-05-12T09:24:54.804Z",\
      "source": "POS",\
      "reasonCode": "POS",\
      "subReasonCode": "POS",\
      "policyCode": "POS",\
      "note": "Note",\
      "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "lineItemNumber": 1,\
      "sku": "F5F",\
      "quantity": 1,\
      "amount": 2.4,\
      "paymentToken": {\
        "token": "pi_34tr6787rt",\
        "paymentType": "VISA"\
      },\
      "success": true,\
      "paymentResponse": {},\
      "updatedFields": [\
        {\
          "fieldName": "UOM",\
          "fieldOriginalValue": "PK"\
        }\
      ],\
      "attributes": {}\
    }\
  ],
  "notes": [\
    {\
      "timestamp": "2022-05-12T09:30:31.198Z",\
      "user": "62272e917b12209e68751d94",\
      "notes": "Extra information to be provided"\
    }\
  ],
  "orderReleaseTimestamp": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
'
import requests

url = "https://prod01.oms.fabric.inc/api/v2/order/{orderNumber}"

payload = {
    "orderNumber": "309019176",
    "channelId": "12",
    "statusCode": "ORDER_CREATED",
    "items": [\
        {\
            "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
            "lineItemNumber": 1,\
            "itemId": "1234",\
            "sku": "P1234",\
            "shipToId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
            "channelId": "WHBM",\
            "segment": "P1234",\
            "vendorId": "P1234",\
            "title": "Item",\
            "type": "WEB_SHIP",\
            "subType": "Borderfree",\
            "backorder": True,\
            "orderedQuantity": 60,\
            "backOrderedQuantity": 10,\
            "pendingShippedQuantity": 10,\
            "pendingShippedBackOrderQuantity": 10,\
            "shippedQuantity": 10,\
            "deliveredQuantity": 10,\
            "invoiceQuantity": 10,\
            "cancelledQuantity": 10,\
            "pendingReturnQuantity": 10,\
            "processingReturnQuantity": 10,\
            "rejectedReturnQuantity": 10,\
            "returnedQuantity": 10,\
            "reshippedQuantity": 10,\
            "uom": "EA",\
            "itemUnitPrice": 10,\
            "itemSubTotal": 600,\
            "originalItemSubTotal": 600,\
            "itemFeeTotal": 5,\
            "originalFeeTotal": 5,\
            "itemShippingTotal": 5,\
            "originalShippingTotal": 5,\
            "appeasementTotal": 5.5,\
            "itemDiscountsTotal": 55,\
            "originalDiscounts": 55,\
            "itemTaxTotal": 5,\
            "originalTaxTotal": 555,\
            "itemTotal": 555,\
            "originalItemTotal": 555,\
            "outstandingItemTotal": 555,\
            "originalOutstandingItemTotal": 555,\
            "invoiceTotal": 555,\
            "currency": "USD",\
            "employeeId": "5345HJH",\
            "associateId": "5345HJH",\
            "fees": [\
                {\
                    "type": "tax",\
                    "value": 34.56,\
                    "invoiceQuantity": 34,\
                    "refundAmount": 10.4,\
                    "quantity": 12\
                }\
            ],\
            "appeasements": [\
                {\
                    "appeasementCounter": 1,\
                    "reasonCode": "Incorrect item",\
                    "subReasonCode": "Late shipping",\
                    "value": 34.56,\
                    "invoiceValue": 34.56,\
                    "payments": [\
                        {\
                            "paymentCounter": 1,\
                            "refundAmount": 40\
                        }\
                    ]\
                }\
            ],\
            "returns": [\
                {\
                    "shipmentId": "12353543",\
                    "shipmentLineItemId": "2412341",\
                    "shipmentQuantity": 1,\
                    "refundAmount": 11.29,\
                    "invoicedAmount": 11.29,\
                    "returnsCreatedAt": "2022-09-14T14:07:36.861Z"\
                }\
            ],\
            "taxCode": "FR01",\
            "taxDetail": [\
                {\
                    "type": "tax",\
                    "value": 34.56\
                }\
            ],\
            "discounts": [\
                {\
                    "quantity": 2,\
                    "amount": 2.4,\
                    "unit": "AMOUNT_OFF",\
                    "value": 2,\
                    "promoId": "HNY2022",\
                    "promoCode": "HNY2022",\
                    "promoTitle": "Happy New Year",\
                    "type": "promotion",\
                    "invoiceQuantity": 2,\
                    "returnQuantity": 2,\
                    "cancelQuantity": 2\
                }\
            ],\
            "attributes": {\
                "isDonation": True,\
                "isGiftCard": False,\
                "isFinalSale": False,\
                "returnsLink": True\
            },\
            "exchangeItem": True,\
            "parentLineItemNumber": 12,\
            "pendingExchangeQuantity": 12,\
            "exchangeQuantity": 13,\
            "refundAmount": 12.4,\
            "lineOrderStatus": "VALID",\
            "infiniteConsent": True,\
            "notes": [\
                {\
                    "timestamp": "2022-05-12T09:30:31.198Z",\
                    "user": "62272e917b12209e68751d94",\
                    "notes": "Extra information to be provided"\
                }\
            ],\
            "gifting": True\
        }\
    ],
    "shipInfo": [\
        {\
            "shipToId": "5349b4ddd2781d08c09890f4",\
            "taxCode": "FR01",\
            "locationNum": "123",\
            "pickup": [\
                {\
                    "name": {\
                        "first": "John",\
                        "middle": "Middle",\
                        "last": "Doe"\
                    },\
                    "email": "john123@gmail.com",\
                    "phone": {\
                        "number": "55555555555",\
                        "type": "MOBILE"\
                    },\
                    "pickupType": "Primary"\
                }\
            ],\
            "taxDetail": [\
                {\
                    "type": "tax",\
                    "value": 34.56\
                }\
            ],\
            "shipMethod": "Express Delivery",\
            "shipToType": "SHIP_TO_ADDRESS",\
            "estimatedShipDate": "2022-05-12T09:30:31.198Z",\
            "estimatedDeliveryDate": "2022-05-12T09:30:31.198Z",\
            "shipToPrice": 20,\
            "shipToDiscount": 12.6,\
            "shipToTaxTotal": 12.6,\
            "shipmentInstructions": "User instructions",\
            "attributes": {\
                "isOpenBox": False,\
                "isOTPDElivery": True\
            }\
        }\
    ],
    "version": 123,
    "orderId": "5349b4ddd2781d08c09890f4",
    "orderDate": "2022-05-12T09:30:31.198Z",
    "cancellationDate": "2022-05-12T09:30:31.198Z",
    "allocationDate": "2022-05-12T09:30:31.198Z",
    "cartId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
    "type": "WEB",
    "subType": "International",
    "processName": "CANCEL",
    "employeeId": "43278",
    "retail": {
        "locationNum": 123,
        "cashierId": "C-123",
        "registerId": "113",
        "transactionId": "R123-431-1133-2129"
    },
    "orderSubTotal": 123.45,
    "originalSubTotal": 113.45,
    "orderDiscount": 1.23,
    "originalDiscounts": 1.45,
    "feeTotal": 12.34,
    "originalFeeTotal": 12.34,
    "taxTotal": 12.34,
    "appeasementTotal": 12.34,
    "originalTaxTotal": 12.34,
    "returnTotal": 12.34,
    "cancelTotal": 12.34,
    "invoiceTotal": 12.34,
    "orderTotal": 146.9,
    "originalOrderTotal": 146.9,
    "currency": "USD",
    "statusDescription": "Order Created",
    "attributes": {
        "type": "String/Number/JSON",
        "purchaseOrder": "String",
        "salesRepId": "String",
        "approve": "String",
        "fraudCheckSessionId": "aee6d1face0e4d55948d1e30b6240048",
        "fraudCheckStatus": "UPDATED",
        "fraudCheckTransId": "0R12TQ46",
        "fraudScore": "31"
    },
    "fees": [\
        {\
            "type": "shipping",\
            "value": 34.56,\
            "invoiceValue": 34.56\
        }\
    ],
    "appeasements": [\
        {\
            "appeasementCounter": 1,\
            "reasonCode": "Incorrect item",\
            "subReasonCode": "Late shipping",\
            "value": 34.56,\
            "invoiceValue": 34.56,\
            "payments": [\
                {\
                    "paymentCounter": 1,\
                    "refundAmount": 40\
                }\
            ]\
        }\
    ],
    "discounts": [\
        {\
            "quantity": 2,\
            "amount": 2.4,\
            "unit": "AMOUNT_OFF",\
            "value": 2,\
            "promoId": "HNY2022",\
            "promoCode": "HNY2022",\
            "promoTitle": "Happy New Year",\
            "type": "promotion",\
            "invoiceQuantity": 2,\
            "returnQuantity": 2,\
            "cancelQuantity": 2\
        }\
    ],
    "customer": {
        "name": {
            "first": "John",
            "middle": "Middle",
            "last": "Doe"
        },
        "email": "john@fabric.inc",
        "phone": {
            "number": "55555555555",
            "type": "MOBILE"
        },
        "userId": "62272e917b12209e68751d94",
        "accountId": "62272e917b12209e68751d94",
        "employeeId": "62272e917b12209e68751d94",
        "company": "fabric"
    },
    "payments": [\
        {\
            "paymentCounter": 1,\
            "paymentDate": "2022-01-27T16:15:58-05:00",\
            "billToId": "62272e917b12209e68751d94",\
            "paymentIdentifier": {\
                "cardIdentifier": "3456",\
                "expirationYear": "2029",\
                "expirationMonth": "2029",\
                "paymentId": "62272e917b12209e68751d94",\
                "fabricPaymentReference": "test"\
            },\
            "paymentProvider": "stripe",\
            "paymentToken": {\
                "token": "pi_34tr6787rt",\
                "paymentType": "VISA"\
            },\
            "paymentMethod": "CREDIT_CARD",\
            "authAmount": 123.2,\
            "chargedAmount": 60,\
            "refundAmount": 40,\
            "currency": "USD",\
            "conversion": 1,\
            "paymentStatus": "OK",\
            "partialCapture": "false",\
            "finalCapture": "false",\
            "paymentLog": "payment response list",\
            "attributes": { "expirationMonth": 12 }\
        }\
    ],
    "auditLogs": [\
        {\
            "auditId": "62272e917b12209e68751d94",\
            "auditType": "<string>",\
            "employeeId": "62272e917b12209e68751d94",\
            "auditTimestamp": "2022-05-12T09:24:54.804Z",\
            "source": "POS",\
            "reasonCode": "POS",\
            "subReasonCode": "POS",\
            "policyCode": "POS",\
            "note": "Note",\
            "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
            "lineItemNumber": 1,\
            "sku": "F5F",\
            "quantity": 1,\
            "amount": 2.4,\
            "paymentToken": {\
                "token": "pi_34tr6787rt",\
                "paymentType": "VISA"\
            },\
            "success": True,\
            "paymentResponse": {},\
            "updatedFields": [\
                {\
                    "fieldName": "UOM",\
                    "fieldOriginalValue": "PK"\
                }\
            ],\
            "attributes": {}\
        }\
    ],
    "notes": [\
        {\
            "timestamp": "2022-05-12T09:30:31.198Z",\
            "user": "62272e917b12209e68751d94",\
            "notes": "Extra information to be provided"\
        }\
    ],
    "orderReleaseTimestamp": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
}
headers = {
    "x-site-context": "<x-site-context>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PUT',
  headers: {
    'x-site-context': '<x-site-context>',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    orderNumber: '309019176',
    channelId: '12',
    statusCode: 'ORDER_CREATED',
    items: [\
      {\
        lineItemId: 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
        lineItemNumber: 1,\
        itemId: '1234',\
        sku: 'P1234',\
        shipToId: 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
        channelId: 'WHBM',\
        segment: 'P1234',\
        vendorId: 'P1234',\
        title: 'Item',\
        type: 'WEB_SHIP',\
        subType: 'Borderfree',\
        backorder: true,\
        orderedQuantity: 60,\
        backOrderedQuantity: 10,\
        pendingShippedQuantity: 10,\
        pendingShippedBackOrderQuantity: 10,\
        shippedQuantity: 10,\
        deliveredQuantity: 10,\
        invoiceQuantity: 10,\
        cancelledQuantity: 10,\
        pendingReturnQuantity: 10,\
        processingReturnQuantity: 10,\
        rejectedReturnQuantity: 10,\
        returnedQuantity: 10,\
        reshippedQuantity: 10,\
        uom: 'EA',\
        itemUnitPrice: 10,\
        itemSubTotal: 600,\
        originalItemSubTotal: 600,\
        itemFeeTotal: 5,\
        originalFeeTotal: 5,\
        itemShippingTotal: 5,\
        originalShippingTotal: 5,\
        appeasementTotal: 5.5,\
        itemDiscountsTotal: 55,\
        originalDiscounts: 55,\
        itemTaxTotal: 5,\
        originalTaxTotal: 555,\
        itemTotal: 555,\
        originalItemTotal: 555,\
        outstandingItemTotal: 555,\
        originalOutstandingItemTotal: 555,\
        invoiceTotal: 555,\
        currency: 'USD',\
        employeeId: '5345HJH',\
        associateId: '5345HJH',\
        fees: [\
          {\
            type: 'tax',\
            value: 34.56,\
            invoiceQuantity: 34,\
            refundAmount: 10.4,\
            quantity: 12\
          }\
        ],\
        appeasements: [\
          {\
            appeasementCounter: 1,\
            reasonCode: 'Incorrect item',\
            subReasonCode: 'Late shipping',\
            value: 34.56,\
            invoiceValue: 34.56,\
            payments: [{paymentCounter: 1, refundAmount: 40}]\
          }\
        ],\
        returns: [\
          {\
            shipmentId: '12353543',\
            shipmentLineItemId: '2412341',\
            shipmentQuantity: 1,\
            refundAmount: 11.29,\
            invoicedAmount: 11.29,\
            returnsCreatedAt: '2022-09-14T14:07:36.861Z'\
          }\
        ],\
        taxCode: 'FR01',\
        taxDetail: [{type: 'tax', value: 34.56}],\
        discounts: [\
          {\
            quantity: 2,\
            amount: 2.4,\
            unit: 'AMOUNT_OFF',\
            value: 2,\
            promoId: 'HNY2022',\
            promoCode: 'HNY2022',\
            promoTitle: 'Happy New Year',\
            type: 'promotion',\
            invoiceQuantity: 2,\
            returnQuantity: 2,\
            cancelQuantity: 2\
          }\
        ],\
        attributes: {isDonation: true, isGiftCard: false, isFinalSale: false, returnsLink: true},\
        exchangeItem: true,\
        parentLineItemNumber: 12,\
        pendingExchangeQuantity: 12,\
        exchangeQuantity: 13,\
        refundAmount: 12.4,\
        lineOrderStatus: 'VALID',\
        infiniteConsent: true,\
        notes: [\
          {\
            timestamp: '2022-05-12T09:30:31.198Z',\
            user: '62272e917b12209e68751d94',\
            notes: 'Extra information to be provided'\
          }\
        ],\
        gifting: true\
      }\
    ],
    shipInfo: [\
      {\
        shipToId: '5349b4ddd2781d08c09890f4',\
        taxCode: 'FR01',\
        locationNum: '123',\
        pickup: [\
          {\
            name: {first: 'John', middle: 'Middle', last: 'Doe'},\
            email: 'john123@gmail.com',\
            phone: {number: '55555555555', type: 'MOBILE'},\
            pickupType: 'Primary'\
          }\
        ],\
        taxDetail: [{type: 'tax', value: 34.56}],\
        shipMethod: 'Express Delivery',\
        shipToType: 'SHIP_TO_ADDRESS',\
        estimatedShipDate: '2022-05-12T09:30:31.198Z',\
        estimatedDeliveryDate: '2022-05-12T09:30:31.198Z',\
        shipToPrice: 20,\
        shipToDiscount: 12.6,\
        shipToTaxTotal: 12.6,\
        shipmentInstructions: 'User instructions',\
        attributes: {isOpenBox: false, isOTPDElivery: true}\
      }\
    ],
    version: 123,
    orderId: '5349b4ddd2781d08c09890f4',
    orderDate: '2022-05-12T09:30:31.198Z',
    cancellationDate: '2022-05-12T09:30:31.198Z',
    allocationDate: '2022-05-12T09:30:31.198Z',
    cartId: 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',
    type: 'WEB',
    subType: 'International',
    processName: 'CANCEL',
    employeeId: '43278',
    retail: {
      locationNum: 123,
      cashierId: 'C-123',
      registerId: '113',
      transactionId: 'R123-431-1133-2129'
    },
    orderSubTotal: 123.45,
    originalSubTotal: 113.45,
    orderDiscount: 1.23,
    originalDiscounts: 1.45,
    feeTotal: 12.34,
    originalFeeTotal: 12.34,
    taxTotal: 12.34,
    appeasementTotal: 12.34,
    originalTaxTotal: 12.34,
    returnTotal: 12.34,
    cancelTotal: 12.34,
    invoiceTotal: 12.34,
    orderTotal: 146.9,
    originalOrderTotal: 146.9,
    currency: 'USD',
    statusDescription: 'Order Created',
    attributes: {
      type: 'String/Number/JSON',
      purchaseOrder: 'String',
      salesRepId: 'String',
      approve: 'String',
      fraudCheckSessionId: 'aee6d1face0e4d55948d1e30b6240048',
      fraudCheckStatus: 'UPDATED',
      fraudCheckTransId: '0R12TQ46',
      fraudScore: '31'
    },
    fees: [{type: 'shipping', value: 34.56, invoiceValue: 34.56}],
    appeasements: [\
      {\
        appeasementCounter: 1,\
        reasonCode: 'Incorrect item',\
        subReasonCode: 'Late shipping',\
        value: 34.56,\
        invoiceValue: 34.56,\
        payments: [{paymentCounter: 1, refundAmount: 40}]\
      }\
    ],
    discounts: [\
      {\
        quantity: 2,\
        amount: 2.4,\
        unit: 'AMOUNT_OFF',\
        value: 2,\
        promoId: 'HNY2022',\
        promoCode: 'HNY2022',\
        promoTitle: 'Happy New Year',\
        type: 'promotion',\
        invoiceQuantity: 2,\
        returnQuantity: 2,\
        cancelQuantity: 2\
      }\
    ],
    customer: {
      name: {first: 'John', middle: 'Middle', last: 'Doe'},
      email: 'john@fabric.inc',
      phone: {number: '55555555555', type: 'MOBILE'},
      userId: '62272e917b12209e68751d94',
      accountId: '62272e917b12209e68751d94',
      employeeId: '62272e917b12209e68751d94',
      company: 'fabric'
    },
    payments: [\
      {\
        paymentCounter: 1,\
        paymentDate: '2022-01-27T16:15:58-05:00',\
        billToId: '62272e917b12209e68751d94',\
        paymentIdentifier: {\
          cardIdentifier: '3456',\
          expirationYear: '2029',\
          expirationMonth: '2029',\
          paymentId: '62272e917b12209e68751d94',\
          fabricPaymentReference: 'test'\
        },\
        paymentProvider: 'stripe',\
        paymentToken: {token: 'pi_34tr6787rt', paymentType: 'VISA'},\
        paymentMethod: 'CREDIT_CARD',\
        authAmount: 123.2,\
        chargedAmount: 60,\
        refundAmount: 40,\
        currency: 'USD',\
        conversion: 1,\
        paymentStatus: 'OK',\
        partialCapture: 'false',\
        finalCapture: 'false',\
        paymentLog: 'payment response list',\
        attributes: {expirationMonth: 12}\
      }\
    ],
    auditLogs: [\
      {\
        auditId: '62272e917b12209e68751d94',\
        auditType: '<string>',\
        employeeId: '62272e917b12209e68751d94',\
        auditTimestamp: '2022-05-12T09:24:54.804Z',\
        source: 'POS',\
        reasonCode: 'POS',\
        subReasonCode: 'POS',\
        policyCode: 'POS',\
        note: 'Note',\
        lineItemId: 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
        lineItemNumber: 1,\
        sku: 'F5F',\
        quantity: 1,\
        amount: 2.4,\
        paymentToken: {token: 'pi_34tr6787rt', paymentType: 'VISA'},\
        success: true,\
        paymentResponse: {},\
        updatedFields: [{fieldName: 'UOM', fieldOriginalValue: 'PK'}],\
        attributes: {}\
      }\
    ],
    notes: [\
      {\
        timestamp: '2022-05-12T09:30:31.198Z',\
        user: '62272e917b12209e68751d94',\
        notes: 'Extra information to be provided'\
      }\
    ],
    orderReleaseTimestamp: '2023-11-07T05:31:56Z',
    createdAt: '2023-11-07T05:31:56Z',
    updatedAt: '2023-11-07T05:31:56Z'
  })
};

fetch('https://prod01.oms.fabric.inc/api/v2/order/{orderNumber}', 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://prod01.oms.fabric.inc/api/v2/order/{orderNumber}",\
  CURLOPT_RETURNTRANSFER => true,\
  CURLOPT_ENCODING => "",\
  CURLOPT_MAXREDIRS => 10,\
  CURLOPT_TIMEOUT => 30,\
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
  CURLOPT_CUSTOMREQUEST => "PUT",\
  CURLOPT_POSTFIELDS => json_encode([\
    'orderNumber' => '309019176',\
    'channelId' => '12',\
    'statusCode' => 'ORDER_CREATED',\
    'items' => [\
        [\
                'lineItemId' => 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
                'lineItemNumber' => 1,\
                'itemId' => '1234',\
                'sku' => 'P1234',\
                'shipToId' => 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
                'channelId' => 'WHBM',\
                'segment' => 'P1234',\
                'vendorId' => 'P1234',\
                'title' => 'Item',\
                'type' => 'WEB_SHIP',\
                'subType' => 'Borderfree',\
                'backorder' => true,\
                'orderedQuantity' => 60,\
                'backOrderedQuantity' => 10,\
                'pendingShippedQuantity' => 10,\
                'pendingShippedBackOrderQuantity' => 10,\
                'shippedQuantity' => 10,\
                'deliveredQuantity' => 10,\
                'invoiceQuantity' => 10,\
                'cancelledQuantity' => 10,\
                'pendingReturnQuantity' => 10,\
                'processingReturnQuantity' => 10,\
                'rejectedReturnQuantity' => 10,\
                'returnedQuantity' => 10,\
                'reshippedQuantity' => 10,\
                'uom' => 'EA',\
                'itemUnitPrice' => 10,\
                'itemSubTotal' => 600,\
                'originalItemSubTotal' => 600,\
                'itemFeeTotal' => 5,\
                'originalFeeTotal' => 5,\
                'itemShippingTotal' => 5,\
                'originalShippingTotal' => 5,\
                'appeasementTotal' => 5.5,\
                'itemDiscountsTotal' => 55,\
                'originalDiscounts' => 55,\
                'itemTaxTotal' => 5,\
                'originalTaxTotal' => 555,\
                'itemTotal' => 555,\
                'originalItemTotal' => 555,\
                'outstandingItemTotal' => 555,\
                'originalOutstandingItemTotal' => 555,\
                'invoiceTotal' => 555,\
                'currency' => 'USD',\
                'employeeId' => '5345HJH',\
                'associateId' => '5345HJH',\
                'fees' => [\
                                [\
                                                                'type' => 'tax',\
                                                                'value' => 34.56,\
                                                                'invoiceQuantity' => 34,\
                                                                'refundAmount' => 10.4,\
                                                                'quantity' => 12\
                                ]\
                ],\
                'appeasements' => [\
                                [\
                                                                'appeasementCounter' => 1,\
                                                                'reasonCode' => 'Incorrect item',\
                                                                'subReasonCode' => 'Late shipping',\
                                                                'value' => 34.56,\
                                                                'invoiceValue' => 34.56,\
                                                                'payments' => [\
                                                                                                                                [\
                                                                                                                                                                                                                                                                'paymentCounter' => 1,\
                                                                                                                                                                                                                                                                'refundAmount' => 40\
                                                                                                                                ]\
                                                                ]\
                                ]\
                ],\
                'returns' => [\
                                [\
                                                                'shipmentId' => '12353543',\
                                                                'shipmentLineItemId' => '2412341',\
                                                                'shipmentQuantity' => 1,\
                                                                'refundAmount' => 11.29,\
                                                                'invoicedAmount' => 11.29,\
                                                                'returnsCreatedAt' => '2022-09-14T14:07:36.861Z'\
                                ]\
                ],\
                'taxCode' => 'FR01',\
                'taxDetail' => [\
                                [\
                                                                'type' => 'tax',\
                                                                'value' => 34.56\
                                ]\
                ],\
                'discounts' => [\
                                [\
                                                                'quantity' => 2,\
                                                                'amount' => 2.4,\
                                                                'unit' => 'AMOUNT_OFF',\
                                                                'value' => 2,\
                                                                'promoId' => 'HNY2022',\
                                                                'promoCode' => 'HNY2022',\
                                                                'promoTitle' => 'Happy New Year',\
                                                                'type' => 'promotion',\
                                                                'invoiceQuantity' => 2,\
                                                                'returnQuantity' => 2,\
                                                                'cancelQuantity' => 2\
                                ]\
                ],\
                'attributes' => [\
                                'isDonation' => true,\
                                'isGiftCard' => false,\
                                'isFinalSale' => false,\
                                'returnsLink' => true\
                ],\
                'exchangeItem' => true,\
                'parentLineItemNumber' => 12,\
                'pendingExchangeQuantity' => 12,\
                'exchangeQuantity' => 13,\
                'refundAmount' => 12.4,\
                'lineOrderStatus' => 'VALID',\
                'infiniteConsent' => true,\
                'notes' => [\
                                [\
                                                                'timestamp' => '2022-05-12T09:30:31.198Z',\
                                                                'user' => '62272e917b12209e68751d94',\
                                                                'notes' => 'Extra information to be provided'\
                                ]\
                ],\
                'gifting' => true\
        ]\
    ],\
    'shipInfo' => [\
        [\
                'shipToId' => '5349b4ddd2781d08c09890f4',\
                'taxCode' => 'FR01',\
                'locationNum' => '123',\
                'pickup' => [\
                                [\
                                                                'name' => [\
                                                                                                                                'first' => 'John',\
                                                                                                                                'middle' => 'Middle',\
                                                                                                                                'last' => 'Doe'\
                                                                ],\
                                                                'email' => 'john123@gmail.com',\
                                                                'phone' => [\
                                                                                                                                'number' => '55555555555',\
                                                                                                                                'type' => 'MOBILE'\
                                                                ],\
                                                                'pickupType' => 'Primary'\
                                ]\
                ],\
                'taxDetail' => [\
                                [\
                                                                'type' => 'tax',\
                                                                'value' => 34.56\
                                ]\
                ],\
                'shipMethod' => 'Express Delivery',\
                'shipToType' => 'SHIP_TO_ADDRESS',\
                'estimatedShipDate' => '2022-05-12T09:30:31.198Z',\
                'estimatedDeliveryDate' => '2022-05-12T09:30:31.198Z',\
                'shipToPrice' => 20,\
                'shipToDiscount' => 12.6,\
                'shipToTaxTotal' => 12.6,\
                'shipmentInstructions' => 'User instructions',\
                'attributes' => [\
                                'isOpenBox' => false,\
                                'isOTPDElivery' => true\
                ]\
        ]\
    ],\
    'version' => 123,\
    'orderId' => '5349b4ddd2781d08c09890f4',\
    'orderDate' => '2022-05-12T09:30:31.198Z',\
    'cancellationDate' => '2022-05-12T09:30:31.198Z',\
    'allocationDate' => '2022-05-12T09:30:31.198Z',\
    'cartId' => 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
    'type' => 'WEB',\
    'subType' => 'International',\
    'processName' => 'CANCEL',\
    'employeeId' => '43278',\
    'retail' => [\
        'locationNum' => 123,\
        'cashierId' => 'C-123',\
        'registerId' => '113',\
        'transactionId' => 'R123-431-1133-2129'\
    ],\
    'orderSubTotal' => 123.45,\
    'originalSubTotal' => 113.45,\
    'orderDiscount' => 1.23,\
    'originalDiscounts' => 1.45,\
    'feeTotal' => 12.34,\
    'originalFeeTotal' => 12.34,\
    'taxTotal' => 12.34,\
    'appeasementTotal' => 12.34,\
    'originalTaxTotal' => 12.34,\
    'returnTotal' => 12.34,\
    'cancelTotal' => 12.34,\
    'invoiceTotal' => 12.34,\
    'orderTotal' => 146.9,\
    'originalOrderTotal' => 146.9,\
    'currency' => 'USD',\
    'statusDescription' => 'Order Created',\
    'attributes' => [\
        'type' => 'String/Number/JSON',\
        'purchaseOrder' => 'String',\
        'salesRepId' => 'String',\
        'approve' => 'String',\
        'fraudCheckSessionId' => 'aee6d1face0e4d55948d1e30b6240048',\
        'fraudCheckStatus' => 'UPDATED',\
        'fraudCheckTransId' => '0R12TQ46',\
        'fraudScore' => '31'\
    ],\
    'fees' => [\
        [\
                'type' => 'shipping',\
                'value' => 34.56,\
                'invoiceValue' => 34.56\
        ]\
    ],\
    'appeasements' => [\
        [\
                'appeasementCounter' => 1,\
                'reasonCode' => 'Incorrect item',\
                'subReasonCode' => 'Late shipping',\
                'value' => 34.56,\
                'invoiceValue' => 34.56,\
                'payments' => [\
                                [\
                                                                'paymentCounter' => 1,\
                                                                'refundAmount' => 40\
                                ]\
                ]\
        ]\
    ],\
    'discounts' => [\
        [\
                'quantity' => 2,\
                'amount' => 2.4,\
                'unit' => 'AMOUNT_OFF',\
                'value' => 2,\
                'promoId' => 'HNY2022',\
                'promoCode' => 'HNY2022',\
                'promoTitle' => 'Happy New Year',\
                'type' => 'promotion',\
                'invoiceQuantity' => 2,\
                'returnQuantity' => 2,\
                'cancelQuantity' => 2\
        ]\
    ],\
    'customer' => [\
        'name' => [\
                'first' => 'John',\
                'middle' => 'Middle',\
                'last' => 'Doe'\
        ],\
        'email' => 'john@fabric.inc',\
        'phone' => [\
                'number' => '55555555555',\
                'type' => 'MOBILE'\
        ],\
        'userId' => '62272e917b12209e68751d94',\
        'accountId' => '62272e917b12209e68751d94',\
        'employeeId' => '62272e917b12209e68751d94',\
        'company' => 'fabric'\
    ],\
    'payments' => [\
        [\
                'paymentCounter' => 1,\
                'paymentDate' => '2022-01-27T16:15:58-05:00',\
                'billToId' => '62272e917b12209e68751d94',\
                'paymentIdentifier' => [\
                                'cardIdentifier' => '3456',\
                                'expirationYear' => '2029',\
                                'expirationMonth' => '2029',\
                                'paymentId' => '62272e917b12209e68751d94',\
                                'fabricPaymentReference' => 'test'\
                ],\
                'paymentProvider' => 'stripe',\
                'paymentToken' => [\
                                'token' => 'pi_34tr6787rt',\
                                'paymentType' => 'VISA'\
                ],\
                'paymentMethod' => 'CREDIT_CARD',\
                'authAmount' => 123.2,\
                'chargedAmount' => 60,\
                'refundAmount' => 40,\
                'currency' => 'USD',\
                'conversion' => 1,\
                'paymentStatus' => 'OK',\
                'partialCapture' => 'false',\
                'finalCapture' => 'false',\
                'paymentLog' => 'payment response list',\
                'attributes' => [\
                                'expirationMonth' => 12\
                ]\
        ]\
    ],\
    'auditLogs' => [\
        [\
                'auditId' => '62272e917b12209e68751d94',\
                'auditType' => '<string>',\
                'employeeId' => '62272e917b12209e68751d94',\
                'auditTimestamp' => '2022-05-12T09:24:54.804Z',\
                'source' => 'POS',\
                'reasonCode' => 'POS',\
                'subReasonCode' => 'POS',\
                'policyCode' => 'POS',\
                'note' => 'Note',\
                'lineItemId' => 'b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569',\
                'lineItemNumber' => 1,\
                'sku' => 'F5F',\
                'quantity' => 1,\
                'amount' => 2.4,\
                'paymentToken' => [\
                                'token' => 'pi_34tr6787rt',\
                                'paymentType' => 'VISA'\
                ],\
                'success' => true,\
                'paymentResponse' => [\
\
                ],\
                'updatedFields' => [\
                                [\
                                                                'fieldName' => 'UOM',\
                                                                'fieldOriginalValue' => 'PK'\
                                ]\
                ],\
                'attributes' => [\
\
                ]\
        ]\
    ],\
    'notes' => [\
        [\
                'timestamp' => '2022-05-12T09:30:31.198Z',\
                'user' => '62272e917b12209e68751d94',\
                'notes' => 'Extra information to be provided'\
        ]\
    ],\
    'orderReleaseTimestamp' => '2023-11-07T05:31:56Z',\
    'createdAt' => '2023-11-07T05:31:56Z',\
    'updatedAt' => '2023-11-07T05:31:56Z'\
  ]),\
  CURLOPT_HTTPHEADER => [\
    "Authorization: Bearer <token>",\
    "Content-Type: application/json",\
    "x-site-context: <x-site-context>"\
  ],\
]);

$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://prod01.oms.fabric.inc/api/v2/order/{orderNumber}"

payload := strings.NewReader("{\n  \"orderNumber\": \"309019176\",\n  \"channelId\": \"12\",\n  \"statusCode\": \"ORDER_CREATED\",\n  \"items\": [\n    {\n      \"lineItemId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"lineItemNumber\": 1,\n      \"itemId\": \"1234\",\n      \"sku\": \"P1234\",\n      \"shipToId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"channelId\": \"WHBM\",\n      \"segment\": \"P1234\",\n      \"vendorId\": \"P1234\",\n      \"title\": \"Item\",\n      \"type\": \"WEB_SHIP\",\n      \"subType\": \"Borderfree\",\n      \"backorder\": true,\n      \"orderedQuantity\": 60,\n      \"backOrderedQuantity\": 10,\n      \"pendingShippedQuantity\": 10,\n      \"pendingShippedBackOrderQuantity\": 10,\n      \"shippedQuantity\": 10,\n      \"deliveredQuantity\": 10,\n      \"invoiceQuantity\": 10,\n      \"cancelledQuantity\": 10,\n      \"pendingReturnQuantity\": 10,\n      \"processingReturnQuantity\": 10,\n      \"rejectedReturnQuantity\": 10,\n      \"returnedQuantity\": 10,\n      \"reshippedQuantity\": 10,\n      \"uom\": \"EA\",\n      \"itemUnitPrice\": 10,\n      \"itemSubTotal\": 600,\n      \"originalItemSubTotal\": 600,\n      \"itemFeeTotal\": 5,\n      \"originalFeeTotal\": 5,\n      \"itemShippingTotal\": 5,\n      \"originalShippingTotal\": 5,\n      \"appeasementTotal\": 5.5,\n      \"itemDiscountsTotal\": 55,\n      \"originalDiscounts\": 55,\n      \"itemTaxTotal\": 5,\n      \"originalTaxTotal\": 555,\n      \"itemTotal\": 555,\n      \"originalItemTotal\": 555,\n      \"outstandingItemTotal\": 555,\n      \"originalOutstandingItemTotal\": 555,\n      \"invoiceTotal\": 555,\n      \"currency\": \"USD\",\n      \"employeeId\": \"5345HJH\",\n      \"associateId\": \"5345HJH\",\n      \"fees\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56,\n          \"invoiceQuantity\": 34,\n          \"refundAmount\": 10.4,\n          \"quantity\": 12\n        }\n      ],\n      \"appeasements\": [\n        {\n          \"appeasementCounter\": 1,\n          \"reasonCode\": \"Incorrect item\",\n          \"subReasonCode\": \"Late shipping\",\n          \"value\": 34.56,\n          \"invoiceValue\": 34.56,\n          \"payments\": [\n            {\n              \"paymentCounter\": 1,\n              \"refundAmount\": 40\n            }\n          ]\n        }\n      ],\n      \"returns\": [\n        {\n          \"shipmentId\": \"12353543\",\n          \"shipmentLineItemId\": \"2412341\",\n          \"shipmentQuantity\": 1,\n          \"refundAmount\": 11.29,\n          \"invoicedAmount\": 11.29,\n          \"returnsCreatedAt\": \"2022-09-14T14:07:36.861Z\"\n        }\n      ],\n      \"taxCode\": \"FR01\",\n      \"taxDetail\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56\n        }\n      ],\n      \"discounts\": [\n        {\n          \"quantity\": 2,\n          \"amount\": 2.4,\n          \"unit\": \"AMOUNT_OFF\",\n          \"value\": 2,\n          \"promoId\": \"HNY2022\",\n          \"promoCode\": \"HNY2022\",\n          \"promoTitle\": \"Happy New Year\",\n          \"type\": \"promotion\",\n          \"invoiceQuantity\": 2,\n          \"returnQuantity\": 2,\n          \"cancelQuantity\": 2\n        }\n      ],\n      \"attributes\": {\n        \"isDonation\": true,\n        \"isGiftCard\": false,\n        \"isFinalSale\": false,\n        \"returnsLink\": true\n      },\n      \"exchangeItem\": true,\n      \"parentLineItemNumber\": 12,\n      \"pendingExchangeQuantity\": 12,\n      \"exchangeQuantity\": 13,\n      \"refundAmount\": 12.4,\n      \"lineOrderStatus\": \"VALID\",\n      \"infiniteConsent\": true,\n      \"notes\": [\n        {\n          \"timestamp\": \"2022-05-12T09:30:31.198Z\",\n          \"user\": \"62272e917b12209e68751d94\",\n          \"notes\": \"Extra information to be provided\"\n        }\n      ],\n      \"gifting\": true\n    }\n  ],\n  \"shipInfo\": [\n    {\n      \"shipToId\": \"5349b4ddd2781d08c09890f4\",\n      \"taxCode\": \"FR01\",\n      \"locationNum\": \"123\",\n      \"pickup\": [\n        {\n          \"name\": {\n            \"first\": \"John\",\n            \"middle\": \"Middle\",\n            \"last\": \"Doe\"\n          },\n          \"email\": \"john123@gmail.com\",\n          \"phone\": {\n            \"number\": \"55555555555\",\n            \"type\": \"MOBILE\"\n          },\n          \"pickupType\": \"Primary\"\n        }\n      ],\n      \"taxDetail\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56\n        }\n      ],\n      \"shipMethod\": \"Express Delivery\",\n      \"shipToType\": \"SHIP_TO_ADDRESS\",\n      \"estimatedShipDate\": \"2022-05-12T09:30:31.198Z\",\n      \"estimatedDeliveryDate\": \"2022-05-12T09:30:31.198Z\",\n      \"shipToPrice\": 20,\n      \"shipToDiscount\": 12.6,\n      \"shipToTaxTotal\": 12.6,\n      \"shipmentInstructions\": \"User instructions\",\n      \"attributes\": {\n        \"isOpenBox\": false,\n        \"isOTPDElivery\": true\n      }\n    }\n  ],\n  \"version\": 123,\n  \"orderId\": \"5349b4ddd2781d08c09890f4\",\n  \"orderDate\": \"2022-05-12T09:30:31.198Z\",\n  \"cancellationDate\": \"2022-05-12T09:30:31.198Z\",\n  \"allocationDate\": \"2022-05-12T09:30:31.198Z\",\n  \"cartId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n  \"type\": \"WEB\",\n  \"subType\": \"International\",\n  \"processName\": \"CANCEL\",\n  \"employeeId\": \"43278\",\n  \"retail\": {\n    \"locationNum\": 123,\n    \"cashierId\": \"C-123\",\n    \"registerId\": \"113\",\n    \"transactionId\": \"R123-431-1133-2129\"\n  },\n  \"orderSubTotal\": 123.45,\n  \"originalSubTotal\": 113.45,\n  \"orderDiscount\": 1.23,\n  \"originalDiscounts\": 1.45,\n  \"feeTotal\": 12.34,\n  \"originalFeeTotal\": 12.34,\n  \"taxTotal\": 12.34,\n  \"appeasementTotal\": 12.34,\n  \"originalTaxTotal\": 12.34,\n  \"returnTotal\": 12.34,\n  \"cancelTotal\": 12.34,\n  \"invoiceTotal\": 12.34,\n  \"orderTotal\": 146.9,\n  \"originalOrderTotal\": 146.9,\n  \"currency\": \"USD\",\n  \"statusDescription\": \"Order Created\",\n  \"attributes\": {\n    \"type\": \"String/Number/JSON\",\n    \"purchaseOrder\": \"String\",\n    \"salesRepId\": \"String\",\n    \"approve\": \"String\",\n    \"fraudCheckSessionId\": \"aee6d1face0e4d55948d1e30b6240048\",\n    \"fraudCheckStatus\": \"UPDATED\",\n    \"fraudCheckTransId\": \"0R12TQ46\",\n    \"fraudScore\": \"31\"\n  },\n  \"fees\": [\n    {\n      \"type\": \"shipping\",\n      \"value\": 34.56,\n      \"invoiceValue\": 34.56\n    }\n  ],\n  \"appeasements\": [\n    {\n      \"appeasementCounter\": 1,\n      \"reasonCode\": \"Incorrect item\",\n      \"subReasonCode\": \"Late shipping\",\n      \"value\": 34.56,\n      \"invoiceValue\": 34.56,\n      \"payments\": [\n        {\n          \"paymentCounter\": 1,\n          \"refundAmount\": 40\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"quantity\": 2,\n      \"amount\": 2.4,\n      \"unit\": \"AMOUNT_OFF\",\n      \"value\": 2,\n      \"promoId\": \"HNY2022\",\n      \"promoCode\": \"HNY2022\",\n      \"promoTitle\": \"Happy New Year\",\n      \"type\": \"promotion\",\n      \"invoiceQuantity\": 2,\n      \"returnQuantity\": 2,\n      \"cancelQuantity\": 2\n    }\n  ],\n  \"customer\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"middle\": \"Middle\",\n      \"last\": \"Doe\"\n    },\n    \"email\": \"john@fabric.inc\",\n    \"phone\": {\n      \"number\": \"55555555555\",\n      \"type\": \"MOBILE\"\n    },\n    \"userId\": \"62272e917b12209e68751d94\",\n    \"accountId\": \"62272e917b12209e68751d94\",\n    \"employeeId\": \"62272e917b12209e68751d94\",\n    \"company\": \"fabric\"\n  },\n  \"payments\": [\n    {\n      \"paymentCounter\": 1,\n      \"paymentDate\": \"2022-01-27T16:15:58-05:00\",\n      \"billToId\": \"62272e917b12209e68751d94\",\n      \"paymentIdentifier\": {\n        \"cardIdentifier\": \"3456\",\n        \"expirationYear\": \"2029\",\n        \"expirationMonth\": \"2029\",\n        \"paymentId\": \"62272e917b12209e68751d94\",\n        \"fabricPaymentReference\": \"test\"\n      },\n      \"paymentProvider\": \"stripe\",\n      \"paymentToken\": {\n        \"token\": \"pi_34tr6787rt\",\n        \"paymentType\": \"VISA\"\n      },\n      \"paymentMethod\": \"CREDIT_CARD\",\n      \"authAmount\": 123.2,\n      \"chargedAmount\": 60,\n      \"refundAmount\": 40,\n      \"currency\": \"USD\",\n      \"conversion\": 1,\n      \"paymentStatus\": \"OK\",\n      \"partialCapture\": \"false\",\n      \"finalCapture\": \"false\",\n      \"paymentLog\": \"payment response list\",\n      \"attributes\": {\n        \"expirationMonth\": 12\n      }\n    }\n  ],\n  \"auditLogs\": [\n    {\n      \"auditId\": \"62272e917b12209e68751d94\",\n      \"auditType\": \"<string>\",\n      \"employeeId\": \"62272e917b12209e68751d94\",\n      \"auditTimestamp\": \"2022-05-12T09:24:54.804Z\",\n      \"source\": \"POS\",\n      \"reasonCode\": \"POS\",\n      \"subReasonCode\": \"POS\",\n      \"policyCode\": \"POS\",\n      \"note\": \"Note\",\n      \"lineItemId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"lineItemNumber\": 1,\n      \"sku\": \"F5F\",\n      \"quantity\": 1,\n      \"amount\": 2.4,\n      \"paymentToken\": {\n        \"token\": \"pi_34tr6787rt\",\n        \"paymentType\": \"VISA\"\n      },\n      \"success\": true,\n      \"paymentResponse\": {},\n      \"updatedFields\": [\n        {\n          \"fieldName\": \"UOM\",\n          \"fieldOriginalValue\": \"PK\"\n        }\n      ],\n      \"attributes\": {}\n    }\n  ],\n  \"notes\": [\n    {\n      \"timestamp\": \"2022-05-12T09:30:31.198Z\",\n      \"user\": \"62272e917b12209e68751d94\",\n      \"notes\": \"Extra information to be provided\"\n    }\n  ],\n  \"orderReleaseTimestamp\": \"2023-11-07T05:31:56Z\",\n  \"createdAt\": \"2023-11-07T05:31:56Z\",\n  \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("x-site-context", "<x-site-context>")
    req.Header.Add("Authorization", "Bearer <token>")
    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.put("https://prod01.oms.fabric.inc/api/v2/order/{orderNumber}")
  .header("x-site-context", "<x-site-context>")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"orderNumber\": \"309019176\",\n  \"channelId\": \"12\",\n  \"statusCode\": \"ORDER_CREATED\",\n  \"items\": [\n    {\n      \"lineItemId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"lineItemNumber\": 1,\n      \"itemId\": \"1234\",\n      \"sku\": \"P1234\",\n      \"shipToId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"channelId\": \"WHBM\",\n      \"segment\": \"P1234\",\n      \"vendorId\": \"P1234\",\n      \"title\": \"Item\",\n      \"type\": \"WEB_SHIP\",\n      \"subType\": \"Borderfree\",\n      \"backorder\": true,\n      \"orderedQuantity\": 60,\n      \"backOrderedQuantity\": 10,\n      \"pendingShippedQuantity\": 10,\n      \"pendingShippedBackOrderQuantity\": 10,\n      \"shippedQuantity\": 10,\n      \"deliveredQuantity\": 10,\n      \"invoiceQuantity\": 10,\n      \"cancelledQuantity\": 10,\n      \"pendingReturnQuantity\": 10,\n      \"processingReturnQuantity\": 10,\n      \"rejectedReturnQuantity\": 10,\n      \"returnedQuantity\": 10,\n      \"reshippedQuantity\": 10,\n      \"uom\": \"EA\",\n      \"itemUnitPrice\": 10,\n      \"itemSubTotal\": 600,\n      \"originalItemSubTotal\": 600,\n      \"itemFeeTotal\": 5,\n      \"originalFeeTotal\": 5,\n      \"itemShippingTotal\": 5,\n      \"originalShippingTotal\": 5,\n      \"appeasementTotal\": 5.5,\n      \"itemDiscountsTotal\": 55,\n      \"originalDiscounts\": 55,\n      \"itemTaxTotal\": 5,\n      \"originalTaxTotal\": 555,\n      \"itemTotal\": 555,\n      \"originalItemTotal\": 555,\n      \"outstandingItemTotal\": 555,\n      \"originalOutstandingItemTotal\": 555,\n      \"invoiceTotal\": 555,\n      \"currency\": \"USD\",\n      \"employeeId\": \"5345HJH\",\n      \"associateId\": \"5345HJH\",\n      \"fees\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56,\n          \"invoiceQuantity\": 34,\n          \"refundAmount\": 10.4,\n          \"quantity\": 12\n        }\n      ],\n      \"appeasements\": [\n        {\n          \"appeasementCounter\": 1,\n          \"reasonCode\": \"Incorrect item\",\n          \"subReasonCode\": \"Late shipping\",\n          \"value\": 34.56,\n          \"invoiceValue\": 34.56,\n          \"payments\": [\n            {\n              \"paymentCounter\": 1,\n              \"refundAmount\": 40\n            }\n          ]\n        }\n      ],\n      \"returns\": [\n        {\n          \"shipmentId\": \"12353543\",\n          \"shipmentLineItemId\": \"2412341\",\n          \"shipmentQuantity\": 1,\n          \"refundAmount\": 11.29,\n          \"invoicedAmount\": 11.29,\n          \"returnsCreatedAt\": \"2022-09-14T14:07:36.861Z\"\n        }\n      ],\n      \"taxCode\": \"FR01\",\n      \"taxDetail\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56\n        }\n      ],\n      \"discounts\": [\n        {\n          \"quantity\": 2,\n          \"amount\": 2.4,\n          \"unit\": \"AMOUNT_OFF\",\n          \"value\": 2,\n          \"promoId\": \"HNY2022\",\n          \"promoCode\": \"HNY2022\",\n          \"promoTitle\": \"Happy New Year\",\n          \"type\": \"promotion\",\n          \"invoiceQuantity\": 2,\n          \"returnQuantity\": 2,\n          \"cancelQuantity\": 2\n        }\n      ],\n      \"attributes\": {\n        \"isDonation\": true,\n        \"isGiftCard\": false,\n        \"isFinalSale\": false,\n        \"returnsLink\": true\n      },\n      \"exchangeItem\": true,\n      \"parentLineItemNumber\": 12,\n      \"pendingExchangeQuantity\": 12,\n      \"exchangeQuantity\": 13,\n      \"refundAmount\": 12.4,\n      \"lineOrderStatus\": \"VALID\",\n      \"infiniteConsent\": true,\n      \"notes\": [\n        {\n          \"timestamp\": \"2022-05-12T09:30:31.198Z\",\n          \"user\": \"62272e917b12209e68751d94\",\n          \"notes\": \"Extra information to be provided\"\n        }\n      ],\n      \"gifting\": true\n    }\n  ],\n  \"shipInfo\": [\n    {\n      \"shipToId\": \"5349b4ddd2781d08c09890f4\",\n      \"taxCode\": \"FR01\",\n      \"locationNum\": \"123\",\n      \"pickup\": [\n        {\n          \"name\": {\n            \"first\": \"John\",\n            \"middle\": \"Middle\",\n            \"last\": \"Doe\"\n          },\n          \"email\": \"john123@gmail.com\",\n          \"phone\": {\n            \"number\": \"55555555555\",\n            \"type\": \"MOBILE\"\n          },\n          \"pickupType\": \"Primary\"\n        }\n      ],\n      \"taxDetail\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56\n        }\n      ],\n      \"shipMethod\": \"Express Delivery\",\n      \"shipToType\": \"SHIP_TO_ADDRESS\",\n      \"estimatedShipDate\": \"2022-05-12T09:30:31.198Z\",\n      \"estimatedDeliveryDate\": \"2022-05-12T09:30:31.198Z\",\n      \"shipToPrice\": 20,\n      \"shipToDiscount\": 12.6,\n      \"shipToTaxTotal\": 12.6,\n      \"shipmentInstructions\": \"User instructions\",\n      \"attributes\": {\n        \"isOpenBox\": false,\n        \"isOTPDElivery\": true\n      }\n    }\n  ],\n  \"version\": 123,\n  \"orderId\": \"5349b4ddd2781d08c09890f4\",\n  \"orderDate\": \"2022-05-12T09:30:31.198Z\",\n  \"cancellationDate\": \"2022-05-12T09:30:31.198Z\",\n  \"allocationDate\": \"2022-05-12T09:30:31.198Z\",\n  \"cartId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n  \"type\": \"WEB\",\n  \"subType\": \"International\",\n  \"processName\": \"CANCEL\",\n  \"employeeId\": \"43278\",\n  \"retail\": {\n    \"locationNum\": 123,\n    \"cashierId\": \"C-123\",\n    \"registerId\": \"113\",\n    \"transactionId\": \"R123-431-1133-2129\"\n  },\n  \"orderSubTotal\": 123.45,\n  \"originalSubTotal\": 113.45,\n  \"orderDiscount\": 1.23,\n  \"originalDiscounts\": 1.45,\n  \"feeTotal\": 12.34,\n  \"originalFeeTotal\": 12.34,\n  \"taxTotal\": 12.34,\n  \"appeasementTotal\": 12.34,\n  \"originalTaxTotal\": 12.34,\n  \"returnTotal\": 12.34,\n  \"cancelTotal\": 12.34,\n  \"invoiceTotal\": 12.34,\n  \"orderTotal\": 146.9,\n  \"originalOrderTotal\": 146.9,\n  \"currency\": \"USD\",\n  \"statusDescription\": \"Order Created\",\n  \"attributes\": {\n    \"type\": \"String/Number/JSON\",\n    \"purchaseOrder\": \"String\",\n    \"salesRepId\": \"String\",\n    \"approve\": \"String\",\n    \"fraudCheckSessionId\": \"aee6d1face0e4d55948d1e30b6240048\",\n    \"fraudCheckStatus\": \"UPDATED\",\n    \"fraudCheckTransId\": \"0R12TQ46\",\n    \"fraudScore\": \"31\"\n  },\n  \"fees\": [\n    {\n      \"type\": \"shipping\",\n      \"value\": 34.56,\n      \"invoiceValue\": 34.56\n    }\n  ],\n  \"appeasements\": [\n    {\n      \"appeasementCounter\": 1,\n      \"reasonCode\": \"Incorrect item\",\n      \"subReasonCode\": \"Late shipping\",\n      \"value\": 34.56,\n      \"invoiceValue\": 34.56,\n      \"payments\": [\n        {\n          \"paymentCounter\": 1,\n          \"refundAmount\": 40\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"quantity\": 2,\n      \"amount\": 2.4,\n      \"unit\": \"AMOUNT_OFF\",\n      \"value\": 2,\n      \"promoId\": \"HNY2022\",\n      \"promoCode\": \"HNY2022\",\n      \"promoTitle\": \"Happy New Year\",\n      \"type\": \"promotion\",\n      \"invoiceQuantity\": 2,\n      \"returnQuantity\": 2,\n      \"cancelQuantity\": 2\n    }\n  ],\n  \"customer\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"middle\": \"Middle\",\n      \"last\": \"Doe\"\n    },\n    \"email\": \"john@fabric.inc\",\n    \"phone\": {\n      \"number\": \"55555555555\",\n      \"type\": \"MOBILE\"\n    },\n    \"userId\": \"62272e917b12209e68751d94\",\n    \"accountId\": \"62272e917b12209e68751d94\",\n    \"employeeId\": \"62272e917b12209e68751d94\",\n    \"company\": \"fabric\"\n  },\n  \"payments\": [\n    {\n      \"paymentCounter\": 1,\n      \"paymentDate\": \"2022-01-27T16:15:58-05:00\",\n      \"billToId\": \"62272e917b12209e68751d94\",\n      \"paymentIdentifier\": {\n        \"cardIdentifier\": \"3456\",\n        \"expirationYear\": \"2029\",\n        \"expirationMonth\": \"2029\",\n        \"paymentId\": \"62272e917b12209e68751d94\",\n        \"fabricPaymentReference\": \"test\"\n      },\n      \"paymentProvider\": \"stripe\",\n      \"paymentToken\": {\n        \"token\": \"pi_34tr6787rt\",\n        \"paymentType\": \"VISA\"\n      },\n      \"paymentMethod\": \"CREDIT_CARD\",\n      \"authAmount\": 123.2,\n      \"chargedAmount\": 60,\n      \"refundAmount\": 40,\n      \"currency\": \"USD\",\n      \"conversion\": 1,\n      \"paymentStatus\": \"OK\",\n      \"partialCapture\": \"false\",\n      \"finalCapture\": \"false\",\n      \"paymentLog\": \"payment response list\",\n      \"attributes\": {\n        \"expirationMonth\": 12\n      }\n    }\n  ],\n  \"auditLogs\": [\n    {\n      \"auditId\": \"62272e917b12209e68751d94\",\n      \"auditType\": \"<string>\",\n      \"employeeId\": \"62272e917b12209e68751d94\",\n      \"auditTimestamp\": \"2022-05-12T09:24:54.804Z\",\n      \"source\": \"POS\",\n      \"reasonCode\": \"POS\",\n      \"subReasonCode\": \"POS\",\n      \"policyCode\": \"POS\",\n      \"note\": \"Note\",\n      \"lineItemId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"lineItemNumber\": 1,\n      \"sku\": \"F5F\",\n      \"quantity\": 1,\n      \"amount\": 2.4,\n      \"paymentToken\": {\n        \"token\": \"pi_34tr6787rt\",\n        \"paymentType\": \"VISA\"\n      },\n      \"success\": true,\n      \"paymentResponse\": {},\n      \"updatedFields\": [\n        {\n          \"fieldName\": \"UOM\",\n          \"fieldOriginalValue\": \"PK\"\n        }\n      ],\n      \"attributes\": {}\n    }\n  ],\n  \"notes\": [\n    {\n      \"timestamp\": \"2022-05-12T09:30:31.198Z\",\n      \"user\": \"62272e917b12209e68751d94\",\n      \"notes\": \"Extra information to be provided\"\n    }\n  ],\n  \"orderReleaseTimestamp\": \"2023-11-07T05:31:56Z\",\n  \"createdAt\": \"2023-11-07T05:31:56Z\",\n  \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://prod01.oms.fabric.inc/api/v2/order/{orderNumber}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-site-context"] = '<x-site-context>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"orderNumber\": \"309019176\",\n  \"channelId\": \"12\",\n  \"statusCode\": \"ORDER_CREATED\",\n  \"items\": [\n    {\n      \"lineItemId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"lineItemNumber\": 1,\n      \"itemId\": \"1234\",\n      \"sku\": \"P1234\",\n      \"shipToId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"channelId\": \"WHBM\",\n      \"segment\": \"P1234\",\n      \"vendorId\": \"P1234\",\n      \"title\": \"Item\",\n      \"type\": \"WEB_SHIP\",\n      \"subType\": \"Borderfree\",\n      \"backorder\": true,\n      \"orderedQuantity\": 60,\n      \"backOrderedQuantity\": 10,\n      \"pendingShippedQuantity\": 10,\n      \"pendingShippedBackOrderQuantity\": 10,\n      \"shippedQuantity\": 10,\n      \"deliveredQuantity\": 10,\n      \"invoiceQuantity\": 10,\n      \"cancelledQuantity\": 10,\n      \"pendingReturnQuantity\": 10,\n      \"processingReturnQuantity\": 10,\n      \"rejectedReturnQuantity\": 10,\n      \"returnedQuantity\": 10,\n      \"reshippedQuantity\": 10,\n      \"uom\": \"EA\",\n      \"itemUnitPrice\": 10,\n      \"itemSubTotal\": 600,\n      \"originalItemSubTotal\": 600,\n      \"itemFeeTotal\": 5,\n      \"originalFeeTotal\": 5,\n      \"itemShippingTotal\": 5,\n      \"originalShippingTotal\": 5,\n      \"appeasementTotal\": 5.5,\n      \"itemDiscountsTotal\": 55,\n      \"originalDiscounts\": 55,\n      \"itemTaxTotal\": 5,\n      \"originalTaxTotal\": 555,\n      \"itemTotal\": 555,\n      \"originalItemTotal\": 555,\n      \"outstandingItemTotal\": 555,\n      \"originalOutstandingItemTotal\": 555,\n      \"invoiceTotal\": 555,\n      \"currency\": \"USD\",\n      \"employeeId\": \"5345HJH\",\n      \"associateId\": \"5345HJH\",\n      \"fees\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56,\n          \"invoiceQuantity\": 34,\n          \"refundAmount\": 10.4,\n          \"quantity\": 12\n        }\n      ],\n      \"appeasements\": [\n        {\n          \"appeasementCounter\": 1,\n          \"reasonCode\": \"Incorrect item\",\n          \"subReasonCode\": \"Late shipping\",\n          \"value\": 34.56,\n          \"invoiceValue\": 34.56,\n          \"payments\": [\n            {\n              \"paymentCounter\": 1,\n              \"refundAmount\": 40\n            }\n          ]\n        }\n      ],\n      \"returns\": [\n        {\n          \"shipmentId\": \"12353543\",\n          \"shipmentLineItemId\": \"2412341\",\n          \"shipmentQuantity\": 1,\n          \"refundAmount\": 11.29,\n          \"invoicedAmount\": 11.29,\n          \"returnsCreatedAt\": \"2022-09-14T14:07:36.861Z\"\n        }\n      ],\n      \"taxCode\": \"FR01\",\n      \"taxDetail\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56\n        }\n      ],\n      \"discounts\": [\n        {\n          \"quantity\": 2,\n          \"amount\": 2.4,\n          \"unit\": \"AMOUNT_OFF\",\n          \"value\": 2,\n          \"promoId\": \"HNY2022\",\n          \"promoCode\": \"HNY2022\",\n          \"promoTitle\": \"Happy New Year\",\n          \"type\": \"promotion\",\n          \"invoiceQuantity\": 2,\n          \"returnQuantity\": 2,\n          \"cancelQuantity\": 2\n        }\n      ],\n      \"attributes\": {\n        \"isDonation\": true,\n        \"isGiftCard\": false,\n        \"isFinalSale\": false,\n        \"returnsLink\": true\n      },\n      \"exchangeItem\": true,\n      \"parentLineItemNumber\": 12,\n      \"pendingExchangeQuantity\": 12,\n      \"exchangeQuantity\": 13,\n      \"refundAmount\": 12.4,\n      \"lineOrderStatus\": \"VALID\",\n      \"infiniteConsent\": true,\n      \"notes\": [\n        {\n          \"timestamp\": \"2022-05-12T09:30:31.198Z\",\n          \"user\": \"62272e917b12209e68751d94\",\n          \"notes\": \"Extra information to be provided\"\n        }\n      ],\n      \"gifting\": true\n    }\n  ],\n  \"shipInfo\": [\n    {\n      \"shipToId\": \"5349b4ddd2781d08c09890f4\",\n      \"taxCode\": \"FR01\",\n      \"locationNum\": \"123\",\n      \"pickup\": [\n        {\n          \"name\": {\n            \"first\": \"John\",\n            \"middle\": \"Middle\",\n            \"last\": \"Doe\"\n          },\n          \"email\": \"john123@gmail.com\",\n          \"phone\": {\n            \"number\": \"55555555555\",\n            \"type\": \"MOBILE\"\n          },\n          \"pickupType\": \"Primary\"\n        }\n      ],\n      \"taxDetail\": [\n        {\n          \"type\": \"tax\",\n          \"value\": 34.56\n        }\n      ],\n      \"shipMethod\": \"Express Delivery\",\n      \"shipToType\": \"SHIP_TO_ADDRESS\",\n      \"estimatedShipDate\": \"2022-05-12T09:30:31.198Z\",\n      \"estimatedDeliveryDate\": \"2022-05-12T09:30:31.198Z\",\n      \"shipToPrice\": 20,\n      \"shipToDiscount\": 12.6,\n      \"shipToTaxTotal\": 12.6,\n      \"shipmentInstructions\": \"User instructions\",\n      \"attributes\": {\n        \"isOpenBox\": false,\n        \"isOTPDElivery\": true\n      }\n    }\n  ],\n  \"version\": 123,\n  \"orderId\": \"5349b4ddd2781d08c09890f4\",\n  \"orderDate\": \"2022-05-12T09:30:31.198Z\",\n  \"cancellationDate\": \"2022-05-12T09:30:31.198Z\",\n  \"allocationDate\": \"2022-05-12T09:30:31.198Z\",\n  \"cartId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n  \"type\": \"WEB\",\n  \"subType\": \"International\",\n  \"processName\": \"CANCEL\",\n  \"employeeId\": \"43278\",\n  \"retail\": {\n    \"locationNum\": 123,\n    \"cashierId\": \"C-123\",\n    \"registerId\": \"113\",\n    \"transactionId\": \"R123-431-1133-2129\"\n  },\n  \"orderSubTotal\": 123.45,\n  \"originalSubTotal\": 113.45,\n  \"orderDiscount\": 1.23,\n  \"originalDiscounts\": 1.45,\n  \"feeTotal\": 12.34,\n  \"originalFeeTotal\": 12.34,\n  \"taxTotal\": 12.34,\n  \"appeasementTotal\": 12.34,\n  \"originalTaxTotal\": 12.34,\n  \"returnTotal\": 12.34,\n  \"cancelTotal\": 12.34,\n  \"invoiceTotal\": 12.34,\n  \"orderTotal\": 146.9,\n  \"originalOrderTotal\": 146.9,\n  \"currency\": \"USD\",\n  \"statusDescription\": \"Order Created\",\n  \"attributes\": {\n    \"type\": \"String/Number/JSON\",\n    \"purchaseOrder\": \"String\",\n    \"salesRepId\": \"String\",\n    \"approve\": \"String\",\n    \"fraudCheckSessionId\": \"aee6d1face0e4d55948d1e30b6240048\",\n    \"fraudCheckStatus\": \"UPDATED\",\n    \"fraudCheckTransId\": \"0R12TQ46\",\n    \"fraudScore\": \"31\"\n  },\n  \"fees\": [\n    {\n      \"type\": \"shipping\",\n      \"value\": 34.56,\n      \"invoiceValue\": 34.56\n    }\n  ],\n  \"appeasements\": [\n    {\n      \"appeasementCounter\": 1,\n      \"reasonCode\": \"Incorrect item\",\n      \"subReasonCode\": \"Late shipping\",\n      \"value\": 34.56,\n      \"invoiceValue\": 34.56,\n      \"payments\": [\n        {\n          \"paymentCounter\": 1,\n          \"refundAmount\": 40\n        }\n      ]\n    }\n  ],\n  \"discounts\": [\n    {\n      \"quantity\": 2,\n      \"amount\": 2.4,\n      \"unit\": \"AMOUNT_OFF\",\n      \"value\": 2,\n      \"promoId\": \"HNY2022\",\n      \"promoCode\": \"HNY2022\",\n      \"promoTitle\": \"Happy New Year\",\n      \"type\": \"promotion\",\n      \"invoiceQuantity\": 2,\n      \"returnQuantity\": 2,\n      \"cancelQuantity\": 2\n    }\n  ],\n  \"customer\": {\n    \"name\": {\n      \"first\": \"John\",\n      \"middle\": \"Middle\",\n      \"last\": \"Doe\"\n    },\n    \"email\": \"john@fabric.inc\",\n    \"phone\": {\n      \"number\": \"55555555555\",\n      \"type\": \"MOBILE\"\n    },\n    \"userId\": \"62272e917b12209e68751d94\",\n    \"accountId\": \"62272e917b12209e68751d94\",\n    \"employeeId\": \"62272e917b12209e68751d94\",\n    \"company\": \"fabric\"\n  },\n  \"payments\": [\n    {\n      \"paymentCounter\": 1,\n      \"paymentDate\": \"2022-01-27T16:15:58-05:00\",\n      \"billToId\": \"62272e917b12209e68751d94\",\n      \"paymentIdentifier\": {\n        \"cardIdentifier\": \"3456\",\n        \"expirationYear\": \"2029\",\n        \"expirationMonth\": \"2029\",\n        \"paymentId\": \"62272e917b12209e68751d94\",\n        \"fabricPaymentReference\": \"test\"\n      },\n      \"paymentProvider\": \"stripe\",\n      \"paymentToken\": {\n        \"token\": \"pi_34tr6787rt\",\n        \"paymentType\": \"VISA\"\n      },\n      \"paymentMethod\": \"CREDIT_CARD\",\n      \"authAmount\": 123.2,\n      \"chargedAmount\": 60,\n      \"refundAmount\": 40,\n      \"currency\": \"USD\",\n      \"conversion\": 1,\n      \"paymentStatus\": \"OK\",\n      \"partialCapture\": \"false\",\n      \"finalCapture\": \"false\",\n      \"paymentLog\": \"payment response list\",\n      \"attributes\": {\n        \"expirationMonth\": 12\n      }\n    }\n  ],\n  \"auditLogs\": [\n    {\n      \"auditId\": \"62272e917b12209e68751d94\",\n      \"auditType\": \"<string>\",\n      \"employeeId\": \"62272e917b12209e68751d94\",\n      \"auditTimestamp\": \"2022-05-12T09:24:54.804Z\",\n      \"source\": \"POS\",\n      \"reasonCode\": \"POS\",\n      \"subReasonCode\": \"POS\",\n      \"policyCode\": \"POS\",\n      \"note\": \"Note\",\n      \"lineItemId\": \"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569\",\n      \"lineItemNumber\": 1,\n      \"sku\": \"F5F\",\n      \"quantity\": 1,\n      \"amount\": 2.4,\n      \"paymentToken\": {\n        \"token\": \"pi_34tr6787rt\",\n        \"paymentType\": \"VISA\"\n      },\n      \"success\": true,\n      \"paymentResponse\": {},\n      \"updatedFields\": [\n        {\n          \"fieldName\": \"UOM\",\n          \"fieldOriginalValue\": \"PK\"\n        }\n      ],\n      \"attributes\": {}\n    }\n  ],\n  \"notes\": [\n    {\n      \"timestamp\": \"2022-05-12T09:30:31.198Z\",\n      \"user\": \"62272e917b12209e68751d94\",\n      \"notes\": \"Extra information to be provided\"\n    }\n  ],\n  \"orderReleaseTimestamp\": \"2023-11-07T05:31:56Z\",\n  \"createdAt\": \"2023-11-07T05:31:56Z\",\n  \"updatedAt\": \"2023-11-07T05:31:56Z\"\n}"

response = http.request(request)
puts response.read_body

200

400

404

500

{
  "orderNumber": "309019176",
  "channelId": "12",
  "statusCode": "ORDER_CREATED",
  "items": [\
    {\
      "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "lineItemNumber": 1,\
      "itemId": "1234",\
      "sku": "P1234",\
      "shipToId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "channelId": "WHBM",\
      "segment": "P1234",\
      "vendorId": "P1234",\
      "title": "Item",\
      "type": "WEB_SHIP",\
      "subType": "Borderfree",\
      "backorder": true,\
      "orderedQuantity": 60,\
      "backOrderedQuantity": 10,\
      "pendingShippedQuantity": 10,\
      "pendingShippedBackOrderQuantity": 10,\
      "shippedQuantity": 10,\
      "deliveredQuantity": 10,\
      "invoiceQuantity": 10,\
      "cancelledQuantity": 10,\
      "pendingReturnQuantity": 10,\
      "processingReturnQuantity": 10,\
      "rejectedReturnQuantity": 10,\
      "returnedQuantity": 10,\
      "reshippedQuantity": 10,\
      "uom": "EA",\
      "itemUnitPrice": 10,\
      "itemSubTotal": 600,\
      "originalItemSubTotal": 600,\
      "itemFeeTotal": 5,\
      "originalFeeTotal": 5,\
      "itemShippingTotal": 5,\
      "originalShippingTotal": 5,\
      "appeasementTotal": 5.5,\
      "itemDiscountsTotal": 55,\
      "originalDiscounts": 55,\
      "itemTaxTotal": 5,\
      "originalTaxTotal": 555,\
      "itemTotal": 555,\
      "originalItemTotal": 555,\
      "outstandingItemTotal": 555,\
      "originalOutstandingItemTotal": 555,\
      "invoiceTotal": 555,\
      "currency": "USD",\
      "employeeId": "5345HJH",\
      "associateId": "5345HJH",\
      "fees": [\
        {\
          "type": "tax",\
          "value": 34.56,\
          "invoiceQuantity": 34,\
          "refundAmount": 10.4,\
          "quantity": 12\
        }\
      ],\
      "appeasements": [\
        {\
          "appeasementCounter": 1,\
          "reasonCode": "Incorrect item",\
          "subReasonCode": "Late shipping",\
          "value": 34.56,\
          "invoiceValue": 34.56,\
          "payments": [\
            {\
              "paymentCounter": 1,\
              "refundAmount": 40\
            }\
          ]\
        }\
      ],\
      "returns": [\
        {\
          "shipmentId": "12353543",\
          "shipmentLineItemId": "2412341",\
          "shipmentQuantity": 1,\
          "refundAmount": 11.29,\
          "invoicedAmount": 11.29,\
          "returnsCreatedAt": "2022-09-14T14:07:36.861Z"\
        }\
      ],\
      "taxCode": "FR01",\
      "taxDetail": [\
        {\
          "type": "tax",\
          "value": 34.56\
        }\
      ],\
      "discounts": [\
        {\
          "quantity": 2,\
          "amount": 2.4,\
          "unit": "AMOUNT_OFF",\
          "value": 2,\
          "promoId": "HNY2022",\
          "promoCode": "HNY2022",\
          "promoTitle": "Happy New Year",\
          "type": "promotion",\
          "invoiceQuantity": 2,\
          "returnQuantity": 2,\
          "cancelQuantity": 2\
        }\
      ],\
      "attributes": {\
        "isDonation": true,\
        "isGiftCard": false,\
        "isFinalSale": false,\
        "returnsLink": true\
      },\
      "exchangeItem": true,\
      "parentLineItemNumber": 12,\
      "pendingExchangeQuantity": 12,\
      "exchangeQuantity": 13,\
      "refundAmount": 12.4,\
      "lineOrderStatus": "VALID",\
      "infiniteConsent": true,\
      "notes": [\
        {\
          "timestamp": "2022-05-12T09:30:31.198Z",\
          "user": "62272e917b12209e68751d94",\
          "notes": "Extra information to be provided"\
        }\
      ],\
      "gifting": true\
    }\
  ],
  "shipInfo": [\
    {\
      "shipToId": "5349b4ddd2781d08c09890f4",\
      "taxCode": "FR01",\
      "locationNum": "123",\
      "pickup": [\
        {\
          "name": {\
            "first": "John",\
            "middle": "Middle",\
            "last": "Doe"\
          },\
          "email": "john123@gmail.com",\
          "phone": {\
            "number": "55555555555",\
            "type": "MOBILE"\
          },\
          "pickupType": "Primary"\
        }\
      ],\
      "shipToAddress": {\
        "address1": "First line of address",\
        "name": {\
          "first": "John",\
          "middle": "Middle",\
          "last": "Doe"\
        },\
        "email": "john123@gmail.com",\
        "phone": {\
          "number": "55555555555",\
          "type": "MOBILE"\
        },\
        "address2": "123 Parking Lot",\
        "address3": "Third line of address",\
        "address4": "Fourth line of address",\
        "city": "Beaumont",\
        "state": "TX",\
        "country": "USA",\
        "postalCode": "77705",\
        "type": "residence",\
        "latitude": 35.294952,\
        "longitude": 32.294952\
      },\
      "taxDetail": [\
        {\
          "type": "tax",\
          "value": 34.56\
        }\
      ],\
      "shipMethod": "Express Delivery",\
      "shipToType": "SHIP_TO_ADDRESS",\
      "estimatedShipDate": "2022-05-12T09:30:31.198Z",\
      "estimatedDeliveryDate": "2022-05-12T09:30:31.198Z",\
      "shipToPrice": 20,\
      "shipToDiscount": 12.6,\
      "shipToTaxTotal": 12.6,\
      "shipmentInstructions": "User instructions",\
      "attributes": {\
        "isOpenBox": false,\
        "isOTPDElivery": true\
      }\
    }\
  ],
  "version": 123,
  "orderId": "5349b4ddd2781d08c09890f4",
  "orderDate": "2022-05-12T09:30:31.198Z",
  "cancellationDate": "2022-05-12T09:30:31.198Z",
  "allocationDate": "2022-05-12T09:30:31.198Z",
  "cartId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
  "type": "WEB",
  "subType": "International",
  "processName": "CANCEL",
  "employeeId": "43278",
  "retail": {
    "locationNum": 123,
    "cashierId": "C-123",
    "registerId": "113",
    "transactionId": "R123-431-1133-2129"
  },
  "orderSubTotal": 123.45,
  "originalSubTotal": 113.45,
  "orderDiscount": 1.23,
  "originalDiscounts": 1.45,
  "feeTotal": 12.34,
  "originalFeeTotal": 12.34,
  "taxTotal": 12.34,
  "appeasementTotal": 12.34,
  "originalTaxTotal": 12.34,
  "returnTotal": 12.34,
  "cancelTotal": 12.34,
  "invoiceTotal": 12.34,
  "orderTotal": 146.9,
  "originalOrderTotal": 146.9,
  "currency": "USD",
  "statusDescription": "Order Created",
  "attributes": {
    "type": "String/Number/JSON",
    "purchaseOrder": "String",
    "salesRepId": "String",
    "approve": "String",
    "fraudCheckSessionId": "aee6d1face0e4d55948d1e30b6240048",
    "fraudCheckStatus": "UPDATED",
    "fraudCheckTransId": "0R12TQ46",
    "fraudScore": "31"
  },
  "fees": [\
    {\
      "type": "shipping",\
      "value": 34.56,\
      "invoiceValue": 34.56\
    }\
  ],
  "appeasements": [\
    {\
      "appeasementCounter": 1,\
      "reasonCode": "Incorrect item",\
      "subReasonCode": "Late shipping",\
      "value": 34.56,\
      "invoiceValue": 34.56,\
      "payments": [\
        {\
          "paymentCounter": 1,\
          "refundAmount": 40\
        }\
      ]\
    }\
  ],
  "discounts": [\
    {\
      "quantity": 2,\
      "amount": 2.4,\
      "unit": "AMOUNT_OFF",\
      "value": 2,\
      "promoId": "HNY2022",\
      "promoCode": "HNY2022",\
      "promoTitle": "Happy New Year",\
      "type": "promotion",\
      "invoiceQuantity": 2,\
      "returnQuantity": 2,\
      "cancelQuantity": 2\
    }\
  ],
  "customer": {
    "name": {
      "first": "John",
      "middle": "Middle",
      "last": "Doe"
    },
    "email": "john@fabric.inc",
    "phone": {
      "number": "55555555555",
      "type": "MOBILE"
    },
    "userId": "62272e917b12209e68751d94",
    "accountId": "62272e917b12209e68751d94",
    "employeeId": "62272e917b12209e68751d94",
    "company": "fabric"
  },
  "payments": [\
    {\
      "paymentCounter": 1,\
      "paymentDate": "2022-01-27T16:15:58-05:00",\
      "billToId": "62272e917b12209e68751d94",\
      "paymentIdentifier": {\
        "cardIdentifier": "3456",\
        "expirationYear": "2029",\
        "expirationMonth": "2029",\
        "paymentId": "62272e917b12209e68751d94",\
        "fabricPaymentReference": "test"\
      },\
      "paymentProvider": "stripe",\
      "paymentToken": {\
        "token": "pi_34tr6787rt",\
        "paymentType": "VISA"\
      },\
      "paymentMethod": "CREDIT_CARD",\
      "authAmount": 123.2,\
      "chargedAmount": 60,\
      "refundAmount": 40,\
      "currency": "USD",\
      "conversion": 1,\
      "paymentStatus": "OK",\
      "partialCapture": "false",\
      "finalCapture": "false",\
      "paymentLog": "payment response list",\
      "billToAddress": {\
        "address1": "First line of address",\
        "name": {\
          "first": "John",\
          "middle": "Middle",\
          "last": "Doe"\
        },\
        "email": "john123@gmail.com",\
        "phone": {\
          "number": "55555555555",\
          "type": "MOBILE"\
        },\
        "address2": "123 Parking Lot",\
        "address3": "Third line of address",\
        "address4": "Fourth line of address",\
        "city": "Beaumont",\
        "state": "TX",\
        "country": "USA",\
        "postalCode": "77705",\
        "type": "residence",\
        "latitude": 35.294952,\
        "longitude": 32.294952\
      },\
      "attributes": {\
        "expirationMonth": 12\
      }\
    }\
  ],
  "auditLogs": [\
    {\
      "auditId": "62272e917b12209e68751d94",\
      "auditType": "<string>",\
      "employeeId": "62272e917b12209e68751d94",\
      "auditTimestamp": "2022-05-12T09:24:54.804Z",\
      "source": "POS",\
      "reasonCode": "POS",\
      "subReasonCode": "POS",\
      "policyCode": "POS",\
      "note": "Note",\
      "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",\
      "lineItemNumber": 1,\
      "sku": "F5F",\
      "quantity": 1,\
      "amount": 2.4,\
      "paymentToken": {\
        "token": "pi_34tr6787rt",\
        "paymentType": "VISA"\
      },\
      "success": true,\
      "paymentResponse": {},\
      "updatedFields": [\
        {\
          "fieldName": "UOM",\
          "fieldOriginalValue": "PK"\
        }\
      ],\
      "attributes": {}\
    }\
  ],
  "notes": [\
    {\
      "timestamp": "2022-05-12T09:30:31.198Z",\
      "user": "62272e917b12209e68751d94",\
      "notes": "Extra information to be provided"\
    }\
  ],
  "orderReleaseTimestamp": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
{
  "message": "Bad request"
}
{
  "message": "Order not found"
}
{
  "message": "Internal server error"
}

PUT

/

order

/

{orderNumber}

Try it

Update an order

cURL

import requests

url = "https://prod01.oms.fabric.inc/api/v2/order/{orderNumber}"

response = requests.put(url, json=payload, headers=headers)

print(response.text)
<?php

$curl = curl_init();

$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://prod01.oms.fabric.inc/api/v2/order/{orderNumber}"

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("x-site-context", "<x-site-context>")
    req.Header.Add("Authorization", "Bearer <token>")
    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))

}
require 'uri'
require 'net/http'

url = URI("https://prod01.oms.fabric.inc/api/v2/order/{orderNumber}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

response = http.request(request)
puts response.read_body

200

400

404

500

{
  "message": "Bad request"
}
{
  "message": "Order not found"
}
{
  "message": "Internal server error"
}

Authorizations

Authorization

string

header

required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-site-context

string

required

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Example:

"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"

Path Parameters

orderNumber

string

required

Example:

309019176

Body

application/json

Order response body

orderNumber

string

required

Unique order number

Example:

"309019176"

channelId

string

required

Sales channel ID

Example:

"12"

statusCode

string

required

Example:

"ORDER_CREATED"

items

object[]

required

Required array length: 1 - 2147483647 elements

Showchild attributes

shipInfo

object[]

required

Required array length: 1 - 2147483647 elements

Showchild attributes

version

integer

Number of updates happened to the order. Order-update refers to replacement, appeasement added, address change or any other order related update to the particular order.

orderId

string

Auto generated ID once the order created successfully

Example:

"5349b4ddd2781d08c09890f4"

orderDate

string

Actual order creation date

Example:

"2022-05-12T09:30:31.198Z"

cancellationDate

string

Order cancellation date if any

Example:

"2022-05-12T09:30:31.198Z"

allocationDate

string

Order allocation date after order is created

Example:

"2022-05-12T09:30:31.198Z"

cartId

string

ID of the cart where order is placed

Example:

"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569"

type

enum

Platfrom using which order is created

Available options:

WEB,

CSC,

MOBILE_APP,

POS

Example:

"WEB"

subType

enum

Operating system of the platfom as mentioned in the type field. If you want to configure any custom valuefor this field, contact fabric.

Available options:

IOS,

Android,

International

Example:

"International"

processName

string

Order process name

Example:

"CANCEL"

employeeId

string

Employee ID used when an employee places an order on behave of the customer.

Example:

"43278"

retail

object

Order retail object for reatil transactions. For non-retail transactions, only location number is provided.

Showchild attributes

orderSubTotal

number

Order value after calculating discounts and any applicable fees

Example:

123.45

originalSubTotal

number

Original order total value

Example:

113.45

orderDiscount

number

Final discount value on order amount

Example:

1.23

originalDiscounts

number

Original discount on order value

Example:

1.45

feeTotal

number

Total fees, if any, applicable on order amount

Example:

12.34

originalFeeTotal

number

Original fees appliable on shipping of items

Example:

12.34

taxTotal

number

Total tax amount appliable on shipping of items

Example:

12.34

appeasementTotal

number

Appeasement amount, if any, processed on the order

Example:

12.34

originalTaxTotal

number

Original tax amount on order during fist time order creation

Example:

12.34

returnTotal

number

Return amount incase of order return

Example:

12.34

cancelTotal

number

Cancel amount incase of order cancellation

Example:

12.34

invoiceTotal

number

Invoice value on order

Example:

12.34

orderTotal

number

Total order amount after calculating fees, discounts, retrurn and cancellation if any

Example:

146.9

originalOrderTotal

number

Order amount during first time order creation after calculating all fees, taxes, and discounts

Example:

146.9

currency

string

Example:

"USD"

statusDescription

string

Example:

"Order Created"

attributes

object

Showchild attributes

Example:

{
  "type": "String/Number/JSON",
  "purchaseOrder": "String",
  "salesRepId": "String",
  "approve": "String",
  "fraudCheckSessionId": "aee6d1face0e4d55948d1e30b6240048",
  "fraudCheckStatus": "UPDATED",
  "fraudCheckTransId": "0R12TQ46",
  "fraudScore": "31"
}

fees

object[]

Showchild attributes

appeasements

object[]

Array of appeasements, if any

Showchild attributes

discounts

object[]

Showchild attributes

customer

object

Order customer model

Showchild attributes

payments

object[]

Showchild attributes

auditLogs

object[]

Showchild attributes

notes

object[]

Showchild attributes

orderReleaseTimestamp

string

Order dispatched date and time

createdAt

string

Date and time when the original order is modified for the first time, for example for return, cancellation or replacement

updatedAt

string

Date and time when the exisiting order is updated

Response

200

application/json

Order object Updated

Order response body

orderNumber

string

required

Unique order number

Example:

"309019176"

channelId

string

required

Sales channel ID

Example:

"12"

statusCode

string

required

Example:

"ORDER_CREATED"

items

object[]

required

Required array length: 1 - 2147483647 elements

Showchild attributes

shipInfo

object[]

required

Required array length: 1 - 2147483647 elements

Showchild attributes

version

integer

orderId

string

Auto generated ID once the order created successfully

Example:

"5349b4ddd2781d08c09890f4"

orderDate

string

Actual order creation date

Example:

"2022-05-12T09:30:31.198Z"

cancellationDate

string

Order cancellation date if any

Example:

"2022-05-12T09:30:31.198Z"

allocationDate

string

Order allocation date after order is created

Example:

"2022-05-12T09:30:31.198Z"

cartId

string

ID of the cart where order is placed

Example:

"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569"

type

enum

Platfrom using which order is created

Available options:

WEB,

CSC,

MOBILE_APP,

POS

Example:

"WEB"

subType

enum

Operating system of the platfom as mentioned in the type field. If you want to configure any custom valuefor this field, contact fabric.

Available options:

IOS,

Android,

International

Example:

"International"

processName

string

Order process name

Example:

"CANCEL"

employeeId

string

Employee ID used when an employee places an order on behave of the customer.

Example:

"43278"

retail

object

Order retail object for reatil transactions. For non-retail transactions, only location number is provided.

Showchild attributes

orderSubTotal

number

Order value after calculating discounts and any applicable fees

Example:

123.45

originalSubTotal

number

Original order total value

Example:

113.45

orderDiscount

number

Final discount value on order amount

Example:

1.23

originalDiscounts

number

Original discount on order value

Example:

1.45

feeTotal

number

Total fees, if any, applicable on order amount

Example:

12.34

originalFeeTotal

number

Original fees appliable on shipping of items

Example:

12.34

taxTotal

number

Total tax amount appliable on shipping of items

Example:

12.34

appeasementTotal

number

Appeasement amount, if any, processed on the order

Example:

12.34

originalTaxTotal

number

Original tax amount on order during fist time order creation

Example:

12.34

returnTotal

number

Return amount incase of order return

Example:

12.34

cancelTotal

number

Cancel amount incase of order cancellation

Example:

12.34

invoiceTotal

number

Invoice value on order

Example:

12.34

orderTotal

number

Total order amount after calculating fees, discounts, retrurn and cancellation if any

Example:

146.9

originalOrderTotal

number

Order amount during first time order creation after calculating all fees, taxes, and discounts

Example:

146.9

currency

string

Example:

"USD"

statusDescription

string

Example:

"Order Created"

attributes

object

Showchild attributes

Example:

fees

object[]

Showchild attributes

appeasements

object[]

Array of appeasements, if any

Showchild attributes

discounts

object[]

Showchild attributes

customer

object

Order customer model

Showchild attributes

payments

object[]

Showchild attributes

auditLogs

object[]

Showchild attributes

notes

object[]

Showchild attributes

orderReleaseTimestamp

string

Order dispatched date and time

createdAt

string

Date and time when the original order is modified for the first time, for example for return, cancellation or replacement

updatedAt

string

Date and time when the exisiting order is updated

Was this page helpful?

YesNo

Get an order Get orders by query

Ctrl+I

Assistant

Responses are generated using AI and may contain mistakes.