GET
/
v2
/
doc
/
{doc_hash_id}
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

Authorization
string
header
required

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

Path Parameters

doc_hash_id
string
required

The hash id of the document to be fetched

Response

200
application/json
Success
success
boolean

Success flag

Example:

true

message
string

Message

Example:

"Details Fetched"

error_code
string

Error code

Example:

""

errors
object

Error details

data
object