Import batch items from a sheet
curl -X POST "https://test-api.kashier.io/v2/batch/import?currency=EGP&batchId=string" \ -F sheet="string"{ "data": { "imported": 98, "failed": 2, "skipped": 0, "batchId": "B-123", "errors": [ { "row": 5, "error": "Invalid amount format" }, { "row": 12, "error": "Email already used" } ] }, "message": "Batch items imported"}Fills a batch by uploading an Excel sheet of invoices. sheetType must match how the batch was created — withCustomer when each row carries the customer's details, withoutCustomer when the rows are amounts only. The response reports how many rows were imported and returns a per-row errors list for the ones that failed, so a partly wrong sheet still imports everything that was valid.
Authorization
secretKey Merchant secret key used to identify the merchant, obtained from Kashier's dashboard. Pass the raw secret key value in the Authorization header (NOT a "Bearer" token).
In: header
Query Parameters
Currency of the amounts in the sheet. Example: EGP
Value in
- "EGP"
- "USD"
- "EUR"
- "GBP"
The batch to import into, in B- form. Example: B-123
Which sheet layout is being uploaded.
Value in
- "withCustomer"
- "withoutCustomer"
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
Update a batch PUT
Renames an existing batch. The items inside it are left untouched — to change those use updateBatchItem.
Share a batch POST
Turns the batch into live invoices and sends each customer their own payment link, on the channel their row carries. Call this once the imported items look right; the response carries the share rec…