top of page

Download Signed Agreement

GET /applications/{application}/download-agreement

Environment and operation

Use this endpoint contract with the account and environment assigned to your integration. Values in angle brackets are placeholders. This reference does not execute requests. Documented server https://sandbox.signup.nmi.com/api/v1 https://secure.nmi.com/api/v5/signup Schema reference: field definitions do not include every behavioral rule. Follow the workflow guidance and account prerequisites for this operation before submitting requests.

Request route

This endpoint downloads the signed agreement for the application. The agreement can only be downloaded after the application is submitted. **Required scope:** `applications:read` GET /applications/{application}/download-agreement Security scheme Type Credential location Scopes oauth oauth2 applications:read

Request language templates

Original transport templates derived from this endpoint’s documented method, server, authentication and media type. Replace path/query/credential placeholders with authorized sandbox values. These examples print the raw status and response; they do not infer business success or retry a request. Node requires a runtime with fetch; PHP requires cURL. Generated source-based examples have not been executed against provider accounts. curl --request GET \ --url 'https://sandbox.signup.nmi.com/api/v1/applications/{application}/download-agreement' \ --header 'Authorization: Bearer <access-token>' const response = await fetch("https://sandbox.signup.nmi.com/api/v1/applications/{application}/download-agreement", { method: 'GET', headers: { "Authorization": "Bearer <access-token>" } }); console.log(response.status, await response.text()); from urllib.request import Request, urlopen from urllib.error import HTTPError request = Request('https://sandbox.signup.nmi.com/api/v1/applications/{application}/download-agreement', method='GET', headers={'Authorization': 'Bearer <access-token>'}) try: with urlopen(request, timeout=30) as response: print(response.status, response.read().decode()) except HTTPError as error: print(error.code, error.read().decode()) require 'net/http' require 'uri' uri = URI("https://sandbox.signup.nmi.com/api/v1/applications/{application}/download-agreement") request = Net::HTTP::Get.new(uri) request["Authorization"] = "Bearer <access-token>" response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https', read_timeout: 30) { |http| http.request(request) } puts response.code puts response.body <?php $curl = curl_init('https://sandbox.signup.nmi.com/api/v1/applications/{application}/download-agreement'); curl_setopt_array($curl, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => ['Authorization: Bearer <access-token>'] ]); $response = curl_exec($curl); if ($response === false) { throw new RuntimeException(curl_error($curl)); } echo curl_getinfo($curl, CURLINFO_HTTP_CODE), PHP_EOL, $response; curl_close($curl);

Path and query parameters

Required flags apply to the parameter itself. Additional limits and enum values appear in the contract below. Parameter Location Required Type Description application path true See schema The ID of the created application [ { "name": "application", "in": "path", "description": "The ID of the created application", "required": true, "schema": { "$ref": "#/components/schemas/application-id" } } ] true

Responses

Match the HTTP status to its response schema below. For financial operations, also inspect the payment outcome before updating your order or retrying. HTTP status Media type Meaning 200 application/octet-stream PDF file 404 application/json Error response for resource not found 422 application/json Validation error { "200": { "description": "PDF file", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary", "maxLength": 104857600, "description": "The agreement file in binary form." }, "examples": { "sample-file": { "$ref": "#/components/examples/sample-agreement" } } } } }, "404": { "description": "Error response for resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code", "maxLength": 100 }, "message": { "type": "string", "description": "Error message", "maxLength": 10000 } } }, "examples": { "not-found": { "summary": "Resource Not Found", "description": "The resource cannot be found", "value": { "code": "NOT_FOUND", "message": "Resource not found" } } } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/validation-error" }, "examples": { "sample-error": { "summary": "Invalid Request", "description": "Error when attempting to download the agreement before the application is submitted", "value": { "code": "VALIDATION_ERROR", "message": "Application wasn't submitted yet.", "errors": [] } } } } } } } true

Response fields · 404 · application/json

Field Type Required Description Constraints code string no Error code maxLength: 100 message string no Error message maxLength: 10000

Response fields · 422 · application/json

Field Type Required Description Constraints code string no Error code maxLength: 1000 message string no Error message maxLength: 1000 errors array no

Referenced schema definitions

References beginning with #/components resolve to these definitions. These are field contracts, not example payment values. Use the applicable variant, required fields and constraints. { "securitySchemes": { "oauth": { "type": "oauth2", "flows": { "clientCredentials": { "tokenUrl": "/oauth/token", "scopes": { "*": "Full access", "packages:read": "Read packages information", "applications:read": "Read access to applications", "applications:write": "Write access to applications", "subscriptions:read": "Read access to subscriptions", "subscriptions:write": "Write access to subscriptions (subscribe/updated/delete)" } } } } }, "schemas": { "application-id": { "type": "string", "description": "The unique identifier of the application.", "pattern": "^app_[a-f0-9]{16}$", "minLength": 20, "maxLength": 20 }, "validation-error": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code", "maxLength": 1000 }, "message": { "type": "string", "description": "Error message", "maxLength": 1000 }, "errors": { "type": "array", "maxItems": 10, "items": { "type": "string", "description": "The error message", "maxLength": 1000 } } } }, "event-types": { "type": "string", "enum": [ "application.updated.data.requested", "application.approved", "application.declined", "application.cancelled", "application.merchant.closed", "application.merchant.boarded", "merchant.chargeback.added", "merchant.deposit.new", "merchant.first-batch", "merchant.processing.start", "merchant.processing.stop", "merchant.residuals.published", "merchant.retrieval.added", "merchant.statement.new" ], "example": "application.merchant.boarded" } }, "responses": { "error-not-found": { "description": "Error response for resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code", "maxLength": 100 }, "message": { "type": "string", "description": "Error message", "maxLength": 10000 } } }, "examples": { "not-found": { "summary": "Resource Not Found", "description": "The resource cannot be found", "value": { "code": "NOT_FOUND", "message": "Resource not found" } } } } } } }, "examples": { "sample-agreement": { "summary": "Sample of the PDF file content", "description": "PDF file content", "value": "%PDF-1.3\n%?????????\n3 0 obj\n<< /Filter /FlateDecode /Length 11 >>\nstream\nx+??\nendstream\nendobj\n1 0 obj\n<< /Type /Page /Parent 2 0 R /Resources 4 0 R /Contents 3 0 R /MediaBox [0 0 595 842]\n>>\nendobj\n4 0 obj\n<< /ProcSet [ /PDF ] >>\nendobj\n2 0 obj\n<< /Type /Pages /MediaBox [0 0 595 842] /Count 1 /Kids [ 1 0 R ] >>\nendobj\n5 0 obj\n<< /Type /Catalog /Pages 2 0 R >>\nendobj\n6 0 obj\n<< /Title (test) /Producer (macOS Version 15.3.1 \\(Build 24D70\\) Quartz PDFContext)\n/Creator (TextEdit) /CreationDate (D:20250310181026Z00'00') /ModDate (D:20250310181026Z00'00')\n>>\nendobj\nxref\n0 7\n0000000000 65535 f\n0000000104 00000 n\n0000000247 00000 n\n0000000022 00000 n\n0000000208 00000 n\n0000000330 00000 n\n0000000379 00000 n\ntrailer\n<< /Size 7 /Root 5 0 R /Info 6 0 R /ID [ <86610b3021f3bffa0135d876941bfa71>\n<86610b3021f3bffa0135d876941bfa71> ] >>\nstartxref\n576\n%%EOF\n" } } } true

Integration checks

Validate the request against its selected schema before submission. Keep secrets outside browser code. Test permitted and denied account access, validation failures and interrupted responses in the sandbox. Account-management or messaging operations require the corresponding partner access and intended recipient context.

Join the community and get the latest biz news & tips

Thanks for submitting!

© 2025 Betterpay. All Rights Reserved.

bottom of page