Edit Sale
Updates an existing sale record . This endpoint allows modification of any of the sales details, including customer id , invoice code , invoice number , total amount and other variables.
Endpoint
PUT
https://app.xtrakit.com/api/v1/sales/edit/{invoice_code}
Headers
Authorization: Bearer API_KEY
Path Parameters
invoice_code
string
Required
An invoice code is a unique code to retrieve a single sale. Should be passed through the URL
Body Parameters
invoice_code
string
Required
An invoice code is a unique 6-digit code to generate.
invoice_number
string
Required
An invoice number is a unique 6-digit code to generate. Prefix depends on the one you set on the system which would be appended automatically. Example: INV-000001
customer_id
int
Required
You can retrieve customer IDs from customers created and pull their primary ID here.
sub_total_amount
decimal (10,2)
Required
Subtotal amount of your sales in this format: 10.00
total_amount
decimal (10,2)
Required
The total amount of your sales after adding everything including tax, discount, etc. In this format: 10.00
amount_paid
decimal (10,2)
Required
The amount received from the customer when creating this sale. If the amount is zero (0) and the payment method is none, it means the invoice status is DRAFT
discount
decimal (10,2)
Optional
Discounts given to the customer on sale can be null.
Discount is in value not percentage. Example: 10.00
Sample Requests
Sample Response
Last updated