API Test keys

API Test keys

Fetch Document Content

POST
/v1/documents/:id/content

Click to copy

Use this endpoint to download an earlier uploaded document.

Is this page helpful?

Curl

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
2
-X GET https://api.razorpay.com/v1/documents/:id/content

Failure

1
{
2
"error":{
3
"status_code": 401,
4
"description":"The API `<key/secret>` provided is invalid.",
5
"code":"BAD_REQUEST_ERROR"
6
}
7
}
Path Parameters
id

*

string

The unique identifier of the document.

Errors

The API <key/secret> provided is invalid.

Error Status: 400

The API credentials passed in the API call differ from the ones generated on the Dashboard.

  • Different keys for test mode and live modes.
  • Expired API key.

Solution

_id is not a valid id.

Error Status: 400

  • The id is not 14 characters long.
  • The id is not alphanumeric.

Solution

Fetch Document Content

POST
/v1/documents/:id/content

Click to copy

Use this endpoint to download an earlier uploaded document.

Is this page helpful?

Path Parameters
id

*

string

The unique identifier of the document.

Errors

The API <key/secret> provided is invalid.

Error Status: 400

The API credentials passed in the API call differ from the ones generated on the Dashboard.

  • Different keys for test mode and live modes.
  • Expired API key.

Solution

_id is not a valid id.

Error Status: 400

  • The id is not 14 characters long.
  • The id is not alphanumeric.

Solution

Curl

1
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
2
-X GET https://api.razorpay.com/v1/documents/:id/content

Failure

1
{
2
"error":{
3
"status_code": 401,
4
"description":"The API `<key/secret>` provided is invalid.",
5
"code":"BAD_REQUEST_ERROR"
6
}
7
}