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
    }
  ]
}'

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
headerrequired

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

Body

application/json
document_type
enum<string>
required

Value should always be the string 'invoice'

Available options:
invoice,
subscription,
pro_forma_invoice,
estimate,
sales_return,
purchase_return
document_date
string
required

DD-MM-YYYY, Invoice date (Ex: 11-06-2024 Need not to the current date)

items
object[]
required

Array of Products/Services, refer Item Object below for parameters

serial_number
string

Serial Number, if not sent will be auto generated based on the default prefix.

customer
object

Customer (deprecated, please use Party)

party
object

Party

due_date
string

DD-MM-YYYY, Payment Due date for the invoice (Ex: 11-06-2024)

reference
string

Any references you want to add to the doc

notes
string

Notes to show in invoice

terms
string

Terms to show in invoice

extra_discount
number

Adjustment on overall invoice, doesn’t effect any tax amounts.

round_off
boolean
default: false

Should Round Off total amount

payments
object[]

Array of Payments, refer Payment Object for parameters

bank_details
object

Bank Details, refer Bank Details Object below for parameters, If account_number, ifsc matched with existing bank details, it will be used, else new bank details will be added to your swipe account

tds_id
integer

You can check the tds id and details mapping from https://developers.getswipe.in/api-reference/references#tds-tax-deducted-at-source

tcs_id
integer

You can copy the tcs id and details mapping from https://developers.getswipe.in/api-reference/references#tcs-tax-collected-at-source

company_shipping_address
object

Company shipping from Address, refer Shipping Address Object for parameters

customer_shipping_address
object

Customer shipping to Address, refer Shipping Address Object for parameters

customer_billing_address
object

Customer billing to Address, refer Shipping Address Object for parameters

is_subscription
boolean

Is Subscription

subscription_details
object

Subscription Details

einvoice
boolean

Generate einvoice

is_export
boolean

Is Export

export_invoice_details
object

Export Invoice Details

Response

200 - application/json
success
boolean

Success

message
string

Message

serialNumber
string

Serial Number

hashId
string

Hash ID

irn
string

IRN

qrCode
string

QR Code

einvoiceSuccess
boolean

EInvoice Success

einvoiceMessage
string

EInvoice Message