Get Started
Document V2
Payment V2
Customer V2
Vendor V2
Product V2
Subscriptions V2
Utility V2
Get a document
curl --request GET \
--url https://app.getswipe.in/api/partner/v2/doc/{doc_hash_id} \
--header 'Authorization: <api-key>'
{
"success": true,
"message": "Details Fetched",
"error_code": "",
"errors": {},
"data": {
"invoice_details": {
"serial_number": "INV-12",
"document_type": "invoice",
"document_date": "11-06-2024",
"party": {
"id": "CUST123",
"type": "customer",
"name": "John Doe",
"country_code": "91",
"phone_number": "1234567890",
"company_name": "Company Name",
"email": "johndoe@example.com",
"gstin": "27AARCS7202C1ZD",
"shipping_address": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"billing_address": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
}
},
"due_date": "11-06-2024",
"amount_paid": 28,
"amount_pending": 90,
"reference": "<string>",
"notes": "<string>",
"terms": "<string>",
"items": [
{
"id": "ITEM123",
"name": "Item Name",
"quantity": 1,
"unit_price": 100,
"tax_rate": 18,
"price_with_tax": 118,
"net_amount": 100,
"total_amount": 118,
"discount_percent": 10,
"discount_amount": 10,
"description": "Item Description",
"hsn_code": "1234",
"item_type": "Product",
"unit": "kg",
"category": "Electronics",
"custom_columns": [
{
"label": "Custom Field 1",
"value": "Value 1"
}
]
}
],
"is_created_by_recurring": 0,
"net_amount": 100,
"hash_id": "<string>",
"payment_status": "paid",
"payments": [
{
"amount": 100,
"method": "upi",
"notes": "Payment notes",
"bank_details": {
"account_number": "1234567890",
"ifsc": "SBIN0000001",
"bank_name": "State Bank of India",
"branch": "Mumbai"
}
}
],
"tax_amount": 18,
"total_amount": 118,
"total_discount": 100
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The hash id of the document to be fetched
Response
Success flag
true
Message
"Details Fetched"
Error code
""
Error details
Invoice number assigned to document
"INV-12"
Document type
"invoice"
Transaction date [DD-MM-YYYY]
"11-06-2024"
Party Details for the document
Unique id for each party.
"CUST123"
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
"customer"
Name of the Party
"John Doe"
Party Phone Number Country code
"91"
Party Phone Number
"1234567890"
Company Name
"Company Name"
Party Email
"johndoe@example.com"
GSTIN
"27AARCS7202C1ZD"
Party shipping to Address, refer Shipping Address Object for parameters
Address ID. Value should be n >= 0 and n <= 999999, It will automatically update the existing address if the address ID already exists.
-1
Address Line 1
"123 Street"
Address Line 2
"Apt 4B"
City
"City Name"
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
"State Name"
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
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
"Country Name"
Pincode
"123456"
Party billing to Address, refer Shipping Address Object for parameters
Address ID. Value should be n >= 0 and n <= 999999, It will automatically update the existing address if the address ID already exists.
-1
Address Line 1
"123 Street"
Address Line 2
"Apt 4B"
City
"City Name"
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
"State Name"
Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
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
"Country Name"
Pincode
"123456"
Transaction date [DD-MM-YYYY]
"11-06-2024"
Amount Paid for the document
28
Remaining amount to be paid for the document
90
Reference Text
Notes for the document
Terms and Conditions
List of items in the document
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
"ITEM123"
Name of the Product
"Item Name"
Quantity
1
Price per item without Tax
100
Price per item with Tax
118
Net Amount
100
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.
118
Product or Service enum
Product
, Service
"Product"
Tax percentage for each item . Only valid tax rates are accepted
18
Discount Percent
10
Discount Amount, will be ignored if discount_percent is provided
10
Item Description
"Item Description"
HSN Code. HSN Code can only be of length 4,6 & 8
"1234"
Item quantity unit. You can find the GST-approved units in the UQC Codes section at: https://einvoice1.gst.gov.in/Others/MasterCodes.
"kg"
Category
"Electronics"
Is the invoice created from subscriptions
0
Net amount of the transaction
100
Hash id for the document
Payment status of the document
paid
, pending
, cancelled
"paid"
List of payments recorded for this document
Payment Amount
100
Payment method, use only specified values
cash
, card
, upi
, netBanking
, cheque
, emi
"upi"
Any internal notes for payment
"Payment notes"
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. It will link document payments to your company bank details.
Account Number
"1234567890"
IFSC Code
"SBIN0000001"
Bank Name
"State Bank of India"
Branch
"Mumbai"
Tax amount of the transaction
18
Total amount of the transaction
118
Discount given on this document
100
curl --request GET \
--url https://app.getswipe.in/api/partner/v2/doc/{doc_hash_id} \
--header 'Authorization: <api-key>'
{
"success": true,
"message": "Details Fetched",
"error_code": "",
"errors": {},
"data": {
"invoice_details": {
"serial_number": "INV-12",
"document_type": "invoice",
"document_date": "11-06-2024",
"party": {
"id": "CUST123",
"type": "customer",
"name": "John Doe",
"country_code": "91",
"phone_number": "1234567890",
"company_name": "Company Name",
"email": "johndoe@example.com",
"gstin": "27AARCS7202C1ZD",
"shipping_address": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"billing_address": {
"addr_id": -1,
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
}
},
"due_date": "11-06-2024",
"amount_paid": 28,
"amount_pending": 90,
"reference": "<string>",
"notes": "<string>",
"terms": "<string>",
"items": [
{
"id": "ITEM123",
"name": "Item Name",
"quantity": 1,
"unit_price": 100,
"tax_rate": 18,
"price_with_tax": 118,
"net_amount": 100,
"total_amount": 118,
"discount_percent": 10,
"discount_amount": 10,
"description": "Item Description",
"hsn_code": "1234",
"item_type": "Product",
"unit": "kg",
"category": "Electronics",
"custom_columns": [
{
"label": "Custom Field 1",
"value": "Value 1"
}
]
}
],
"is_created_by_recurring": 0,
"net_amount": 100,
"hash_id": "<string>",
"payment_status": "paid",
"payments": [
{
"amount": 100,
"method": "upi",
"notes": "Payment notes",
"bank_details": {
"account_number": "1234567890",
"ifsc": "SBIN0000001",
"bank_name": "State Bank of India",
"branch": "Mumbai"
}
}
],
"tax_amount": 18,
"total_amount": 118,
"total_discount": 100
}
}
}