Create a document
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Serial Number (deprecated, please use New Serial Number)
Value should always be the string 'invoice'
DD-MM-YYYY
Party
Unique id for each party.
Party type, use only specified values. Party type customer can be used for creating invoices, sales returns, estimates, pro forma invoices and delivery challans. Party type vendor can be used for creating purchases, purchase orders & purchase returns, .
Name of the Party
Party Phone Number Country code
Party Phone Number
Company Name
Party Email
GSTIN
Party shipping to Address, refer Shipping Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
Party billing to Address, refer Shipping Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
DD-MM-YYYY
Any references you want to add to the doc
Notes to show in invoice - please check template in swipe application to see where this is displayed
Terms to show in invoice - please check template in swipe application to see where this is displayed
Array of Products/Services, refer Item Object below for parameters
Adjustment on overall invoice, doesn’t effect any tax amounts.
Should Round Off total amount
Array of Payments, refer Payment Object for parameters
You can check the tds id and details mapping from https://developers.getswipe.in/api-reference/references#tds-tax-deducted-at-source
You can check the tcs id and details mapping from https://developers.getswipe.in/api-reference/references#tcs-tax-collected-at-source
Array of Charges and Deductions, refer Additional Charges Deductions Object for parameters
Company shipping from Address, refer Shipping Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
Company billing Address, refer Billing Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
Generate einvoice
Is Export
Export Invoice Details
Shipping Bill Date [DD-MM-YYYY]
Shipping Bill Number
Shipping Port Code
Export Type
The conversion factor represents the rate used to convert foreign currencies into Indian rupees. For example, if you're invoicing in dollars, and 1 dollar equals 84 rupees, the conversion factor would be 84
Country ID
Currency ID, if not provided, the default country currency will be used, please refer to the currency list from https://developers.getswipe.in/api-reference/references#currency-details
Is Subscription
Subscription Details
Start Time [DD-MM-YYYY]
End Time [DD-MM-YYYY]
Repeat in value, Frequency of the repetition
Repeat type, Entity of the repetition
Convert Document. Needed only when the document is already created and you want to convert it to another document
The document type which is being converted
Hash ID
Document Custom Headers. Custom headers should already be added in Swipe Portal.
curl --request POST \
--url https://app.getswipe.in/api/partner/v2/doc \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"document_type": "invoice",
"document_date": "15-11-2024",
"party": {
"id": "CUST123",
"type": "customer",
"name": "John Doe",
"due_date": "15-11-2024"
},
"items": [
{
"id": "ITEM123455667ghg",
"name": "Item Namgergggree",
"quantity": 1,
"unit_price": 200,
"tax_rate": 18,
"price_with_tax": 236,
"net_amount": 200,
"total_amount": 236,
"item_type": "Product"
}
]
}'
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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Value should always be the string 'invoice'
invoice
, subscription
, pro_forma_invoice
, estimate
, sales_return
, purchase_return
DD-MM-YYYY
Array of Products/Services, refer Item Object below for parameters
Unique id for each item. If a new id is sent, a new Item with the below details will be automatically created. if existing Item id is sent the details will not override the original item details. They will be applicable only to the current documents. Use update item to actually update the item details in swipe
Name of the Product
Quantity
Price per item without Tax
Tax percentage for each item . Only valid tax rates are accepted
Price per item with Tax
Net Amount
Item total amount (Net Amount + Tax). We calculate the discount amount by multiplying the item's quantity, unit price, and discount percentage. If a discount amount is provided instead, we reverse-calculate the percentage. If no discount is given, it is set to 0.
Discount Percent
Discount Amount, will be ignored if discount_percent is provided
Item Description
HSN Code. HSN Code can only be of length 4,6 & 8
Product or Service enum
Product
, Service
item quantity unit
OTH
, kg
, g
, l
, ml
, m
, cm
, sqm
, sqcm
, sqft
, sqkm
, unit
Category
Serial Number (deprecated, please use New Serial Number)
Party
Unique id for each party.
Party type, use only specified values. Party type customer can be used for creating invoices, sales returns, estimates, pro forma invoices and delivery challans. Party type vendor can be used for creating purchases, purchase orders & purchase returns, .
customer
, vendor
Name of the Party
Party Phone Number Country code
Party Phone Number
Company Name
Party Email
GSTIN
Party shipping to Address, refer Shipping Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
JAMMU AND KASHMIR
, HIMACHAL PRADESH
, PUNJAB
, CHANDIGARH
, UTTARAKHAND
, HARYANA
, DELHI
, RAJASTHAN
, UTTAR PRADESH
, BIHAR
, SIKKIM
, ARUNACHAL PRADESH
, NAGALAND
, MANIPUR
, MIZORAM
, TRIPURA
, MEGHALAYA
, ASSAM
, WEST BENGAL
, JHARKHAND
, ODISHA
, CHHATTISGARH
, MADHYA PRADESH
, GUJARAT
, DADRA & NAGAR HAVELI & DAMAN & DIU
, MAHARASHTRA
, ANDHRAPRADESH(BEFOREADDED)
, KARNATAKA
, GOA
, LAKSHWADEEP
, KERALA
, TAMIL NADU
, PUDUCHERRY
, ANDAMAN & NICOBAR
, TELANGANA
, ANDHRA PRADESH
, LADAKH(NEWLYADDED)
, OTHER TERRITORY
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
Party billing to Address, refer Shipping Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
JAMMU AND KASHMIR
, HIMACHAL PRADESH
, PUNJAB
, CHANDIGARH
, UTTARAKHAND
, HARYANA
, DELHI
, RAJASTHAN
, UTTAR PRADESH
, BIHAR
, SIKKIM
, ARUNACHAL PRADESH
, NAGALAND
, MANIPUR
, MIZORAM
, TRIPURA
, MEGHALAYA
, ASSAM
, WEST BENGAL
, JHARKHAND
, ODISHA
, CHHATTISGARH
, MADHYA PRADESH
, GUJARAT
, DADRA & NAGAR HAVELI & DAMAN & DIU
, MAHARASHTRA
, ANDHRAPRADESH(BEFOREADDED)
, KARNATAKA
, GOA
, LAKSHWADEEP
, KERALA
, TAMIL NADU
, PUDUCHERRY
, ANDAMAN & NICOBAR
, TELANGANA
, ANDHRA PRADESH
, LADAKH(NEWLYADDED)
, OTHER TERRITORY
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
DD-MM-YYYY
Any references you want to add to the doc
Notes to show in invoice - please check template in swipe application to see where this is displayed
Terms to show in invoice - please check template in swipe application to see where this is displayed
Adjustment on overall invoice, doesn’t effect any tax amounts.
Should Round Off total amount
Array of Payments, refer Payment Object for parameters
Payment Amount
Payment method, use only specified values
cash
, card
, upi
, netBanking
, cheque
, emi
Any internal notes for payment
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
You can check the tds id and details mapping from https://developers.getswipe.in/api-reference/references#tds-tax-deducted-at-source
You can check the tcs id and details mapping from https://developers.getswipe.in/api-reference/references#tcs-tax-collected-at-source
Array of Charges and Deductions, refer Additional Charges Deductions Object for parameters
Unique ID for the charge/deduction.
Name of the charge/deduction.
Total Amount
Tax Rate
SAC Code
Type
charge
, deduction
Company shipping from Address, refer Shipping Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
JAMMU AND KASHMIR
, HIMACHAL PRADESH
, PUNJAB
, CHANDIGARH
, UTTARAKHAND
, HARYANA
, DELHI
, RAJASTHAN
, UTTAR PRADESH
, BIHAR
, SIKKIM
, ARUNACHAL PRADESH
, NAGALAND
, MANIPUR
, MIZORAM
, TRIPURA
, MEGHALAYA
, ASSAM
, WEST BENGAL
, JHARKHAND
, ODISHA
, CHHATTISGARH
, MADHYA PRADESH
, GUJARAT
, DADRA & NAGAR HAVELI & DAMAN & DIU
, MAHARASHTRA
, ANDHRAPRADESH(BEFOREADDED)
, KARNATAKA
, GOA
, LAKSHWADEEP
, KERALA
, TAMIL NADU
, PUDUCHERRY
, ANDAMAN & NICOBAR
, TELANGANA
, ANDHRA PRADESH
, LADAKH(NEWLYADDED)
, OTHER TERRITORY
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
Company billing Address, refer Billing Address Object for parameters
Address ID. It will automatically update the existing address if the address ID already exists.
Address Line 1
Address Line 2
City
State. Select OTHER TERRITORY for countries other than India. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
JAMMU AND KASHMIR
, HIMACHAL PRADESH
, PUNJAB
, CHANDIGARH
, UTTARAKHAND
, HARYANA
, DELHI
, RAJASTHAN
, UTTAR PRADESH
, BIHAR
, SIKKIM
, ARUNACHAL PRADESH
, NAGALAND
, MANIPUR
, MIZORAM
, TRIPURA
, MEGHALAYA
, ASSAM
, WEST BENGAL
, JHARKHAND
, ODISHA
, CHHATTISGARH
, MADHYA PRADESH
, GUJARAT
, DADRA & NAGAR HAVELI & DAMAN & DIU
, MAHARASHTRA
, ANDHRAPRADESH(BEFOREADDED)
, KARNATAKA
, GOA
, LAKSHWADEEP
, KERALA
, TAMIL NADU
, PUDUCHERRY
, ANDAMAN & NICOBAR
, TELANGANA
, ANDHRA PRADESH
, LADAKH(NEWLYADDED)
, OTHER TERRITORY
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
Pincode
Generate einvoice
Is Export
Export Invoice Details
Export Type
Export under bond/LUT
, Export with IGST
, SEZ with IGST Payment
, SEZ without IGST Payment
, Deemed Export
The conversion factor represents the rate used to convert foreign currencies into Indian rupees. For example, if you're invoicing in dollars, and 1 dollar equals 84 rupees, the conversion factor would be 84
Shipping Bill Date [DD-MM-YYYY]
Shipping Bill Number
Shipping Port Code
Country ID
Afghanistan
, Albania
, Algeria
, Andorra
, Angola
, Antigua and Barbuda
, Argentina
, Armenia
, Australia
, Austria
, Azerbaijan
, Bahamas
, Bahrain
, Bangladesh
, Barbados
, Belarus
, Belgium
, Belize
, Benin
, Bhutan
, Bolivia
, Bosnia and Herzegovina
, Botswana
, Brazil
, Brunei
, Bulgaria
, Burkina Faso
, Burundi
, Cabo Verde
, Cambodia
, Cameroon
, Canada
, Central African Republic
, Chad
, Chile
, China
, Colombia
, Comoros
, Congo, Democratic Republic of the
, Congo, Republic of the
, Costa Rica
, Croatia
, Cuba
, Cyprus
, Czechia
, Denmark
, Djibouti
, Dominica
, Dominican Republic
, Ecuador
, Egypt
, El Salvador
, Equatorial Guinea
, Eritrea
, Estonia
, Eswatini
, Ethiopia
, Fiji
, Finland
, France
, Gabon
, Gambia
, Georgia
, Germany
, Ghana
, Greece
, Grenada
, Guatemala
, Guinea
, Guinea-Bissau
, Guyana
, Haiti
, Honduras
, Hungary
, Iceland
, India
, Indonesia
, Iran
, Iraq
, Ireland
, Israel
, Italy
, Jamaica
, Japan
, Jordan
, Kazakhstan
, Kenya
, Kiribati
, Korea, North
, Korea, South
, Kosovo
, Kuwait
, Kyrgyzstan
, Laos
, Latvia
, Lebanon
, Lesotho
, Liberia
, Libya
, Liechtenstein
, Lithuania
, Luxembourg
, Madagascar
, Malawi
, Malaysia
, Maldives
, Mali
, Malta
, Marshall Islands
, Mauritania
, Mauritius
, Mexico
, Micronesia
, Moldova
, Monaco
, Mongolia
, Montenegro
, Morocco
, Mozambique
, Myanmar
, Namibia
, Nauru
, Nepal
, Netherlands
, New Zealand
, Nicaragua
, Niger
, Nigeria
, North Macedonia
, Norway
, Oman
, Pakistan
, Palau
, Palestine
, Panama
, Papua New Guinea
, Paraguay
, Peru
, Philippines
, Poland
, Portugal
, Qatar
, Romania
, Russia
, Rwanda
, Saint Kitts and Nevis
, Saint Lucia
, Saint Vincent and the Grenadines
, Samoa
, San Marino
, Sao Tome and Principe
, Saudi Arabia
, Senegal
, Serbia
, Seychelles
, Sierra Leone
, Singapore
, Slovakia
, Slovenia
, Solomon Islands
, Somalia
, South Africa
, South Sudan
, Spain
, Sri Lanka
, Sudan
, Suriname
, Sweden
, Switzerland
, Syria
, Taiwan
, Tajikistan
, Tanzania
, Thailand
, Timor-Leste
, Togo
, Tonga
, Trinidad and Tobago
, Tunisia
, Turkey
, Turkmenistan
, Tuvalu
, Uganda
, Ukraine
, United Arab Emirates
, United Kingdom
, United States
, Uruguay
, Uzbekistan
, Vanuatu
, Vatican City
, Venezuela
, Vietnam
, Yemen
, Zambia
, Zimbabwe
Currency ID, if not provided, the default country currency will be used, please refer to the currency list from https://developers.getswipe.in/api-reference/references#currency-details
AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, BWP
, BYN
, BZD
, CAD
, CDF
, CHF
, CLP
, CNY
, COP
, CRC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ERN
, ETB
, EUR
, FJD
, FKP
, FOK
, GBP
, GEL
, GGP
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, IMP
, INR
, IQD
, IRR
, ISK
, JEP
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KID
, KMF
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRU
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLE
, SLL
, SOS
, SRD
, SSP
, STN
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TVD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VES
, VND
, VUV
, WST
, XAF
, XCD
, XDR
, XOF
, XPF
, YER
, ZAR
, ZMW
, ZWL
Is Subscription
Subscription Details
Start Time [DD-MM-YYYY]
End Time [DD-MM-YYYY]
Repeat in value, Frequency of the repetition
Repeat type, Entity of the repetition
days
, weeks
, months
, years
Convert Document. Needed only when the document is already created and you want to convert it to another document
curl --request POST \
--url https://app.getswipe.in/api/partner/v2/doc \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"document_type": "invoice",
"document_date": "15-11-2024",
"party": {
"id": "CUST123",
"type": "customer",
"name": "John Doe",
"due_date": "15-11-2024"
},
"items": [
{
"id": "ITEM123455667ghg",
"name": "Item Namgergggree",
"quantity": 1,
"unit_price": 200,
"tax_rate": 18,
"price_with_tax": 236,
"net_amount": 200,
"total_amount": 236,
"item_type": "Product"
}
]
}'