PUT
/
invoices
/
{invoiceId}
Update invoice by ID
curl --request PUT \
  --url https://api.fabric.inc/v3/invoices/{invoiceId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-fabric-channel-id: <x-fabric-channel-id>' \
  --header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
  --data '{
  "invoiceId": "62ff5c0bec0aed3c86202c32",
  "invoiceNumber": "23940791",
  "invoiceExternalId": "191763090",
  "version": 2,
  "invoiceStatus": "CAPTURED",
  "invoiceType": "SHIPPING",
  "invoicedAt": "2022-08-01T20:03:28.483Z",
  "shipmentId": "62ff5c0bec0aed3c86202c32",
  "shipmentNumber": "217088603",
  "shippedAt": "2022-08-01T20:03:28.483Z",
  "orders": [
    {
      "adjustments": [
        {
          "adjustmentCounter": 1,
          "attributes": {},
          "notes": "Any additional info",
          "quantity": 1,
          "reasonCode": "Incorrect Item",
          "subReasonCode": "Late shipping",
          "value": 34.56
        }
      ],
      "appeasements": [
        {
          "amount": 34.56,
          "appeasementCounter": 1,
          "invoicedAmount": 34.56,
          "payments": [
            {
              "paymentCounter": "<any>",
              "refundAmount": "<any>"
            }
          ],
          "reasonCode": "Incorrect Item",
          "subReasonCode": "Late shipping"
        }
      ],
      "discounts": [
        {
          "amount": 2,
          "promotionCode": "HNY2022",
          "promotionId": "HNY2022",
          "promotionName": "Happy New Year",
          "quantity": 2,
          "type": "promotion"
        }
      ],
      "fees": [
        {
          "amount": 34.56,
          "quantity": 1,
          "refundAmount": 345.56,
          "type": "tax"
        }
      ],
      "invoiceOrderTotal": 245.7,
      "items": [
        {
          "adjustmentTotal": 123.45,
          "adjustments": [
            {
              "adjustmentCounter": 1,
              "attributes": {},
              "notes": "Any additional info",
              "quantity": 1,
              "reasonCode": "Incorrect Item",
              "subReasonCode": "Late shipping",
              "value": 34.56
            }
          ],
          "appeasements": [
            {
              "amount": 34.56,
              "appeasementCounter": 1,
              "invoicedAmount": 34.56,
              "payments": [
                {
                  "paymentCounter": "<any>",
                  "refundAmount": "<any>"
                }
              ],
              "reasonCode": "Incorrect Item",
              "subReasonCode": "Late shipping"
            }
          ],
          "currency": "USD",
          "discounts": [
            {
              "amount": 2,
              "promotionCode": "HNY2022",
              "promotionId": "HNY2022",
              "promotionName": "Happy New Year",
              "quantity": 2,
              "type": "promotion"
            }
          ],
          "fees": [
            {
              "amount": 34.56,
              "quantity": 1,
              "refundAmount": 345.56,
              "type": "tax"
            }
          ],
          "invoiceLineNumber": 3,
          "invoiceLineTotal": 600,
          "invoiceQuantity": 10,
          "itemAppeasementTotal": 344.455,
          "itemDiscountsTotal": 3.45,
          "itemFeeTotal": 33.4,
          "itemId": 1234455322,
          "itemTaxTotal": 2.4,
          "itemUnitPrice": 33.4,
          "lineItemCreatedAt": "2022-11-22T10:26:38Z",
          "lineItemId": "1adfrghhh2346aaaf",
          "lineItemNumber": 1,
          "locationStoreId": "4512345",
          "orderId": "33adfrghhh2346aaaffff",
          "returnExpirationDays": "21",
          "returns": [
            {
              "exchangeLineItemId": "62f3dfc438bcab1951be0a19",
              "fees": [
                {
                  "amount": 34.56,
                  "name": "RETURN_FEE",
                  "reason": "Return fee",
                  "type": "FEE"
                }
              ],
              "invoicedAmount": 11.29,
              "isExchangeItemReturned": true,
              "reasonCode": "Incorrect item",
              "refundAmount": 11.29,
              "refunds": [
                {
                  "amount": 34.56,
                  "name": "RETURN_FEE",
                  "reason": "Return fee",
                  "type": "FEE"
                }
              ],
              "returnRequestCounter": 1,
              "returnsReceivedAt": "2022-09-14T14:07:36.861Z",
              "shipmentId": "62b37697c67b204dd18a7465",
              "shipmentInvoice": {
                "invoiceId": "62ff5c0bec0aed3c86202c32",
                "invoiceNumber": "23940791",
                "invoicedAt": "2022-08-01T20:03:28.483971941Z"
              },
              "shipmentLineItemId": "234",
              "shipmentQuantity": 1
            }
          ],
          "shipToId": "5349b4ddd2781d08c09890f4",
          "shipmentLineItemId": "2adfrghhh2346aaaffff",
          "sku": "P1234",
          "taxDetails": [
            {
              "amount": 34.56,
              "type": "tax"
            }
          ],
          "type": "WEB_PICKUP",
          "uom": "EA"
        }
      ],
      "orderId": "62ff5c0bec0aed3c86202c32",
      "orderNumber": "217088603",
      "orderExternalId": 217088603,
      "orderSubtype": "INTERNATIONAL",
      "orderType": "WEB",
      "orderedAt": "2022-05-12T09:30:31.198Z",
      "payments": [
        {
          "attributes": {},
          "authorizedAmount": 256.1,
          "billToAddress": {
            "addressLine1": "123 Main St.",
            "addressLine2": "Suite 100",
            "addressLine3": "Seventh floor",
            "addressLine4": "Attention: Pat E. Kake",
            "city": "Seattle",
            "countryCode": "US",
            "email": "test@example.com",
            "latitude": 47.6205,
            "longitude": -122.3493,
            "name": {
              "firstName": "Alex",
              "lastName": "Doe",
              "middleName": "E"
            },
            "phone": {
              "number": "123-456-7890",
              "type": "MOBILE"
            },
            "postalCode": "98121",
            "region": "WA",
            "type": "Home"
          },
          "conversion": 1,
          "currency": "USD",
          "paidAt": "2022-01-27T16:15:58.000-05:00",
          "paymentCounter": 1,
          "paymentIdentifier": {
            "cardIdentifier": "***********3456"
          },
          "paymentMethod": "CREDIT_CARD",
          "paymentProvider": "stripe",
          "paymentStatus": "PAID",
          "paymentToken": {
            "token": "pi_34tr6787rt"
          },
          "paymentType": "VISA",
          "settlement": {
            "settledAt": "2022-01-27T21:15:58Z",
            "settlementAmount": 10.3,
            "settlementStatusCode": "SETTLED"
          }
        }
      ],
      "returns": [
        {
          "fees": [
            {
              "amount": 34.56,
              "name": "RETURN_FEE",
              "reason": "Return fee",
              "type": "FEE"
            }
          ],
          "invoicedAmount": 11.29,
          "paymentCounterRefundDetails": [
            {
              "amount": 34.56,
              "paymentCounter": 1
            }
          ],
          "refunds": [
            {
              "amount": 34.56,
              "name": "RETURN_FEE",
              "reason": "Return fee",
              "type": "FEE"
            }
          ],
          "returnCounter": 1,
          "totalRefundAmount": 11.29
        }
      ],
      "taxDetails": [
        {
          "amount": 34.56,
          "type": "tax"
        }
      ]
    }
  ],
  "locationNumber": "3235",
  "location": {
    "address": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Suite 100",
      "addressLine3": "Seventh floor",
      "addressLine4": "Attention: Pat E. Kake",
      "city": "Seattle",
      "contacts": [
        {
          "email": "test@example.com",
          "name": {
            "firstName": "Alex",
            "lastName": "Doe",
            "middleName": "E"
          },
          "phone": {
            "number": "123-456-7890",
            "type": "MOBILE"
          }
        }
      ],
      "countryCode": "US",
      "email": "test@example.com",
      "latitude": 47.6205,
      "longitude": -122.3493,
      "name": {
        "firstName": "Alex",
        "lastName": "Doe",
        "middleName": "E"
      },
      "phone": {
        "number": "123-456-7890",
        "type": "MOBILE"
      },
      "postalCode": "98121",
      "region": "WA",
      "type": "Home"
    },
    "locationNumber": "WH334"
  },
  "retail": {
    "cashierId": "CE-321",
    "locationNumber": "WH334"
  },
  "createdAt": "2022-08-01T20:03:28.483Z",
  "updatedAt": "2022-08-01T20:03:28.483971941Z",
  "postedAt": "2022-08-01T20:03:28.483971941Z",
  "acknowledgedAt": "2022-08-01T20:03:28.483Z",
  "statusCode": "CREATED",
  "channelId": "10",
  "invoiceTotal": 245.7,
  "totalTaxAmount": 19.57,
  "currency": "USD",
  "customer": {
    "accountId": "62272e917b12209e68751d94",
    "address": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Suite 100",
      "addressLine3": "Seventh floor",
      "addressLine4": "Attention: Pat E. Kake",
      "city": "Seattle",
      "countryCode": "US",
      "email": "test@example.com",
      "latitude": 47.6205,
      "longitude": -122.3493,
      "name": {
        "firstName": "Alex",
        "lastName": "Doe",
        "middleName": "E"
      },
      "phone": {
        "number": "123-456-7890",
        "type": "MOBILE"
      },
      "postalCode": "98121",
      "region": "WA",
      "type": "Home"
    },
    "company": "Demo Inc",
    "email": "test@example.com",
    "employeeId": "62272e917b12209e68751d94",
    "name": {
      "firstName": "Alex",
      "lastName": "Doe",
      "middleName": "E"
    },
    "phone": {
      "number": "123-456-7890",
      "type": "MOBILE"
    },
    "userId": "62272e917b12209e68751d94"
  },
  "shipInfo": {
    "discounts": [
      {
        "amount": 2.99,
        "promotionCode": "SHIPFREE",
        "promotionId": "SHIPFREE",
        "promotionName": "Free Shipping",
        "quantity": 1,
        "unit": "AMOUNT_OFF",
        "value": 10
      }
    ],
    "estimatedDeliveryDate": "2022-05-12T09:30:31.198Z",
    "estimatedShipDate": "2022-05-12T09:30:31.198Z",
    "isInvoiced": true,
    "locationNumber": "WH334",
    "pickups": [
      {
        "email": "test@example.com",
        "name": {
          "firstName": "Alex",
          "lastName": "Doe",
          "middleName": "E"
        },
        "phone": {
          "number": "123-456-7890",
          "type": "MOBILE"
        },
        "pickupType": "PRIMARY"
      }
    ],
    "shipMethod": "Parcel post delivery",
    "shipToAddress": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Suite 100",
      "addressLine3": "Seventh floor",
      "addressLine4": "Attention: Pat E. Kake",
      "city": "Seattle",
      "countryCode": "US",
      "email": "test@example.com",
      "latitude": 47.6205,
      "longitude": -122.3493,
      "name": {
        "firstName": "Alex",
        "lastName": "Doe",
        "middleName": "E"
      },
      "phone": {
        "number": "123-456-7890",
        "type": "MOBILE"
      },
      "postalCode": "98121",
      "region": "WA",
      "type": "Home"
    },
    "shipToDiscount": 12.6,
    "shipToId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
    "shipToPrice": 20,
    "shipToTaxTotal": 12.6,
    "shipToType": "SHIP_TO_ADDRESS",
    "shipToUnitPrice": 20,
    "shipmentInstructions": "Handle with care",
    "taxCode": "FR01",
    "taxDetails": [
      {
        "amount": 34.56,
        "attributes": {},
        "currency": "USD",
        "name": "STATE",
        "rate": 10,
        "rateType": "PERCENTAGE",
        "taxCode": "FR01"
      }
    ]
  },
  "attributes": {
    "attribute1": "value"
  }
}'
{
  "acknowledgedAt": "2022-08-01T20:03:28.483Z",
  "auditLogs": [
    {
      "amount": 2.4,
      "auditId": "a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111",
      "auditType": "CANCEL",
      "auditedAt": "2023-03-12T09:24:54.804Z",
      "employeeId": "6227",
      "isSuccess": true,
      "lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
      "lineItemNumber": 1,
      "note": "Note",
      "paymentToken": {
        "paymentType": "VISA",
        "token": "pi_34tr6787rt"
      },
      "policyCode": "POS",
      "quantity": 1,
      "reasonCode": "Scratched item",
      "sku": "SKU0023",
      "source": "POS",
      "subReasonCode": "Scratched item",
      "updatedFields": [
        {
          "fieldName": "UOM",
          "fieldOriginalValue": "PK"
        }
      ]
    }
  ],
  "channelId": "10",
  "createdAt": "2022-08-01T20:03:28.483Z",
  "currency": "USD",
  "customer": {
    "accountId": "62272e917b12209e68751d94",
    "address": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Suite 100",
      "addressLine3": "Seventh floor",
      "addressLine4": "Attention: Pat E. Kake",
      "city": "Seattle",
      "countryCode": "US",
      "email": "test@example.com",
      "latitude": 47.6205,
      "longitude": -122.3493,
      "name": {
        "firstName": "Alex",
        "lastName": "Doe",
        "middleName": "E"
      },
      "phone": {
        "number": "123-456-7890",
        "type": "MOBILE"
      },
      "postalCode": "98121",
      "region": "WA",
      "type": "Home"
    },
    "company": "Demo Inc",
    "email": "test@example.com",
    "employeeId": "62272e917b12209e68751d94",
    "name": {
      "firstName": "Alex",
      "lastName": "Doe",
      "middleName": "E"
    },
    "phone": {
      "number": "123-456-7890",
      "type": "MOBILE"
    },
    "userId": "62272e917b12209e68751d94"
  },
  "invoiceId": "62ff5c0bec0aed3c86202c32",
  "invoiceExternalId": "191763090",
  "invoiceNumber": "23940791",
  "invoiceStatus": "CAPTURED",
  "invoiceTotal": 245.7,
  "invoiceType": "SHIPPING",
  "invoicedAt": "2022-08-01T20:03:28.483Z",
  "location": {
    "address": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Suite 100",
      "addressLine3": "Seventh floor",
      "addressLine4": "Attention: Pat E. Kake",
      "city": "Seattle",
      "contacts": [
        {
          "email": "test@example.com",
          "name": {
            "firstName": "Alex",
            "lastName": "Doe",
            "middleName": "E"
          },
          "phone": {
            "number": "123-456-7890",
            "type": "MOBILE"
          }
        }
      ],
      "countryCode": "US",
      "email": "test@example.com",
      "latitude": 47.6205,
      "longitude": -122.3493,
      "name": {
        "firstName": "Alex",
        "lastName": "Doe",
        "middleName": "E"
      },
      "phone": {
        "number": "123-456-7890",
        "type": "MOBILE"
      },
      "postalCode": "98121",
      "region": "WA",
      "type": "Home"
    },
    "locationNumber": "WH334"
  },
  "locationNumber": "WH334",
  "orders": [
    {
      "adjustments": [
        {
          "adjustmentCounter": 1,
          "attributes": {},
          "notes": "Any additional info",
          "quantity": 1,
          "reasonCode": "Incorrect Item",
          "subReasonCode": "Late shipping",
          "value": 34.56
        }
      ],
      "appeasements": [
        {
          "amount": 34.56,
          "appeasementCounter": 1,
          "invoicedAmount": 34.56,
          "payments": [
            {
              "paymentCounter": "<any>",
              "refundAmount": "<any>"
            }
          ],
          "reasonCode": "Incorrect Item",
          "subReasonCode": "Late shipping"
        }
      ],
      "discounts": [
        {
          "amount": 2,
          "promotionCode": "HNY2022",
          "promotionId": "HNY2022",
          "promotionName": "Happy New Year",
          "quantity": 2,
          "type": "promotion"
        }
      ],
      "fees": [
        {
          "amount": 34.56,
          "quantity": 1,
          "refundAmount": 345.56,
          "type": "tax"
        }
      ],
      "invoiceOrderTotal": 245.7,
      "items": [
        {
          "adjustmentTotal": 123.45,
          "adjustments": [
            {
              "adjustmentCounter": 1,
              "attributes": {},
              "notes": "Any additional info",
              "quantity": 1,
              "reasonCode": "Incorrect Item",
              "subReasonCode": "Late shipping",
              "value": 34.56
            }
          ],
          "appeasements": [
            {
              "amount": 34.56,
              "appeasementCounter": 1,
              "invoicedAmount": 34.56,
              "payments": [
                {
                  "paymentCounter": "<any>",
                  "refundAmount": "<any>"
                }
              ],
              "reasonCode": "Incorrect Item",
              "subReasonCode": "Late shipping"
            }
          ],
          "currency": "USD",
          "discounts": [
            {
              "amount": 2,
              "promotionCode": "HNY2022",
              "promotionId": "HNY2022",
              "promotionName": "Happy New Year",
              "quantity": 2,
              "type": "promotion"
            }
          ],
          "fees": [
            {
              "amount": 34.56,
              "quantity": 1,
              "refundAmount": 345.56,
              "type": "tax"
            }
          ],
          "invoiceLineNumber": 3,
          "invoiceLineTotal": 600,
          "invoiceQuantity": 10,
          "itemAppeasementTotal": 344.455,
          "itemDiscountsTotal": 3.45,
          "itemFeeTotal": 33.4,
          "itemId": 1234455322,
          "itemTaxTotal": 2.4,
          "itemUnitPrice": 33.4,
          "lineItemCreatedAt": "2022-11-22T10:26:38Z",
          "lineItemId": "1adfrghhh2346aaaf",
          "lineItemNumber": 1,
          "locationStoreId": "4512345",
          "orderId": "33adfrghhh2346aaaffff",
          "returnExpirationDays": "21",
          "returns": [
            {
              "exchangeLineItemId": "62f3dfc438bcab1951be0a19",
              "fees": [
                {
                  "amount": 34.56,
                  "name": "RETURN_FEE",
                  "reason": "Return fee",
                  "type": "FEE"
                }
              ],
              "invoicedAmount": 11.29,
              "isExchangeItemReturned": true,
              "reasonCode": "Incorrect item",
              "refundAmount": 11.29,
              "refunds": [
                {
                  "amount": 34.56,
                  "name": "RETURN_FEE",
                  "reason": "Return fee",
                  "type": "FEE"
                }
              ],
              "returnRequestCounter": 1,
              "returnsReceivedAt": "2022-09-14T14:07:36.861Z",
              "shipmentId": "62b37697c67b204dd18a7465",
              "shipmentInvoice": {
                "invoiceId": "62ff5c0bec0aed3c86202c32",
                "invoiceNumber": "23940791",
                "invoicedAt": "2022-08-01T20:03:28.483971941Z"
              },
              "shipmentLineItemId": "234",
              "shipmentQuantity": 1
            }
          ],
          "shipToId": "5349b4ddd2781d08c09890f4",
          "shipmentLineItemId": "2adfrghhh2346aaaffff",
          "sku": "P1234",
          "taxDetails": [
            {
              "amount": 34.56,
              "type": "tax"
            }
          ],
          "type": "WEB_PICKUP",
          "uom": "EA"
        }
      ],
      "orderId": "62ff5c0bec0aed3c86202c32",
      "orderNumber": "217088603",
      "orderExternalId": 217088603,
      "orderSubtype": "INTERNATIONAL",
      "orderType": "WEB",
      "orderedAt": "2022-05-12T09:30:31.198Z",
      "payments": [
        {
          "attributes": {},
          "authorizedAmount": 256.1,
          "billToAddress": {
            "addressLine1": "123 Main St.",
            "addressLine2": "Suite 100",
            "addressLine3": "Seventh floor",
            "addressLine4": "Attention: Pat E. Kake",
            "city": "Seattle",
            "countryCode": "US",
            "email": "test@example.com",
            "latitude": 47.6205,
            "longitude": -122.3493,
            "name": {
              "firstName": "Alex",
              "lastName": "Doe",
              "middleName": "E"
            },
            "phone": {
              "number": "123-456-7890",
              "type": "MOBILE"
            },
            "postalCode": "98121",
            "region": "WA",
            "type": "Home"
          },
          "conversion": 1,
          "currency": "USD",
          "paidAt": "2022-01-27T16:15:58.000-05:00",
          "paymentCounter": 1,
          "paymentIdentifier": {
            "cardIdentifier": "***********3456"
          },
          "paymentMethod": "CREDIT_CARD",
          "paymentProvider": "stripe",
          "paymentStatus": "PAID",
          "paymentToken": {
            "token": "pi_34tr6787rt"
          },
          "paymentType": "VISA",
          "settlement": {
            "settledAt": "2022-01-27T21:15:58Z",
            "settlementAmount": 10.3,
            "settlementStatusCode": "SETTLED"
          }
        }
      ],
      "returns": [
        {
          "fees": [
            {
              "amount": 34.56,
              "name": "RETURN_FEE",
              "reason": "Return fee",
              "type": "FEE"
            }
          ],
          "invoicedAmount": 11.29,
          "paymentCounterRefundDetails": [
            {
              "amount": 34.56,
              "paymentCounter": 1
            }
          ],
          "refunds": [
            {
              "amount": 34.56,
              "name": "RETURN_FEE",
              "reason": "Return fee",
              "type": "FEE"
            }
          ],
          "returnCounter": 1,
          "totalRefundAmount": 11.29
        }
      ],
      "taxDetails": [
        {
          "amount": 34.56,
          "type": "tax"
        }
      ]
    }
  ],
  "postedAt": "2022-08-01T20:03:28.483971941Z",
  "retail": {
    "cashierId": "CE-321",
    "locationNumber": "WH334"
  },
  "shipInfo": {
    "discounts": [
      {
        "amount": 2.99,
        "promotionCode": "SHIPFREE",
        "promotionId": "SHIPFREE",
        "promotionName": "Free Shipping",
        "quantity": 1,
        "unit": "AMOUNT_OFF",
        "value": 10
      }
    ],
    "estimatedDeliveryDate": "2022-05-12T09:30:31.198Z",
    "estimatedShipDate": "2022-05-12T09:30:31.198Z",
    "isInvoiced": true,
    "locationNumber": "WH334",
    "pickups": [
      {
        "email": "test@example.com",
        "name": {
          "firstName": "Alex",
          "lastName": "Doe",
          "middleName": "E"
        },
        "phone": {
          "number": "123-456-7890",
          "type": "MOBILE"
        },
        "pickupType": "PRIMARY"
      }
    ],
    "shipMethod": "Parcel post delivery",
    "shipToAddress": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Suite 100",
      "addressLine3": "Seventh floor",
      "addressLine4": "Attention: Pat E. Kake",
      "city": "Seattle",
      "countryCode": "US",
      "email": "test@example.com",
      "latitude": 47.6205,
      "longitude": -122.3493,
      "name": {
        "firstName": "Alex",
        "lastName": "Doe",
        "middleName": "E"
      },
      "phone": {
        "number": "123-456-7890",
        "type": "MOBILE"
      },
      "postalCode": "98121",
      "region": "WA",
      "type": "Home"
    },
    "shipToDiscount": 12.6,
    "shipToId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
    "shipToPrice": 20,
    "shipToTaxTotal": 12.6,
    "shipToType": "SHIP_TO_ADDRESS",
    "shipToUnitPrice": 20,
    "shipmentInstructions": "Handle with care",
    "taxCode": "FR01",
    "taxDetails": [
      {
        "amount": 34.56,
        "attributes": {},
        "currency": "USD",
        "name": "STATE",
        "rate": 10,
        "rateType": "PERCENTAGE",
        "taxCode": "FR01"
      }
    ]
  },
  "shipmentId": "62ff5c0bec0aed3c86202c32",
  "shipmentNumber": "217088603",
  "shippedAt": "2022-08-01T20:03:28.483Z",
  "statusCode": "CREATED",
  "totalTaxAmount": 19.57,
  "updatedAt": "2022-08-01T20:03:28.483971941Z",
  "version": 2
}

Authorizations

Authorization
string
header
required

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

Headers

x-fabric-tenant-id
string
required

A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.

x-fabric-channel-id
string
required

x-fabric-channel-id identifies the sales channel where the API request is being made; primarily for multichannel use cases. The channel ids are 12 corresponding to US and 13 corresponding to Canada. The default channel id is 12. This field is required.

x-fabric-request-id
string

Unique request ID

Path Parameters

invoiceId
string
required

System-generated invoice ID

Body

application/json

The request model for creating or updating an invoice in the payment system.

invoiceId
string
required

This is the system-generated unique invoice ID.

Example:

"62ff5c0bec0aed3c86202c32"

version
integer
required

This field indicates the current version of the invoice document. The number increases each time the invoice is updated.

Example:

2

shipmentId
string
required

This is the 24-character system-generated shipment ID. The invoice is created against this shipment.

Example:

"62ff5c0bec0aed3c86202c32"

statusCode
enum<string>
required

This field indicates the current invoice processing status. CREATED — The invoice was generated by fabric. POSTED — The Invoice service sent a notification to the webhook service. ACKNOWLEDGED — The merchant acknowledged the invoice successfully.

Available options:
CREATED,
POSTED,
ACKNOWLEDGED
Example:

"CREATED"

channelId
string
required

This is the sales channel ID.

Example:

"10"

invoiceTotal
number
required

This is the total invoiced amount captured for the order.

Example:

245.7

totalTaxAmount
number
required

This is the total tax amount included in the invoice.

Example:

19.57

currency
string
required

This is the ISO 4217 currency code for invoiced amounts.

Example:

"USD"

invoiceNumber
string

This is a merchant-defined unique invoice number. If omitted, fabric generates one using the Configuration service’s sequence generator.

Example:

"23940791"

invoiceExternalId
string

This is an optional identifier assigned to the invoice by the merchant.

Example:

"191763090"

invoiceStatus
enum<string>

This field shows the current invoice status.

Available options:
PENDING,
CAPTURED,
SETTLED,
SETTLE_FAILED,
PARTIAL_SETTLED,
APPROVED,
REJECTED
Example:

"CAPTURED"

invoiceType
enum<string>

This field specifies the type of invoice.

Available options:
RETURN,
SHIPPING,
APPEASEMENT,
ORDER_DONATION,
ORDER_CREATE,
ORDER_CARRY,
EXCHANGE,
CANCELLATION
Example:

"SHIPPING"

invoicedAt
string<date-time>

This is the system-generated timestamp of when the invoice was created in UTC.

Example:

"2022-08-01T20:03:28.483Z"

shipmentNumber
string

This is the merchant-specified shipment number. The invoice is created against this shipment.

Example:

"217088603"

shippedAt
string<date-time>

This is the timestamp of when the order was shipped in UTC.

Example:

"2022-08-01T20:03:28.483Z"

orders
object[]

This is the list of orders that are included in the invoice.

locationNumber
string

This is the unique identifier of the ship-from location. The value must match the locationNumber stored in the fabric Location service.

Example:

"3235"

location
object

This object contains location details. It is typically populated for shipping invoices.

retail
object

This object contains optional retail details.

createdAt
string<date-time>

This is the timestamp of when the invoice was created in UTC.

Example:

"2022-08-01T20:03:28.483Z"

updatedAt
string<date-time>

This is the timestamp of when the invoice was last updated in UTC.

Example:

"2022-08-01T20:03:28.483971941Z"

postedAt
string<date-time>

This is the timestamp of when the invoice was sent to a third-party system for financial processing in UTC.

Example:

"2022-08-01T20:03:28.483971941Z"

acknowledgedAt
string<date-time>

This is the timestamp of when the merchant acknowledged the invoice in UTC.

Example:

"2022-08-01T20:03:28.483Z"

customer
object

This object contains customer details.

shipInfo
object

This object contains shipment information.

attributes
object

This object contains custom attributes that store additional information.

Example:
{ "attribute1": "value" }

Response

OK

The invoice response model.

channelId
string
required

This is the sales channel ID.

Example:

"10"

currency
string
required

This is the ISO 4217 currency code for invoiced amounts.

Example:

"USD"

invoiceId
string
required

This is the system-generated unique invoice ID.

Example:

"62ff5c0bec0aed3c86202c32"

invoiceTotal
number
required

This is the total invoiced amount captured for the order.

Example:

245.7

shipmentId
string
required

This is the 24-character system-generated shipment ID. The invoice is created against this shipment.

Example:

"62ff5c0bec0aed3c86202c32"

statusCode
enum<string>
required

This field indicates the current invoice processing status. CREATED — The invoice was generated by fabric. POSTED — The Invoice service sent a notification to the webhook service. ACKNOWLEDGED — The merchant acknowledged the invoice successfully.

Available options:
CREATED,
POSTED,
ACKNOWLEDGED
Example:

"CREATED"

totalTaxAmount
number
required

This is the total tax amount included in the invoice.

Example:

19.57

version
integer
required

This field indicates the current version of the invoice document. The number increases each time the invoice is updated.

Example:

2

acknowledgedAt
string<date-time>

This is the timestamp of when the merchant acknowledged the invoice in UTC.

Example:

"2022-08-01T20:03:28.483Z"

auditLogs
object[]

This array contains audit logs that track invoice lifecycle events.

createdAt
string<date-time>

This is the timestamp of when the invoice was created in UTC.

Example:

"2022-08-01T20:03:28.483Z"

customer
object

This object contains customer details.

invoiceExternalId
string

This is an optional identifier assigned to the invoice by the merchant.

Example:

"191763090"

invoiceNumber
string

This is a merchant-defined unique invoice number. If omitted, fabric generates one using the Configuration service’s sequence generator.

Example:

"23940791"

invoiceStatus
enum<string>

This field shows the system-generated invoice status. CAPTURED — The authorizedAmount was successfully captured. SETTLED — The authorizedAmount was successfully settled with the customer. This may mean the amount was fully paid or refunded in case of returns. SETTLE_FAILED — The settlement of the authorizedAmount failed. PARTIAL_SETTLED — Only part of the authorizedAmount was settled.

Available options:
CAPTURED,
SETTLED,
SETTLE_FAILED,
PARTIAL_SETTLED
Example:

"CAPTURED"

invoiceType
enum<string>

This field specifies the system-updated invoice type. RETURN — Created for order returns. SHIPPING — Created when items are shipped. APPEASEMENT — Created for customer appeasements. ORDER_DONATION — Created when an order is donated. ORDER_CARRY — Created for Cash & Carry orders. EXCHANGE — Created for order exchanges.

Available options:
RETURN,
SHIPPING,
APPEASEMENT,
ORDER_DONATION,
ORDER_CARRY,
EXCHANGE
Example:

"SHIPPING"

invoicedAt
string<date-time>

This is the system-generated timestamp of when the invoice was created in UTC.

Example:

"2022-08-01T20:03:28.483Z"

location
object

This object contains location details.

locationNumber
string

This is the unique identifier of the ship-from location. The value must match the locationNumber stored in the fabric Location service.

Example:

"WH334"

orders
object[]

This array contains the invoice order details.

postedAt
string<date-time>

This is the timestamp of when the invoice was sent to a third-party system for financial processing in UTC.

Example:

"2022-08-01T20:03:28.483971941Z"

retail
object

This object contains optional retail details.

shipInfo
object

This object contains shipment information.

shipmentNumber
string

This is the merchant-specified shipment number. The invoice is created against this shipment.

Example:

"217088603"

shippedAt
string<date-time>

This is the timestamp of when the order was shipped in UTC.

Example:

"2022-08-01T20:03:28.483Z"

updatedAt
string<date-time>

This is the timestamp of when the invoice was last updated in UTC.

Example:

"2022-08-01T20:03:28.483971941Z"