Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
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 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.
Unique request ID
Path Parameters
System-generated invoice ID
Body
The request model for creating or updating an invoice in the payment system.
This is the system-generated unique invoice ID.
"62ff5c0bec0aed3c86202c32"
This field indicates the current version of the invoice document. The number increases each time the invoice is updated.
2
This is the 24-character system-generated shipment ID. The invoice is created against this shipment.
"62ff5c0bec0aed3c86202c32"
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.
CREATED
, POSTED
, ACKNOWLEDGED
"CREATED"
This is the sales channel ID.
"10"
This is the total invoiced amount captured for the order.
245.7
This is the total tax amount included in the invoice.
19.57
This is the ISO 4217 currency code for invoiced amounts.
"USD"
This is a merchant-defined unique invoice number. If omitted, fabric generates one using the Configuration service’s sequence generator.
"23940791"
This is an optional identifier assigned to the invoice by the merchant.
"191763090"
This field shows the current invoice status.
PENDING
, CAPTURED
, SETTLED
, SETTLE_FAILED
, PARTIAL_SETTLED
, APPROVED
, REJECTED
"CAPTURED"
This field specifies the type of invoice.
RETURN
, SHIPPING
, APPEASEMENT
, ORDER_DONATION
, ORDER_CREATE
, ORDER_CARRY
, EXCHANGE
, CANCELLATION
"SHIPPING"
This is the system-generated timestamp of when the invoice was created in UTC.
"2022-08-01T20:03:28.483Z"
This is the merchant-specified shipment number. The invoice is created against this shipment.
"217088603"
This is the timestamp of when the order was shipped in UTC.
"2022-08-01T20:03:28.483Z"
This is the list of orders that are included in the invoice.
This is the unique identifier of the ship-from location. The value must match the locationNumber
stored in the fabric Location service.
"3235"
This object contains location details. It is typically populated for shipping invoices.
This object contains optional retail details.
This is the timestamp of when the invoice was created in UTC.
"2022-08-01T20:03:28.483Z"
This is the timestamp of when the invoice was last updated in UTC.
"2022-08-01T20:03:28.483971941Z"
This is the timestamp of when the invoice was sent to a third-party system for financial processing in UTC.
"2022-08-01T20:03:28.483971941Z"
This is the timestamp of when the merchant acknowledged the invoice in UTC.
"2022-08-01T20:03:28.483Z"
This object contains customer details.
This object contains shipment information.
This object contains custom attributes that store additional information.
{ "attribute1": "value" }
Response
OK
The invoice response model.
This is the sales channel ID.
"10"
This is the ISO 4217 currency code for invoiced amounts.
"USD"
This is the system-generated unique invoice ID.
"62ff5c0bec0aed3c86202c32"
This is the total invoiced amount captured for the order.
245.7
This is the 24-character system-generated shipment ID. The invoice is created against this shipment.
"62ff5c0bec0aed3c86202c32"
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.
CREATED
, POSTED
, ACKNOWLEDGED
"CREATED"
This is the total tax amount included in the invoice.
19.57
This field indicates the current version of the invoice document. The number increases each time the invoice is updated.
2
This is the timestamp of when the merchant acknowledged the invoice in UTC.
"2022-08-01T20:03:28.483Z"
This array contains audit logs that track invoice lifecycle events.
This is the timestamp of when the invoice was created in UTC.
"2022-08-01T20:03:28.483Z"
This object contains customer details.
This is an optional identifier assigned to the invoice by the merchant.
"191763090"
This is a merchant-defined unique invoice number. If omitted, fabric generates one using the Configuration service’s sequence generator.
"23940791"
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.
CAPTURED
, SETTLED
, SETTLE_FAILED
, PARTIAL_SETTLED
"CAPTURED"
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.
RETURN
, SHIPPING
, APPEASEMENT
, ORDER_DONATION
, ORDER_CARRY
, EXCHANGE
"SHIPPING"
This is the system-generated timestamp of when the invoice was created in UTC.
"2022-08-01T20:03:28.483Z"
This object contains location details.
This is the unique identifier of the ship-from location. The value must match the locationNumber
stored in the fabric Location service.
"WH334"
This array contains the invoice order details.
This is the timestamp of when the invoice was sent to a third-party system for financial processing in UTC.
"2022-08-01T20:03:28.483971941Z"
This object contains optional retail details.
This object contains shipment information.
This is the merchant-specified shipment number. The invoice is created against this shipment.
"217088603"
This is the timestamp of when the order was shipped in UTC.
"2022-08-01T20:03:28.483Z"
This is the timestamp of when the invoice was last updated in UTC.
"2022-08-01T20:03:28.483971941Z"