curl --request GET \
--url https://prod01.oms.fabric.inc/api/v2/invoice/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'x-site-context: <x-site-context>'{
"invoiceId": "62ff5c0bec0aed3c86202c32",
"shipmentId": "62ff5c0bec0aed3c86202c32",
"statusCode": "CREATED/POSTED/ACKNOWLEDGED",
"channelId": "strate",
"invoiceTotal": 245.7,
"totalTaxAmount": 245.7,
"currency": "dollar",
"invoiceNumber": "23940791",
"invoiceStatus": "CAPTURED/SETTLED",
"invoiceType": "SHIPPING/APPEASEMENT",
"invoiceDate": "2022-08-01T20:03:28.483971941Z",
"shipmentNumber": "217088603",
"shippedOn": "2022-08-01T20:03:28.483971941Z",
"orders": [
{
"orderId": "62ff5c0bec0aed3c86202c32",
"invoiceOrderTotal": 245.7,
"orderNumber": "217088603",
"orderDate": "2022-05-12T09:30:31.198Z",
"orderType": "WEB",
"orderSubType": "International",
"items": [
{
"lineItemId": "1adfrghhh2346aaaf",
"lineItemNumber": 1,
"shipmentLineItemId": "<string>",
"itemId": "1234",
"orderId": "<string>",
"type": "WEB_PICKUP",
"sku": "P1234",
"invoiceQuantity": 10,
"itemUnitPrice": 123,
"invoiceLineTotal": 600,
"itemDiscountsTotal": 123,
"itemTaxTotal": 123,
"itemFeeTotal": 123,
"itemAppeasementTotal": 123,
"lineItemCreatedAt": "2023-11-07T05:31:56Z",
"locationStoreId": "<string>",
"returnExpiryDays": "<string>",
"currency": "<string>",
"fees": [
{
"type": "tax",
"value": 34.56
}
],
"taxDetail": [
{
"type": "tax",
"value": 34.56
}
],
"appeasements": [
{
"appeasementCounter": 1,
"reasonCode": "Incorrect Item",
"subReasonCode": "Late shipping",
"value": 34.56,
"invoiceValue": 34.56,
"payments": [
{
"paymentCounter": 1,
"refundAmount": 40
}
]
}
],
"discount": [
{
"quantity": 2,
"value": 2,
"promoId": "HNY2022",
"promoCode": "HNY2022",
"promoTitle": "Happy New Year",
"type": "promotion"
}
],
"shipToId": "5349b4ddd2781d08c09890f4",
"returns": [
{
"shipmentLineItemId": "<string>",
"shipmentQuantity": 123,
"refundAmount": 123,
"reasonCode": "<string>",
"invoiceDate": "2023-11-07T05:31:56Z"
}
],
"attributes": {},
"uom": "<string>"
}
],
"payments": [
{
"paymentCounter": 123,
"paymentDate": "2022-01-27T16:15:58.000-05:00",
"billToId": "62272e917b12209e68751d94",
"paymentIdentifier": {
"cardIdentifier": "***********3456"
},
"paymentProvider": "stripe",
"paymentToken": {
"token": "pi_34tr6787rt"
},
"paymentMethod": "CREDIT_CARD",
"paymentType": "VISA",
"currency": "USD",
"conversion": 1,
"paymentStatus": "OK",
"attributes": {},
"billToAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressLine3": "<string>",
"addressLine4": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"type": "<string>",
"contact": [
{
"type": "<string>",
"email": "<string>",
"phone": [
{
"number": "<string>",
"type": "<string>"
}
],
"name": {
"first": "<string>",
"middle": "<string>",
"last": "<string>"
}
}
]
},
"settlement": {
"settlementDate": "2022-01-27T16:15:58-05:00",
"settlementStatusCode": "SETTLED",
"settlementAmount": 123,
"attributes": {}
},
"authAmount": 123
}
],
"fees": [
{
"type": "tax",
"value": 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,
"value": 2,
"promoId": "HNY2022",
"promoCode": "HNY2022",
"promoTitle": "Happy New Year",
"type": "promotion"
}
],
"taxDetail": [
{
"type": "tax",
"value": 34.56
}
],
"attributes": {}
}
],
"locationNum": 3235,
"location": "object",
"retail": {
"locationNum": 123,
"cashierId": "<string>"
},
"createdAt": "2022-08-01T20:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"postedAt": "2022-08-01T20:03:28.483971941Z",
"acknowledgedAt": "2022-08-01T20:03:28.483971941Z",
"customer": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"userId": "62272e917b12209e68751d94",
"accountId": "62272e917b12209e68751d94",
"employeeId": "62272e917b12209e68751d94",
"company": "Fabric",
"address": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressLine3": "<string>",
"addressLine4": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"type": "<string>",
"contact": [
{
"type": "<string>",
"email": "<string>",
"phone": [
{
"number": "<string>",
"type": "<string>"
}
],
"name": {
"first": "<string>",
"middle": "<string>",
"last": "<string>"
}
}
]
}
},
"auditLogs": [
{
"lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
"auditId": "62272e917b12209e68751d94",
"auditType": "<string>",
"employeeId": "62272e917b12209e68751d94",
"auditTimestamp": "2022-05-12T09:24:54.804Z",
"source": "POS",
"reasonCode": "POS",
"subReasonCode": "POS",
"policyCode": "POS",
"note": "Note",
"lineItemNumber": 1,
"sku": "F5F",
"quantity": 1,
"amount": 2.4,
"paymentToken": {
"token": "pi_34tr6787rt",
"paymentType": "VISA"
},
"success": true,
"paymentResponse": {},
"updatedFields": [
{
"fieldName": "UOM",
"fieldOriginalValue": "PK"
}
],
"attributes": {}
}
],
"shipInfo": {
"shipToId": "5349b4ddd2781d08c09890f4",
"taxCode": "FR01",
"locationNum": "123",
"pickup": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"pickupType": "Primary"
}
],
"shipToAddress": {
"address1": "Test Street",
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"address2": "123 Parking Lot",
"address3": "<string>",
"address4": "<string>",
"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": {}
},
"attributes": {}
}Retrieves invoice by invoice ID
curl --request GET \
--url https://prod01.oms.fabric.inc/api/v2/invoice/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'x-site-context: <x-site-context>'{
"invoiceId": "62ff5c0bec0aed3c86202c32",
"shipmentId": "62ff5c0bec0aed3c86202c32",
"statusCode": "CREATED/POSTED/ACKNOWLEDGED",
"channelId": "strate",
"invoiceTotal": 245.7,
"totalTaxAmount": 245.7,
"currency": "dollar",
"invoiceNumber": "23940791",
"invoiceStatus": "CAPTURED/SETTLED",
"invoiceType": "SHIPPING/APPEASEMENT",
"invoiceDate": "2022-08-01T20:03:28.483971941Z",
"shipmentNumber": "217088603",
"shippedOn": "2022-08-01T20:03:28.483971941Z",
"orders": [
{
"orderId": "62ff5c0bec0aed3c86202c32",
"invoiceOrderTotal": 245.7,
"orderNumber": "217088603",
"orderDate": "2022-05-12T09:30:31.198Z",
"orderType": "WEB",
"orderSubType": "International",
"items": [
{
"lineItemId": "1adfrghhh2346aaaf",
"lineItemNumber": 1,
"shipmentLineItemId": "<string>",
"itemId": "1234",
"orderId": "<string>",
"type": "WEB_PICKUP",
"sku": "P1234",
"invoiceQuantity": 10,
"itemUnitPrice": 123,
"invoiceLineTotal": 600,
"itemDiscountsTotal": 123,
"itemTaxTotal": 123,
"itemFeeTotal": 123,
"itemAppeasementTotal": 123,
"lineItemCreatedAt": "2023-11-07T05:31:56Z",
"locationStoreId": "<string>",
"returnExpiryDays": "<string>",
"currency": "<string>",
"fees": [
{
"type": "tax",
"value": 34.56
}
],
"taxDetail": [
{
"type": "tax",
"value": 34.56
}
],
"appeasements": [
{
"appeasementCounter": 1,
"reasonCode": "Incorrect Item",
"subReasonCode": "Late shipping",
"value": 34.56,
"invoiceValue": 34.56,
"payments": [
{
"paymentCounter": 1,
"refundAmount": 40
}
]
}
],
"discount": [
{
"quantity": 2,
"value": 2,
"promoId": "HNY2022",
"promoCode": "HNY2022",
"promoTitle": "Happy New Year",
"type": "promotion"
}
],
"shipToId": "5349b4ddd2781d08c09890f4",
"returns": [
{
"shipmentLineItemId": "<string>",
"shipmentQuantity": 123,
"refundAmount": 123,
"reasonCode": "<string>",
"invoiceDate": "2023-11-07T05:31:56Z"
}
],
"attributes": {},
"uom": "<string>"
}
],
"payments": [
{
"paymentCounter": 123,
"paymentDate": "2022-01-27T16:15:58.000-05:00",
"billToId": "62272e917b12209e68751d94",
"paymentIdentifier": {
"cardIdentifier": "***********3456"
},
"paymentProvider": "stripe",
"paymentToken": {
"token": "pi_34tr6787rt"
},
"paymentMethod": "CREDIT_CARD",
"paymentType": "VISA",
"currency": "USD",
"conversion": 1,
"paymentStatus": "OK",
"attributes": {},
"billToAddress": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressLine3": "<string>",
"addressLine4": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"type": "<string>",
"contact": [
{
"type": "<string>",
"email": "<string>",
"phone": [
{
"number": "<string>",
"type": "<string>"
}
],
"name": {
"first": "<string>",
"middle": "<string>",
"last": "<string>"
}
}
]
},
"settlement": {
"settlementDate": "2022-01-27T16:15:58-05:00",
"settlementStatusCode": "SETTLED",
"settlementAmount": 123,
"attributes": {}
},
"authAmount": 123
}
],
"fees": [
{
"type": "tax",
"value": 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,
"value": 2,
"promoId": "HNY2022",
"promoCode": "HNY2022",
"promoTitle": "Happy New Year",
"type": "promotion"
}
],
"taxDetail": [
{
"type": "tax",
"value": 34.56
}
],
"attributes": {}
}
],
"locationNum": 3235,
"location": "object",
"retail": {
"locationNum": 123,
"cashierId": "<string>"
},
"createdAt": "2022-08-01T20:03:28.483971941Z",
"updatedAt": "2022-08-01T20:03:28.483971941Z",
"postedAt": "2022-08-01T20:03:28.483971941Z",
"acknowledgedAt": "2022-08-01T20:03:28.483971941Z",
"customer": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"userId": "62272e917b12209e68751d94",
"accountId": "62272e917b12209e68751d94",
"employeeId": "62272e917b12209e68751d94",
"company": "Fabric",
"address": {
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressLine3": "<string>",
"addressLine4": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>",
"type": "<string>",
"contact": [
{
"type": "<string>",
"email": "<string>",
"phone": [
{
"number": "<string>",
"type": "<string>"
}
],
"name": {
"first": "<string>",
"middle": "<string>",
"last": "<string>"
}
}
]
}
},
"auditLogs": [
{
"lineItemId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
"auditId": "62272e917b12209e68751d94",
"auditType": "<string>",
"employeeId": "62272e917b12209e68751d94",
"auditTimestamp": "2022-05-12T09:24:54.804Z",
"source": "POS",
"reasonCode": "POS",
"subReasonCode": "POS",
"policyCode": "POS",
"note": "Note",
"lineItemNumber": 1,
"sku": "F5F",
"quantity": 1,
"amount": 2.4,
"paymentToken": {
"token": "pi_34tr6787rt",
"paymentType": "VISA"
},
"success": true,
"paymentResponse": {},
"updatedFields": [
{
"fieldName": "UOM",
"fieldOriginalValue": "PK"
}
],
"attributes": {}
}
],
"shipInfo": {
"shipToId": "5349b4ddd2781d08c09890f4",
"taxCode": "FR01",
"locationNum": "123",
"pickup": [
{
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"pickupType": "Primary"
}
],
"shipToAddress": {
"address1": "Test Street",
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "[email protected]",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"address2": "123 Parking Lot",
"address3": "<string>",
"address4": "<string>",
"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": {}
},
"attributes": {}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Invoice fetched
Invoice Model
Unique Id of the invoice
"62ff5c0bec0aed3c86202c32"
Shipment Id in case of invoice type as Shipment
"62ff5c0bec0aed3c86202c32"
Current status of the invoice
"CREATED/POSTED/ACKNOWLEDGED"
Required field channel Id
"strate"
Total amount invoiced
245.7
Total tax amount invoiced
245.7
Currency type in which amount invoiced
"dollar"
Unique number of the invoice
"23940791"
InvoiceStatus Model
CAPTURED, SETTLED, SETTLE_FAILED, PARTIAL_SETTLED, DRAFT, ISSUED, CREDITED, DELETED "CAPTURED/SETTLED"
InvoiceType Model
RETURN, SHIPPING, APPEASEMENT "SHIPPING/APPEASEMENT"
Date when order invoiced
"2022-08-01T20:03:28.483971941Z"
Shipment Number in case of invoice type as Shipment
"217088603"
Date when order shipped
"2022-08-01T20:03:28.483971941Z"
order details for the invoice
Show child attributes
Order Id for which invoice needs to be created
"62ff5c0bec0aed3c86202c32"
Total amount invoiced as per order
245.7
Order Number for which invoice needs to be created
"217088603"
Actual order creation date
"2022-05-12T09:30:31.198Z"
WEB, CSC, MOBILE_APP, POS "WEB"
IOS, Android, International "International"
Item list for the invoicing
Show child attributes
"1adfrghhh2346aaaf"
1
"1234"
"WEB_PICKUP"
"P1234"
10
600
Show child attributes
1
"Incorrect Item"
"Late shipping"
34.56
34.56
Show child attributes
2
2
"HNY2022"
"HNY2022"
"Happy New Year"
"promotion"
"5349b4ddd2781d08c09890f4"
Payment list for the invoicing
Show child attributes
"2022-01-27T16:15:58.000-05:00"
"62272e917b12209e68751d94"
"stripe"
"CREDIT_CARD"
"VISA"
"USD"
1
"OK"
Invoice address Model
Show child attributes
Show child attributes
Invoice settlement Model
Show child attributes
"2022-01-27T16:15:58-05:00"
InvoiceSettlementStatusCode Model
SETTLED, PARTIAL_SETTLED, SETTLEMENT_FAILED Invoice appeasement details
Show child attributes
1
"Incorrect Item"
"Late shipping"
34.56
34.56
Discount list for the invoicing
Show child attributes
locationNum in case of invoice type as Shipment
3235
Invoice Location
Show child attributes
locationNum in case of invoice type as Shipment
3235
Invoice address Model
Show child attributes
Show child attributes
"object"
Date when invoice created
"2022-08-01T20:03:28.483971941Z"
Date when invoice updated
"2022-08-01T20:03:28.483971941Z"
Date when invoice posted for financial process
"2022-08-01T20:03:28.483971941Z"
Date when invoice acknowledged
"2022-08-01T20:03:28.483971941Z"
InvoiceCustomer Model
Show child attributes
"62272e917b12209e68751d94"
Account Id such as Loyalty accountId
"62272e917b12209e68751d94"
Employee Id used when the customer is the employee himself
"62272e917b12209e68751d94"
"Fabric"
Invoice address Model
Show child attributes
Show child attributes
Audit log list
Show child attributes
"b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569"
"62272e917b12209e68751d94"
"62272e917b12209e68751d94"
"2022-05-12T09:24:54.804Z"
"POS"
"POS"
"POS"
"POS"
"Note"
1
"F5F"
1
2.4
true
OrderShipInfo Model
Show child attributes
"5349b4ddd2781d08c09890f4"
"FR01"
Location Num to be used for BOPIS to identify the pickup store
"123"
Show child attributes
Primary, Alternate "Primary"
OrderAddress Model
Show child attributes
"Test Street"
"123 Parking Lot"
"Beaumont"
"TX"
"USA"
"77705"
"residence"
35.294952
32.294952
"Express Delivery"
"SHIP_TO_ADDRESS"
"2022-05-12T09:30:31.198Z"
"2022-05-12T09:30:31.198Z"
20
12.6
12.6
"User Instructions"
Was this page helpful?