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
header
required

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

Body

application/json
document_date
string
required

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

document_type
enum<string>
required

Value should always be the string 'invoice'

Available options:
invoice,
subscription,
pro_forma_invoice,
estimate,
sales_return,
purchase_return
items
object[]
required

Array of Products/Services, refer Item Object below 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

company_shipping_address
object

Company shipping from Address, refer Shipping Address Object for parameters

customer
object

Customer (deprecated, please use Party). If there are any changes made to the customer's details, we will update those details and any documents linked to this customer's ID will be updated to reflect the changes.

customer_billing_address
object

Customer billing to Address, refer Shipping Address Object for parameters

customer_shipping_address
object

Customer shipping to Address, refer Shipping Address Object for parameters

due_date
string

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

einvoice
boolean

Generate einvoice

export_invoice_details
object

Export Invoice Details

extra_discount
number

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

is_export
boolean

Is Export

is_subscription
boolean

Is Subscription

notes
string

Notes to show in invoice

party
object

Party. If there are any changes made to the party details, we will update those details and any documents linked to this party ID will be updated to reflect the changes.

payments
object[]

Array of Payments, refer Payment Object for parameters

reference
string

Any references you want to add to the doc

round_off
boolean
default:
false

Should Round Off total amount

serial_number
string

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

subscription_details
object

Subscription Details

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

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

terms
string

Terms to show in invoice

Response

200 - application/json
einvoiceMessage
string

EInvoice Message

einvoiceSuccess
boolean

EInvoice Success

hashId
string

Hash ID

irn
string

IRN

message
string

Message

qrCode
string

QR Code

serialNumber
string

Serial Number

success
boolean

Success