Authentication v1
- Identity APIs
- User
- Address
- Auth
User Self Service APIs
- Introduction
- User Self Service APIs
- Authentication APIs
Experiences v2 (XM v2)
- XM
- Pages
- Global Components
- Menu
Experiences v1 (XM v1)
- XM
- Pages
- Global Components
- Menu
Product Catalog
- Product Catalog
- Category
- Product
- Attributes
- Bulk Import
Orders v2 (OMS v2)
- Order Management System
- Order
- Order Attribute
- Developer Guide
- Order Return
- Payment Status
- Package Tracking
- Cross Border
- Order Cancellation
- Appeasement
- Allocation
- Configuration
- Fraud Configuration
- Target Configuration
- Location
- Location Attribute
- Inventory Network
- Inventory
- Inventory Counter
- Inventory Bulk Operation
- Inventory Attribute
- Inventory Upload Log
- Shipment
- Shipping Method
- Webhook
- Notification
- Export
- Invoice
- Fraud
- Backorder Preorder Reservation
- List
Orders v1 (OMS v1)
- Order Management System
- Cart
- Bill To
- Ship To
- Wishlist
- Cart Decoupled
- Warehouse
- Inventory
- Attributes
- List
- Tax/Address Validate
- Shipping
- Payments
- Order
Offers v2
- Offers
- Developer Guide
- Promotion
- Price Kind
- Dynamic Pricing Engine
- Segment
- Coupon
- Coupon Codes
- Product
- Price List
- Attributes
- Item
- Price Guard
- Global Exclusion
- Upload Price CSV
- Pricing
- Redemption
- Exports
Offers v1
- Offers
- Login API
- Promotions
- Pricing
Subscriptions (SMT API)
- Subscriptions API
- Cancellation Reasons
- Subscription Discounts
- Subscriptions
- Subscribers
- Orders
Loyalty (Member)
- Member APIs
- Inquire
- Discounts
- Redeem
- Earn
- Members
Dropship
- Dropship API
- Shipments
- Products
- Invoices
- Connections
- Inventory
- Developer Guide
- Returns
- Orders
Cart API
- Cart
- Order Draft
- Attribute
- Adjustments
- Shipping
- Cart
Checkout API
- Checkout
- Checkout
Customer
- Core Concepts
- Customer Service
- Organization
- User Party
- Organization Group Addresses
- User Internal Party
- Organization Contracts
- Party
- Party Contracts
- Contracts
- User
- Search
- User Trait
- Organization Users
- Address
- User Address
- Trait
- Party Address
- Party Trait
- Organization Group Users
- Internal Party
- Contract Pricelist
- Internal Parties Party
- Account
- Party Account
- Organization Addresses
- Organization Groups
- Individual Addresses
- Users Organization
- Individual
Generate invoice
Generates invoice for the given invoice type such as, shipment, appeasement, and so on.
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/invoice/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"detailType": "ORDER_CREATE/ORDER_RETURNS",
"detail": {
"orderNumber": "ship1233234555g",
"channel": "ship1233234555g",
"tenant": "ship1233234555g",
"id": "ship1233234555g",
"documentType": "ORDER",
"invoiceType": "SHIPMENT"
}
}'
{
"invoiceId": "62ff5c0bec0aed3c86202c32",
"invoiceNumber": "23940791",
"invoiceStatus": "CAPTURED/SETTLED",
"invoiceType": "SHIPPING/APPEASEMENT",
"invoiceDate": "2022-08-01T20:03:28.483971941Z",
"shipmentId": "62ff5c0bec0aed3c86202c32",
"shipmentNumber": "217088603",
"shippedOn": "2022-08-01T20:03:28.483971941Z",
"orders": [
{
"orderId": "62ff5c0bec0aed3c86202c32",
"orderNumber": "217088603",
"orderDate": "2022-05-12T09:30:31.198Z",
"orderType": "WEB",
"orderSubType": "International",
"invoiceOrderTotal": 245.7,
"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",
"statusCode": "CREATED/POSTED/ACKNOWLEDGED",
"channelId": "strate",
"invoiceTotal": 245.7,
"totalTaxAmount": 245.7,
"currency": "dollar",
"customer": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"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": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"pickupType": "Primary"
}
],
"shipToAddress": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"address1": "Test Street",
"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": {}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
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.
Body
EventRequest model
Event type
Invoice event detail model
channel
tenantId
id of the given document
ORDER
, SHIPMENT
SHIPPING,APPEASEMENT
id of the given document
Response
Invoice Model
Unique Id of the invoice
Shipment Id in case of invoice type as Shipment
Current status of the invoice
Required field channel Id
Total amount invoiced
Total tax amount invoiced
Currency type in which amount invoiced
Unique number of the invoice
InvoiceStatus Model
CAPTURED
, SETTLED
, SETTLE_FAILED
, PARTIAL_SETTLED
, DRAFT
, ISSUED
, CREDITED
, DELETED
InvoiceType Model
RETURN
, SHIPPING
, APPEASEMENT
Date when order invoiced
Shipment Number in case of invoice type as Shipment
Date when order shipped
order details for the invoice
Order Id for which invoice needs to be created
Total amount invoiced as per order
Order Number for which invoice needs to be created
Actual order creation date
WEB
, CSC
, MOBILE_APP
, POS
IOS
, Android
, International
Item list for the invoicing
Payment list for the invoicing
Invoice payment identifier Model
Invoice payment token Model
Invoice address Model
Invoice settlement Model
InvoiceSettlementStatusCode Model
SETTLED
, PARTIAL_SETTLED
, SETTLEMENT_FAILED
Invoice appeasement details
locationNum in case of invoice type as Shipment
Invoice Location
locationNum in case of invoice type as Shipment
Invoice address Model
Date when invoice created
Date when invoice updated
Date when invoice posted for financial process
Date when invoice acknowledged
InvoiceCustomer Model
Account Id such as Loyalty accountId
Employee Id used when the customer is the employee himself
Invoice address Model
Audit log list
OrderShipInfo Model
Location Num to be used for BOPIS to identify the pickup store
Primary
, Alternate
OrderAddress Model
Was this page helpful?
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/invoice/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"detailType": "ORDER_CREATE/ORDER_RETURNS",
"detail": {
"orderNumber": "ship1233234555g",
"channel": "ship1233234555g",
"tenant": "ship1233234555g",
"id": "ship1233234555g",
"documentType": "ORDER",
"invoiceType": "SHIPMENT"
}
}'
{
"invoiceId": "62ff5c0bec0aed3c86202c32",
"invoiceNumber": "23940791",
"invoiceStatus": "CAPTURED/SETTLED",
"invoiceType": "SHIPPING/APPEASEMENT",
"invoiceDate": "2022-08-01T20:03:28.483971941Z",
"shipmentId": "62ff5c0bec0aed3c86202c32",
"shipmentNumber": "217088603",
"shippedOn": "2022-08-01T20:03:28.483971941Z",
"orders": [
{
"orderId": "62ff5c0bec0aed3c86202c32",
"orderNumber": "217088603",
"orderDate": "2022-05-12T09:30:31.198Z",
"orderType": "WEB",
"orderSubType": "International",
"invoiceOrderTotal": 245.7,
"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",
"statusCode": "CREATED/POSTED/ACKNOWLEDGED",
"channelId": "strate",
"invoiceTotal": 245.7,
"totalTaxAmount": 245.7,
"currency": "dollar",
"customer": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"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": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"pickupType": "Primary"
}
],
"shipToAddress": {
"name": {
"first": "John",
"middle": "Middle",
"last": "Doe"
},
"email": "test@fabric.inc",
"phone": {
"number": "55555555555",
"type": "MOBILE"
},
"address1": "Test Street",
"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": {}
}