Digitail API
Sales

Preview ConsolidatedInvoice

1min
POST
https://developer.digitail.io/api/v1/sale/consolidate/preview/{id}
Sandbox server (uses test data)

Permissions needed: NONE

This end point is used to preview the consolidated invoice for selected sales, if no sale is selected all customer sales eligible for consolidation are used - create flow. If ID of a already consoliated sale is provided (in body an in path also!!!)then preview of existing consolidated invoice is returned - update flow. property notConsolidatedSalesDetails from response Contains details for all customer sales eligibe for consolidation process. property selectedSalesDetails from response Contains details of selected sales for consolidation process. null - if the request is made with empty sales_ids parameter

Authentication
Bearer
Path Parameters
id
*
Body Parameters
body
*
customer_id
*
consolidating_sale_id
invoice_date
*
sales_ids
Responses
200
successful operation
consolidatingSaleId
invoicePreview
notConsolidatedSalesDetails
selectedSalesDetails
400
The request was invalid or contained data that was not allowed.
message
401
The authorization token is missing or invalid.
403
The user is not authorized to perform the requested operation.
422
Bad request
Example
{"key":"labels.consolidate_invoice.errors.sales_have_payments","message":"exceptions.labels.consolidate_invoice.errors.sales_have_payments","meta":[]}
429
The user has sent too many requests in a given amount of time ("rate limiting"). Max 200 requests per minute.