---
title: "Get legal document by Id"
method: GET
path: "/api/legaldocuments/v2/documents/{merchantNumber}/{legalDocumentId}"
tags: ["LegalDocuments"]
---

# Get legal document by Id

`GET /api/legaldocuments/v2/documents/{merchantNumber}/{legalDocumentId}`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow/docs/api/legaldocuments/v2/documents/:merchantNumber/:legalDocumentId/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a specific legal document for the given merchant using the unique legal document ID.

## Path parameters

- `merchantNumber` string, required
- `legalDocumentId` integer, required

## Response `200`

Returns a list of the legal documents that have been provided for a specific merchant.

- LegalDocument
  - `legalDocumentId` integer: A unique ID of a specific legal document. A new value is generated by the backend when a document is initially created.
  - `legalDocumentTypeName` string, nullable: A name or identifier for the legal document. Consistent across environment used when interacting with signatures. Potential values can be retrieved via the Get Legal Document Settings endpoint.
  - `content` SignatureAgreement[], required: Contains the list of signatures for this legal document. All signatures shown as required when retrieving the legal document from the Get Legal Document Settings endpoint.
    - `ipAddress` string, nullable: The IP Address of the user who providing the signature. Required if SignatureSourceTypeId indicates signatures were collected via an online form.
    - `timestamp` string, date-time, nullable: The UTC time when the signature was provided. Required if SignatureSourceTypeId indicates signatures were collected via an online form.
    - `signatureSourceTypeId` 1 | 2 | 3, required: Source type of the signature.
    - `signatureSectionTypeId` integer, required: Indicates which signature section is being provided. Values can be retrieved from the Get Legal Document Settings endpoint.
    - `signerViewedLegalText` boolean, required: Indicates affirmation that the signer was shown the legal text.
    - `businessContactId` integer, required: A business contact identification of the signer. Can be retrieved from the Get Business Contacts endpoint; also returned when creating or updating a Business Contact.
    - `documentId` string, uuid, nullable: An identification of the document where the signature was provided. Required if the signature source is an uploaded document. Can be retrieved via the Get Documents By MerchantNumber endpoint; also returned when creating or updating a Business Contact.
  - `modifyDateTimeUtc` string, date-time, nullable: UTC timestamp indicating when the legal document was last modified.

## Other responses

- `400`: If merchant number is null or empty.
- `404`: Legal documents not found.
- `500`: Error occurred retrieving data.

---

[API](https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow.md) - [All operations](https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow/llms.txt) - [OpenAPI document](https://skmtc.dev/xplorpay/apis/external-us-onboarding-workflow/revisions/f37077c24b66?raw)
