POST
/
pg
/
orders
/
{order_id}
/
documents
/
Upload Document
curl --request POST \
  --url https://api-pacb-uat.eximpe.com/pg/orders/{order_id}/documents/ \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Client-ID: <api-key>' \
  --header 'X-Client-Secret: <api-key>' \
  --form identifier=INV_EDU_20241205 \
  --form document_type=invoice \
  --form file=@example-file
{
  "success": true,
  "message": "Documents uploaded successfully",
  "data": {
    "order_id": "OD9411897512",
    "reference_id": "TEST_FOB46D",
    "amount": 1000,
    "currency": "INR",
    "mop_type": "UPI",
    "buyer": {
      "name": "Vikash Gupta",
      "email": "[email protected]",
      "phone": "+919456789012",
      "address": {
        "line_1": "C-45, Sector 62, Institutional Area",
        "line_2": "Near Metro Station",
        "city": "Noida",
        "state": "Uttar Pradesh",
        "postal_code": "201309"
      },
      "pan_number": "ABCPV1234G",
      "dob": "1987-03-15"
    },
    "product": {
      "name": "Complete Python Programming Course Bundle",
      "description": "Comprehensive online course with 50+ hours of content, projects, and certification",
      "hs_code": "49019900",
      "hs_code_description": "Printed books, brochures, leaflets and similar printed matter",
      "type_of_goods": "services"
    },
    "invoice": {
      "number": "IN1123213",
      "date": "2025-06-22",
      "file": "https://eximpe.com/inv-12312312.pdf"
    },
    "air_waybills": [
      {
        "number": "AWB-23343",
        "file": "https://eximpe.com/awb-8F3F51D2.pdf"
      }
    ],
    "payments": [
      {
        "payment_id": "PR1469384681",
        "mop_type": "UPI",
        "status": "captured",
        "status_message": null,
        "settlement": {
          "status": "ready_for_settlement",
          "message": null,
          "settlement_details": null
        },
        "created_at": "2025-06-23T10:44:14.344135Z"
      }
    ],
    "status": "payment_successful",
    "status_message": "Payment captured successfully",
    "created_at": "2025-06-23T10:44:11.702363Z"
  }
}

Overview

The Upload Invoice endpoint is used to attach required documents to an order after it has been created. This is crucial for compliance and record-keeping. The request must be sent as multipart/form-data. This endpoint allows you to upload a document (like an invoice or air waybill), associated with an existing order.

Authorizations

X-Client-ID
string
header
required

Client app ID. You can find your app id in the merchant dashboard.

X-Client-Secret
string
header
required

Client secret key. You can find your secret in the merchant dashboard.

Path Parameters

order_id
string
required

Unique identifier of the order

Body

multipart/form-data

Document upload request. The body must be multipart/form-data.

identifier
string
required

Identifier for the document (e.g., order ID)

document_type
string
required

Type of document invoice or awb

file
file
required

The file to upload

Response

Document uploaded successfully

success
boolean
required

Indicates if the document upload was successful

message
string
required

Response message

data
object
required