KashierDevelopersKashier Developers

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
Authorization<token>

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*string

Currency of the amounts in the sheet. Example: EGP

Value in

  • "EGP"
  • "USD"
  • "EUR"
  • "GBP"
batchId*string

The batch to import into, in B- form. Example: B-123

sheetType?string

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

POST
/v2/batch/import