Invoice service (2.0.0)

Download OpenAPI specification:Download

fabric OMS Invoice APIs for multinenat service

Invoice Controller

These endpoints help in generating the invoices

Generate invoice

Generates invoice for the given invoice type such as, shipment, appeasement, and so on.

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
detailType
required
string

Event type

object (InvoiceEventDetail)

Invoice event detail model

Responses
201

Invoice generated

400

Bad Request

404

Not found

500

Internal Server Error

post/
Request samples
application/json
{
  • "detailType": "ORDER_CREATE/ORDER_RETURNS",
  • "detail": {
    }
}
Response samples
application/json
{
  • "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": [
    ],
  • "locationNum": 3235,
  • "location": "object",
  • "retail": {
    },
  • "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": {
    },
  • "auditLogs": [
    ],
  • "shipInfo": {
    },
  • "attributes": {
    }
}

Get invoice by query

Retrieves invoice by query

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
limit
integer <int32>
Default: 10

Numbers of records to be returned.

offset
integer <int64>
Default: 0

Number of records to skipped.

sortBy
string
Default: "updatedAt"

Item property on which data needed to be sorted on.

sortDirection
string
Default: "desc"

Direction of sorting i.e ascending or descending

Enum: "asc" "desc"
required
object
Default: {}

JSON to do filtration of records. to filter records json structure should be similar to target entity structure i.e order, shipment etc

Responses
200

Invoice fetched

400

Bad Request

404

Invoice not found

500

Internal Server Error

post/query
Request samples
application/json
{
  • "limit": 10,
  • "offset": 0,
  • "sortBy": "updatedAt",
  • "sortDirection": "desc",
  • "filters": {
    }
}
Response samples
application/json
{
  • "count": 100,
  • "limit": 10,
  • "offset": 1
}

Update invoice for financial posting

Updates invoice for financial posting for invoice IDs

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
invoiceIds
required
Array of strings

List of invoiceIds

Responses
201

Invoice updated

400

Bad Request

404

Invoice not found

500

Internal Server Error

post/post
Request samples
application/json
{
  • "invoiceIds": [
    ]
}
Response samples
application/json
[
  • {
    }
]

Acknowledge financial posting

Acknowledges financial posting for invoice ID

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
invoiceId
required
string

Invoice Id

acknowledgedAt
required
string <date-time>

Date when invoice acknowledged for financial posting

attributes
object

Attributes

Responses
201

Acknowledged financial posting

400

Bad Request

404

Invoice not found

500

Internal Server Error

post/post/acknowledge
Request samples
application/json
{
  • "invoiceId": "123ab",
  • "acknowledgedAt": "2022-08-01T20:03:28.483971941Z",
  • "attributes": { }
}
Response samples
application/json
{
  • "message": "Success"
}

Acknowledge invoice by ID

Acknowledges invoice by invoice ID

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
invoiceId
required
string

Invoice Id

Responses
201

Invoice acknowledged

400

Bad Request

404

Invoice not found

500

Internal Server Error

post/acknowledgement
Request samples
application/json
{
  • "invoiceId": "123"
}
Response samples
application/json
{
  • "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": [
    ],
  • "locationNum": 3235,
  • "location": "object",
  • "retail": {
    },
  • "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": {
    },
  • "auditLogs": [
    ],
  • "shipInfo": {
    },
  • "attributes": {
    }
}

Get invoice by invoice ID

Retrieves invoice by invoice ID

SecurityAuthorization or context
Request
path Parameters
invoiceId
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Invoice fetched

400

Bad Request

404

Invoice not found

500

Internal Server Error

get/{invoiceId}
Response samples
application/json
{
  • "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": [
    ],
  • "locationNum": 3235,
  • "location": "object",
  • "retail": {
    },
  • "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": {
    },
  • "auditLogs": [
    ],
  • "shipInfo": {
    },
  • "attributes": {
    }
}