Documents

Get Document.

get

Sample request:

GET /api/documents/v1/document/6588000000009998/89d6c2f6-3ea9-45bc-9a32-e33059a72328

Authorization:

This endpoint requires the value sent in the MerchantId header to match the MerchantNumber in the URL.
Path parameters
merchantNumberstringRequired

Merchant number of the merchant to retrieve the document for.

documentIdstring · uuidRequired

Document ID of the document to be retrieved.

Responses
200
Returns the document as a file stream.
get
GET /api/documents/v1.0/document/{merchantNumber}/{documentId} HTTP/1.1
Host: 
Accept: */*

No content

Get Document Types.

get

Sample request:

GET /api/documents/v1/document/6588000000009998/DocumentTypes

Authorization:

This endpoint requires the value sent in the MerchantId header to match the MerchantNumber in the URL.
Path parameters
merchantNumberstringRequired
Responses
200
Returns a list of document types.
application/json
get
GET /api/documents/v1.0/document/{merchantNumber}/DocumentTypes HTTP/1.1
Host: 
Accept: */*
{
  "types": [
    {
      "id": 4,
      "name": "Merchant Statements",
      "description": "Merchant Statements"
    }
  ]
}

Get Documents By Type.

get

Sample request:

GET /api/documents/v1/document/6588000000009998/Documents?documentTypeId=4

or

GET /api/documents/v1/document/6588000000009998/Documents?documentTypeName=Merchant%20Statements

Authorization:

This endpoint requires the value sent in the MerchantId header to match the MerchantNumber in the URL.

The set of allowed DocumentTypeIds and DocumentTypeNames can be retrieved from the Get Document Types endpoint. Please note that DocumentTypeName will need to be URL Encoded before being included in this request.

Path parameters
merchantNumberstringRequired

Merchant number to get documents for.

Query parameters
documentTypeIdstringOptional

Document type ID to search by. Either this value or Document Type Name must be included in the request.

documentTypeNamestringOptional

Document type name to search by. Either this value or Document Type ID must be included in the request.

Responses
200
Returns a list of documents filtered by type.
application/json
get
GET /api/documents/v1.0/document/{merchantNumber}/Documents HTTP/1.1
Host: 
Accept: */*
{
  "documents": [
    {
      "documentId": "89d6c2f6-3ea9-45bc-9a32-e33059a72328",
      "merchantNumber": "6588000000009998",
      "name": "stmt_20220831_6588000000009998.pdf",
      "description": "Includes statements from March of 2022.",
      "category": {
        "id": 4,
        "name": "Merchant Statements",
        "description": "Merchant Statements"
      },
      "additionalProperties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "documentURL": "https://reporting.clearent.net/api/documents/v1.0/document/6588000000009998/89d6c2f6-3ea9-45bc-9a32-e33059a72328"
    }
  ]
}

Get Statements by Year.

get

Sample request:

GET /api/documents/v1/document/6588000000009998/Statements/2022

Authorization:

This endpoint requires the value sent in the MerchantId header to match the MerchantNumber in the URL.
Path parameters
merchantNumberstringRequired

Merchant number to get documents for.

yearstringRequired

Year to retrieve statements from.

Responses
200
Returns a list of statements for the given year.
get
GET /api/documents/v1.0/document/{merchantNumber}/Statements/{year} HTTP/1.1
Host: 
Accept: */*
{
  "documents": [
    {
      "documentId": "89d6c2f6-3ea9-45bc-9a32-e33059a72328",
      "merchantNumber": "6588000000009998",
      "name": "stmt_20220831_6588000000009998.pdf",
      "description": "Includes statements from March of 2022.",
      "category": {
        "id": 4,
        "name": "Merchant Statements",
        "description": "Merchant Statements"
      },
      "additionalProperties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "documentURL": "https://reporting.clearent.net/api/documents/v1.0/document/6588000000009998/89d6c2f6-3ea9-45bc-9a32-e33059a72328"
    }
  ]
}

Get Statements by Year and Month.

get

Sample request:

GET /api/documents/v1/document/6588000000009998/Statements/2022/08

Authorization:

This endpoint requires the value sent in the MerchantId header to match the MerchantNumber in the URL.
Path parameters
merchantNumberstringRequired

Merchant number to get documents for.

yearstringRequired

Year to retrieve statements from.

monthstringRequired

Month to retrieve statements from.

Responses
200
Returns a list of statements for the given year and month.
get
GET /api/documents/v1.0/document/{merchantNumber}/Statements/{year}/{month} HTTP/1.1
Host: 
Accept: */*
{
  "documents": [
    {
      "documentId": "89d6c2f6-3ea9-45bc-9a32-e33059a72328",
      "merchantNumber": "6588000000009998",
      "name": "stmt_20220831_6588000000009998.pdf",
      "description": "Includes statements from March of 2022.",
      "category": {
        "id": 4,
        "name": "Merchant Statements",
        "description": "Merchant Statements"
      },
      "additionalProperties": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "documentURL": "https://reporting.clearent.net/api/documents/v1.0/document/6588000000009998/89d6c2f6-3ea9-45bc-9a32-e33059a72328"
    }
  ]
}

Was this helpful?