POST
/
v1
/
doc
curl --request POST \
  --url https://app.getswipe.in/api/partner/v1/doc \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "document_type": "invoice",
  "document_date": "01-04-2024",
  "customer": {
    "id": "cus123",
    "name": "Charan Cus"
  },
  "items": [
    {
      "id": "p123",
      "name": "Book",
      "item_type": "goods",
      "quantity": 1,
      "unit_price": 100,
      "tax_rate": 18,
      "price_with_tax": 118,
      "net_amount": 100,
      "total_amount": 118
    }
  ]
}'
{
  "success": true,
  "message": "Document created successfully",
  "serialNumber": "SL123",
  "hashId": "SL123",
  "irn": "SL123",
  "qrCode": "",
  "einvoiceSuccess": true,
  "einvoiceMessage": "true"
}

Customer id and Product id should be unique, if a new id is sent, a new Customer/Product with given details will be automatically created. For Product If an existing id is sent, the details will not override the original product details. They will be applicable only to the current document. For updating the product details, use the update product API

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Success

The response is of type object.