{"info":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","description":"<html><head></head><body><p>IMPORTANT: Set the <code>apiKey</code> collection variable to your API key before running any request in this collection -- every request will fail with 403 Forbidden until you do.</p>\n<p>Once you have been given rights to generate api keys you can go to <a href=\"https://acme.midmetrics.io/Home/About\">https://{{YourEnterpriseName}}.midmetrics.io/Home/About</a> to create a new key. You will then need to email your account manager to request specific rights for that key. Or email <a href=\"https://mailto:service@midmetrics.com\">service@midmetrics.com</a> for your rights. Once you get your secret apikey, and it is granted rights you can use it in the Authorization header with \"Basic \" (without quotes).</p>\n<p>**This is implementing HTTP Basic Authortization described in RFC 7617 <a href=\"https://datatracker.ietf.org/doc/html/rfc7617\">https://datatracker.ietf.org/doc/html/rfc7617</a></p>\n<p>Sandbox endpoints at sandbox.midmetrics.io (or test.midmetrics.io).</p>\n<p>Authentication: set the <code>apiKey</code> collection variable to your raw API key value. The collection sends <code>Authorization: Basic </code> on every request.</p>\n<p>All responses come from static sample data — no database writes ever occur in the sandbox.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"18609562","collectionId":"c41b625a-4418-4bb3-9d32-e64fa34471fe","publishedId":"2sBYAuSBQK","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-08-28T16:57:37.000Z"},"item":[{"name":"Representments API","item":[{"name":"GetDocumentTypes","id":"c614aa3a-ae4f-4b31-9997-1f77f46593b4","request":{"method":"GET","header":[],"url":"/api/chargeback/GetDocumentTypes","description":"<p>Returns the list of document type categories and types available for representment uploads in your enterprise (sample data returned here not representative).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","chargeback","GetDocumentTypes"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"dc54d7e0-ba32-454d-b90e-ec1422c36b1a","name":"Example","originalRequest":{"method":"GET","header":[],"url":"/api/chargeback/GetDocumentTypes","description":"Returns the list of document type categories and types available for representment uploads in your enterprise (sample data returned here not representative)."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\r\n  \"DocumentTypes\": [\r\n    {\r\n      \"Category\": \"Order Documents\",\r\n      \"DocumentTypes\": [\r\n        {\r\n          \"DocumentType\": \"Customer Service Records\"\r\n        },\r\n        {\r\n          \"DocumentType\": \"Signed Contract\"\r\n        },\r\n        {\r\n          \"DocumentType\": \"Invoice\"\r\n        },\r\n        {\r\n          \"DocumentType\": \"Transaction History\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"Category\": \"Proof Of Delivery\",\r\n      \"DocumentTypes\": [\r\n        {\r\n          \"DocumentType\": \"Shipping Provider Proof\"\r\n        },\r\n        {\r\n          \"DocumentType\": \"Fulfillment\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"Category\": \"Other Document\",\r\n      \"DocumentTypes\": [\r\n        {\r\n          \"DocumentType\": \"Other\"\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}"}],"_postman_id":"c614aa3a-ae4f-4b31-9997-1f77f46593b4"},{"name":"GetEnterpriseParameters","id":"d464c2a5-06b4-4e90-b35c-5672a40dbbb5","request":{"method":"GET","header":[],"url":"/api/chargeback/GetEnterpriseParameters","description":"<p>Returns active custom dispute parameter types (grouped by business category) and document types (with IDs) for use in UpdateRepresentment for your enterprise (sample data returned here).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","chargeback","GetEnterpriseParameters"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"3ae7e323-db64-47f4-aaad-a44b76267434","name":"Example","originalRequest":{"method":"GET","header":[],"url":"/api/chargeback/GetEnterpriseParameters","description":"Returns active custom dispute parameter types (grouped by business category) and document types (with IDs) for use in UpdateRepresentment for your enterprise (sample data returned here)."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\r\n  \"CustomDisputeParameters\": [\r\n    {\r\n      \"BusinessCategory\": \"All\",\r\n      \"CustomParameters\": [\r\n        {\r\n          \"Id\": 12,\r\n          \"Name\": \"ReturnPolicyUrl\",\r\n          \"DataType\": \"string\",\r\n          \"EnumValues\": null\r\n        },\r\n        {\r\n          \"Id\": 14,\r\n          \"Name\": \"ShipmentCarrier\",\r\n          \"DataType\": \"enum\",\r\n          \"EnumValues\": \"UPS,FedEx,USPS,DHL\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"BusinessCategory\": \"Travel\",\r\n      \"CustomParameters\": [\r\n        {\r\n          \"Id\": 20,\r\n          \"Name\": \"FlightNumber\",\r\n          \"DataType\": \"string\",\r\n          \"EnumValues\": null\r\n        }\r\n      ]\r\n    }\r\n  ],\r\n  \"DocumentTypes\": [\r\n    {\r\n      \"Category\": \"Proof of Delivery\",\r\n      \"DocumentTypes\": [\r\n        {\r\n          \"Id\": 3,\r\n          \"DocumentType\": \"Signed Delivery Receipt\",\r\n          \"Tooltip\": \"Carrier signature confirmation\",\r\n          \"WhereToFindData\": \"Carrier portal or tracking email\"\r\n        }\r\n      ]\r\n    },\r\n    {\r\n      \"Category\": \"Terms\",\r\n      \"DocumentTypes\": [\r\n        {\r\n          \"Id\": 7,\r\n          \"DocumentType\": \"Terms and Conditions\",\r\n          \"Tooltip\": null,\r\n          \"WhereToFindData\": null\r\n        }\r\n      ]\r\n    }\r\n  ]\r\n}"}],"_postman_id":"d464c2a5-06b4-4e90-b35c-5672a40dbbb5"},{"name":"UploadDocument","id":"2369eed8-6a0e-455f-b14b-88d2dd2837fe","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"ChargebackId\": 12345,\n  \"ProcessorCaseId\": \"CB-2024-001\",\n  \"ImageContent\": \"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK\",\n  \"ImageContentName\": \"receipt.pdf\",\n  \"DocumentType\": \"Receipt\",\n  \"Title\": \"Purchase Receipt\",\n  \"Notes\": \"Original transaction receipt\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/chargeback/uploaddocument","description":"<p>Uploads a Base64-encoded document and attaches it to a chargeback's draft representment.</p>\n<p>Required: ImageContent (Base64), ImageContentName (filename with extension).\nIdentify the chargeback with ChargebackId OR ProcessorCaseId.\nAllowed extensions: .pdf .jpg .jpeg .png .gif .bmp</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","chargeback","uploaddocument"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"cde8374a-f867-4c76-97e6-593aa650d578","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"ChargebackId\": 12345,\n  \"ProcessorCaseId\": \"CB-2024-001\",\n  \"ImageContent\": \"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoK\",\n  \"ImageContentName\": \"receipt.pdf\",\n  \"DocumentType\": \"Receipt\",\n  \"Title\": \"Purchase Receipt\",\n  \"Notes\": \"Original transaction receipt\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/chargeback/uploaddocument","description":"Uploads a Base64-encoded document and attaches it to a chargeback's draft representment.\n\nRequired: ImageContent (Base64), ImageContentName (filename with extension).\nIdentify the chargeback with ChargebackId OR ProcessorCaseId.\nAllowed extensions: .pdf .jpg .jpeg .png .gif .bmp"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"\"File uploaded successfully.\""}],"_postman_id":"2369eed8-6a0e-455f-b14b-88d2dd2837fe"},{"name":"SubmitRepresentment","id":"902d7e8e-4409-4e67-a4e1-87add664e3b9","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"ProcessorCaseId","value":"CB-2024-001","type":"text","description":"<p>Required. The processor case ID of the chargeback.</p>\n"},{"key":"MidMetricsId","value":"12345","type":"text","description":"<p>Required. The MidMetrics internal chargeback ID.</p>\n"},{"key":"TrackingNumber","value":"1Z999AA10123456784","type":"text","description":"<p>Optional. Shipment tracking number.</p>\n"},{"key":"file","type":"file","description":"<p>Required. PDF representment document (Content-Type: application/pdf).</p>\n","src":[]}]},"url":"/api/chargeback/SubmitRepresentment","description":"<p>Submits a pre-built representment PDF for a chargeback.</p>\n<p>Content-Type: multipart/form-data.\nRequired fields: ProcessorCaseId, MidMetricsId, and a PDF file part.\nOptional: TrackingNumber (triggers Shippo lookup in production).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","chargeback","SubmitRepresentment"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"40551aaa-3260-4d99-b20a-55554ecc9b35","name":"Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"ProcessorCaseId","value":"CB-2024-001","type":"text","description":"Required. The processor case ID of the chargeback."},{"key":"MidMetricsId","value":"12345","type":"text","description":"Required. The MidMetrics internal chargeback ID."},{"key":"TrackingNumber","value":"1Z999AA10123456784","type":"text","description":"Optional. Shipment tracking number."},{"key":"file","type":"file","description":"Required. PDF representment document (Content-Type: application/pdf).","src":[]}]},"url":"/api/chargeback/SubmitRepresentment","description":"Submits a pre-built representment PDF for a chargeback.\n\nContent-Type: multipart/form-data.\nRequired fields: ProcessorCaseId, MidMetricsId, and a PDF file part.\nOptional: TrackingNumber (triggers Shippo lookup in production)."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\r\n  \"ProcessorId\": \"CB-2024-001\",\r\n  \"TrackingNumber\": \"1Z999AA10123456784\",\r\n  \"BytesSaved\": 24576,\r\n  \"Message\": \"Representment queued for submission\"\r\n}"}],"_postman_id":"902d7e8e-4409-4e67-a4e1-87add664e3b9"},{"name":"UpdateRepresentment","id":"d483f7a6-34cd-4389-bedb-12902ff0583e","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"data","value":"{\n  \"MidMetricsId\": 12345,\n  \"ProcessorCaseId\": \"CB-2024-001\",\n  \"SubmitResult\": true,\n  \"Representment\": {\n    \"OrderInfo\": {\n      \"TrackingNumber\": \"1Z999AA10123456784\",\n      \"BillingContact\": {\n        \"FirstName\": \"Jane\",\n        \"LastName\": \"Doe\",\n        \"Email\": \"jane.doe@example.com\"\n      },\n      \"ShippingContact\": {\n        \"FirstName\": \"Jane\",\n        \"LastName\": \"Doe\",\n        \"Address1\": \"123 Main St\",\n        \"City\": \"Springfield\",\n        \"State\": \"IL\",\n        \"PostalCode\": \"62701\",\n        \"Country\": \"US\"\n      },\n      \"Products\": [\n        { \"ProductName\": \"Widget Pro\", \"Quantity\": 1, \"UnitPrice\": 99.99 }\n      ]\n    },\n    \"RepresentmentTransactionInfo\": {\n      \"AuthCode\": \"ABC123\"\n    },\n    \"CustomDisputeValues\": [\n      { \"ParameterId\": 1, \"ParameterValue\": \"1Z999AA10123456784\" }\n    ],\n    \"Documents\": [\n      { \"Key\": \"doc1\", \"Title\": \"Delivery Confirmation\", \"Notes\": \"Carrier confirmation\", \"DocumentType_Id\": 20 }\n    ]\n  }\n}","type":"text","description":"<p>Required. JSON payload. Identify the chargeback with MidMetricsId or ProcessorCaseId (or both). Omit fields to leave them unchanged; include null to clear.</p>\n"},{"key":"doc1","type":"file","description":"<p>Optional file part - key must match a Documents[].Key value in the data payload.</p>\n","src":[]}]},"url":"/api/chargeback/UpdateRepresentment","description":"<h3 id=\"updaterepresentment\">UpdateRepresentment</h3>\n<p>Updates representment data and/or attaches supporting documents for an existing chargeback.\nThe raw request payload is archived to blob storage (<code>{tenant}-representmentupdates</code>) for auditing.</p>\n<h4 id=\"authentication\">Authentication</h4>\n<p>Standard Service API key — same header as all other <code>api/chargeback</code> endpoints.</p>\n<h4 id=\"request\">Request</h4>\n<p><strong>Content-Type:</strong> <code>multipart/form-data</code></p>\n<p>The request has two kinds of parts:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Part name</th>\n<th>Content-Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data</code></td>\n<td><code>application/json</code></td>\n<td>Yes</td>\n<td>JSON payload (structure below)</td>\n</tr>\n<tr>\n<td><em>{key}</em></td>\n<td><em>(any)</em></td>\n<td>No</td>\n<td>One file part per entry in <code>Representment.Documents</code>, named to match that entry's <code>Key</code> field</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"json-payload-data-part\">JSON Payload (<code>data</code> part)</h4>\n<p>The JSON structure mirrors the response returned by <code>GET api/representment/GetRepresentmentInfo</code>.\nAll sections and fields within <code>Representment</code> are optional — send only what you want to change.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"MidMetricsId\":    123,\n  \"ProcessorCaseId\": \"CB-20240115-001\",\n  \"SubmitResult\":    false,\n  \"Representment\": {\n    \"OrderInfo\": { ... },\n    \"RepresentmentTransactionInfo\": { ... },\n    \"CustomDisputeValues\": [ ... ],\n    \"Documents\": [ ... ]\n  }\n}\n</code></pre>\n<h5 id=\"top-level-fields\">Top-level fields</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>MidMetricsId</code></td>\n<td><code>int</code></td>\n<td>One of these two</td>\n<td>MidMetrics internal chargeback ID</td>\n</tr>\n<tr>\n<td><code>ProcessorCaseId</code></td>\n<td><code>string</code></td>\n<td>One of these two</td>\n<td>Processor-assigned case ID</td>\n</tr>\n<tr>\n<td><code>SubmitResult</code></td>\n<td><code>bool</code></td>\n<td>No (default <code>false</code>)</td>\n<td>When <code>true</code>, renders the representment to PDF via DocRaptor, uploads it to blob storage, creates a <code>RepresentmentSubmission</code> record, logs a chargeback action, updates the chargeback state (<code>DISPUTED</code> or <code>NEEDSMANUALSUBMISSION</code> depending on the processor's submission type), and queues transmission to the processor. Check <code>Submitted</code> in the response to confirm this actually completed.</td>\n</tr>\n<tr>\n<td><code>Representment</code></td>\n<td><code>object</code></td>\n<td>No</td>\n<td>Container for all representment data; omit to skip all data updates</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"partial-update-semantics\">Partial-update semantics</h5>\n<p>These apply to all scalar fields inside <code>Representment</code>:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>JSON</th>\n<th>Effect</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Field <strong>absent</strong> from payload</td>\n<td>No change — existing value preserved</td>\n</tr>\n<tr>\n<td>Field present with <strong><code>null</code></strong></td>\n<td>Clears the value in the database</td>\n</tr>\n<tr>\n<td>Field present with a <strong>value</strong></td>\n<td>Sets the value</td>\n</tr>\n</tbody>\n</table>\n</div><p>Arrays (<code>Products</code>, <code>CustomDisputeValues</code>, <code>Documents</code>) use <strong>full-replace</strong> semantics:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>JSON</th>\n<th>Effect</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Array key <strong>absent</strong></td>\n<td>No change</td>\n</tr>\n<tr>\n<td>Array present (even <code>[]</code>)</td>\n<td>Existing rows deleted and replaced with the provided list</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"representmentorderinfo\">Representment.OrderInfo</h4>\n<p>Scalar fields match <code>RepresentmentOrderInfoVM</code> / <code>OrderInfo</code> entity properties directly.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>MerchantOrderId</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>TrackingNumber</code></td>\n<td><code>string</code></td>\n<td>Setting a non-empty value triggers a Shippo tracking lookup</td>\n</tr>\n<tr>\n<td><code>DateOfOrder</code></td>\n<td><code>datetime?</code></td>\n<td>ISO 8601</td>\n</tr>\n<tr>\n<td><code>DateShipped</code></td>\n<td><code>datetime?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>DateDelivered</code></td>\n<td><code>datetime?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Email</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>IPAddress</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Phone</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>DeliveryLocation</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>DeliveryNotes</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Tax</code></td>\n<td><code>decimal?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Shipping</code></td>\n<td><code>decimal?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>OrderAmount</code></td>\n<td><code>decimal?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Currency</code></td>\n<td><code>string</code></td>\n<td>e.g. <code>\"USD\"</code></td>\n</tr>\n<tr>\n<td><code>InvoiceNumber</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>AccountId</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Shipper_Id</code></td>\n<td><code>int?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>ReturnAttemptTooLate</code></td>\n<td><code>bool?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>CancelAttemptTooLate</code></td>\n<td><code>bool?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>MarketingSource</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>SubMarketingSource</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Refundable</code></td>\n<td><code>bool?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>CarRentalDate</code></td>\n<td><code>datetime?</code></td>\n<td>Hospitality / travel</td>\n</tr>\n<tr>\n<td><code>CarReturnDate</code></td>\n<td><code>datetime?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>FlightDate</code></td>\n<td><code>datetime?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>CheckInDate</code></td>\n<td><code>datetime?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>CheckOutDate</code></td>\n<td><code>datetime?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>AncillaryCharges</code></td>\n<td><code>bool?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>NoShow</code></td>\n<td><code>bool?</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>BillingContact</code></td>\n<td><code>object</code></td>\n<td>See Contact object below</td>\n</tr>\n<tr>\n<td><code>ShippingContact</code></td>\n<td><code>object</code></td>\n<td>See Contact object below</td>\n</tr>\n<tr>\n<td><code>Products</code></td>\n<td><code>array</code></td>\n<td>See Product item below — full-replace</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"contact-object\">Contact object</h5>\n<p>Contacts use <strong>object-level merge</strong> semantics: providing the contact object updates only the non-null fields within it.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Name</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>Address</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>City</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>State</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>Zip</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>Country</code></td>\n<td><code>string</code></td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"product-item\">Product item</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Description</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Sku</code></td>\n<td><code>string</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>Quantity</code></td>\n<td><code>int</code></td>\n<td></td>\n</tr>\n<tr>\n<td><code>PricePer</code></td>\n<td><code>decimal</code></td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td><code>WasReturned</code></td>\n<td><code>bool?</code></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"representmentrepresentmenttransactioninfo\">Representment.RepresentmentTransactionInfo</h4>\n<p>Scalar fields match <code>RepresentmentTransactionVM</code> / <code>RepresentmentTransactionInfo</code> entity properties.\nRead-only derived fields returned by <code>GetRepresentmentInfo</code> (e.g. <code>Descriptor</code>, <code>AVSCodeDescription</code>) are silently ignored if sent.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>AuthCode</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>Cancelled</code></td>\n<td><code>bool?</code></td>\n</tr>\n<tr>\n<td><code>CancelDate</code></td>\n<td><code>datetime?</code></td>\n</tr>\n<tr>\n<td><code>CancelReason</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>WasCustomerServiceContacted</code></td>\n<td><code>bool?</code></td>\n</tr>\n<tr>\n<td><code>LastCustomerServiceContactDate</code></td>\n<td><code>datetime?</code></td>\n</tr>\n<tr>\n<td><code>LastCustomerServiceContactReason</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>DeviceId</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>GeoId</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>OTP_SMS</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>AddOns</code></td>\n<td><code>bool?</code></td>\n</tr>\n<tr>\n<td><code>HasProof</code></td>\n<td><code>bool?</code></td>\n</tr>\n<tr>\n<td><code>ProofDate</code></td>\n<td><code>datetime?</code></td>\n</tr>\n<tr>\n<td><code>ProofType</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>Recurring</code></td>\n<td><code>bool?</code></td>\n</tr>\n<tr>\n<td><code>RefundARN</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>RefundAuthCode</code></td>\n<td><code>string</code></td>\n</tr>\n<tr>\n<td><code>RefundAmount</code></td>\n<td><code>decimal?</code></td>\n</tr>\n<tr>\n<td><code>RefundDate</code></td>\n<td><code>datetime?</code></td>\n</tr>\n<tr>\n<td><code>ExternalRefundId</code></td>\n<td><code>string</code></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"representmentcustomdisputevalues\">Representment.CustomDisputeValues</h4>\n<p>Full-replace array. Each item:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>ParameterId</code></td>\n<td><code>int?</code></td>\n<td>Preferred — looked up by DB id</td>\n</tr>\n<tr>\n<td><code>ParameterName</code></td>\n<td><code>string</code></td>\n<td>Fallback if <code>ParameterId</code> absent</td>\n</tr>\n<tr>\n<td><code>ParameterValue</code></td>\n<td><code>string</code></td>\n<td>The value to store</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"representmentdocuments\">Representment.Documents</h4>\n<p>Full-replace array. Each item describes one file attachment.\nThe corresponding file must be sent as a named multipart part whose name matches <code>Key</code>.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>Key</code></td>\n<td><code>string</code></td>\n<td>Must match the name of the file part in the multipart request</td>\n</tr>\n<tr>\n<td><code>Title</code></td>\n<td><code>string</code></td>\n<td>Display title (defaults to filename if omitted)</td>\n</tr>\n<tr>\n<td><code>Notes</code></td>\n<td><code>string</code></td>\n<td>Optional notes</td>\n</tr>\n<tr>\n<td><code>DocumentType_Id</code></td>\n<td><code>int?</code></td>\n<td>Optional document type classification</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response\">Response</h4>\n<p><strong>200 OK</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"MidMetricsId\":    123,\n  \"RepresentmentId\": 456,\n  \"PdfPreviewUrl\":   \"/api/chargeback/GetRepresentmentLetter?midMetricsId=123\",\n  \"DocumentsAdded\":  2,\n  \"SubmitRequested\": true,\n  \"Submitted\":       true,\n  \"PdfPages\":        3,\n  \"PdfSize\":         \"0.42 MB\",\n  \"PdfOverBudget\":   false,\n  \"PdfWarning\":      null\n}\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>MidMetricsId</code></td>\n<td>Chargeback ID</td>\n</tr>\n<tr>\n<td><code>RepresentmentId</code></td>\n<td>Representment record ID</td>\n</tr>\n<tr>\n<td><code>PdfPreviewUrl</code></td>\n<td>URL to retrieve the PDF — use <code>GET api/chargeback/GetRepresentmentLetter</code> (API-key authenticated). No longer the session-gated DisputeGenius URL.</td>\n</tr>\n<tr>\n<td><code>DocumentsAdded</code></td>\n<td>Number of documents successfully uploaded in this request</td>\n</tr>\n<tr>\n<td><code>SubmitRequested</code></td>\n<td>Whether <code>SubmitResult: true</code> was sent in the request</td>\n</tr>\n<tr>\n<td><code>Submitted</code></td>\n<td>Whether the PDF was actually generated and transmission was queued, as distinct from <code>SubmitRequested</code> (what was asked). <code>false</code> if <code>SubmitRequested</code> was <code>true</code> but the template or PDF generation failed (the data save still succeeded)</td>\n</tr>\n<tr>\n<td><code>PdfPages</code></td>\n<td>Number of pages in the generated PDF</td>\n</tr>\n<tr>\n<td><code>PdfSize</code></td>\n<td>Human-readable size of the generated PDF (e.g. <code>\"0.42 MB\"</code>)</td>\n</tr>\n<tr>\n<td><code>PdfOverBudget</code></td>\n<td><code>true</code> if the PDF exceeds the processor's page or size limits</td>\n</tr>\n<tr>\n<td><code>PdfWarning</code></td>\n<td>Human-readable description of which limit was exceeded, or <code>null</code></td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"error-responses\">Error responses</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Condition</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400 Bad Request</td>\n<td>Missing <code>data</code> part, invalid JSON, or neither <code>MidMetricsId</code> nor <code>ProcessorCaseId</code> provided, or <code>ProcessorCaseId</code> provided with <code>MidMetricsId</code> but they refer to different chargebacks</td>\n</tr>\n<tr>\n<td>403 Forbidden</td>\n<td>Missing or invalid API key</td>\n</tr>\n<tr>\n<td>404 Not Found</td>\n<td>No chargeback found for the provided identifier</td>\n</tr>\n<tr>\n<td>415 Unsupported Media Type</td>\n<td>Request is not <code>multipart/form-data</code></td>\n</tr>\n<tr>\n<td>500 Internal Server Error</td>\n<td>Unhandled exception — check server logs</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"example--clear-a-field-set-to-null\">Example — clear a field (set to null)</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"MidMetricsId\": 9801,\n  \"Representment\": {\n    \"RepresentmentTransactionInfo\": {\n      \"CancelDate\": null,\n      \"CancelReason\": null\n    }\n  }\n}\n</code></pre>\n<h4 id=\"sandbox-behaviour\">Sandbox Behaviour</h4>\n<ul>\n<li>Data is validated (chargeback identifier required) but not stored.</li>\n<li><code>Submitted</code> echoes back the value of <code>SubmitRequested</code>.</li>\n<li><code>PdfPreviewUrl</code> returns <code>/api/chargeback/GetRepresentmentLetter</code> — follow that URL with your API key to receive the sample PDF.</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","chargeback","UpdateRepresentment"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"c0428e5b-5e2e-4fe4-9349-2505f9e7b32b","name":"Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"data","value":"{\n  \"MidMetricsId\": 12345,\n  \"ProcessorCaseId\": \"CB-2024-001\",\n  \"SubmitResult\": true,\n  \"Representment\": {\n    \"OrderInfo\": {\n      \"TrackingNumber\": \"1Z999AA10123456784\",\n      \"BillingContact\": {\n        \"FirstName\": \"Jane\",\n        \"LastName\": \"Doe\",\n        \"Email\": \"jane.doe@example.com\"\n      },\n      \"ShippingContact\": {\n        \"FirstName\": \"Jane\",\n        \"LastName\": \"Doe\",\n        \"Address1\": \"123 Main St\",\n        \"City\": \"Springfield\",\n        \"State\": \"IL\",\n        \"PostalCode\": \"62701\",\n        \"Country\": \"US\"\n      },\n      \"Products\": [\n        { \"ProductName\": \"Widget Pro\", \"Quantity\": 1, \"UnitPrice\": 99.99 }\n      ]\n    },\n    \"RepresentmentTransactionInfo\": {\n      \"AuthCode\": \"ABC123\"\n    },\n    \"CustomDisputeValues\": [\n      { \"ParameterId\": 1, \"ParameterValue\": \"1Z999AA10123456784\" }\n    ],\n    \"Documents\": [\n      { \"Key\": \"doc1\", \"Title\": \"Delivery Confirmation\", \"Notes\": \"Carrier confirmation\", \"DocumentType_Id\": 20 }\n    ]\n  }\n}","type":"text","description":"Required. JSON payload. Identify the chargeback with MidMetricsId or ProcessorCaseId (or both). Omit fields to leave them unchanged; include null to clear."},{"key":"doc1","type":"file","description":"Optional file part - key must match a Documents[].Key value in the data payload.","src":[]}]},"url":"/api/chargeback/UpdateRepresentment","description":"### UpdateRepresentment\n\nUpdates representment data and/or attaches supporting documents for an existing chargeback.\nThe raw request payload is archived to blob storage (`{tenant}-representmentupdates`) for auditing.\n\n#### Authentication\n\nStandard Service API key — same header as all other `api/chargeback` endpoints.\n\n#### Request\n\n**Content-Type:** `multipart/form-data`\n\nThe request has two kinds of parts:\n\n| Part name | Content-Type | Required | Description |\n| --- | --- | --- | --- |\n| `data` | `application/json` | Yes | JSON payload (structure below) |\n| _{key}_ | _(any)_ | No | One file part per entry in `Representment.Documents`, named to match that entry's `Key` field |\n\n#### JSON Payload (`data` part)\n\nThe JSON structure mirrors the response returned by `GET api/representment/GetRepresentmentInfo`.\nAll sections and fields within `Representment` are optional — send only what you want to change.\n\n```json\n{\n  \"MidMetricsId\":    123,\n  \"ProcessorCaseId\": \"CB-20240115-001\",\n  \"SubmitResult\":    false,\n  \"Representment\": {\n    \"OrderInfo\": { ... },\n    \"RepresentmentTransactionInfo\": { ... },\n    \"CustomDisputeValues\": [ ... ],\n    \"Documents\": [ ... ]\n  }\n}\n```\n\n##### Top-level fields\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `MidMetricsId` | `int` | One of these two | MidMetrics internal chargeback ID |\n| `ProcessorCaseId` | `string` | One of these two | Processor-assigned case ID |\n| `SubmitResult` | `bool` | No (default `false`) | When `true`, renders the representment to PDF via DocRaptor, uploads it to blob storage, creates a `RepresentmentSubmission` record, logs a chargeback action, updates the chargeback state (`DISPUTED` or `NEEDSMANUALSUBMISSION` depending on the processor's submission type), and queues transmission to the processor. Check `Submitted` in the response to confirm this actually completed. |\n| `Representment` | `object` | No | Container for all representment data; omit to skip all data updates |\n\n##### Partial-update semantics\n\nThese apply to all scalar fields inside `Representment`:\n\n| JSON | Effect |\n| --- | --- |\n| Field **absent** from payload | No change — existing value preserved |\n| Field present with **`null`** | Clears the value in the database |\n| Field present with a **value** | Sets the value |\n\nArrays (`Products`, `CustomDisputeValues`, `Documents`) use **full-replace** semantics:\n\n| JSON | Effect |\n| --- | --- |\n| Array key **absent** | No change |\n| Array present (even `[]`) | Existing rows deleted and replaced with the provided list |\n\n#### Representment.OrderInfo\n\nScalar fields match `RepresentmentOrderInfoVM` / `OrderInfo` entity properties directly.\n\n| Field | Type | Notes |\n| --- | --- | --- |\n| `MerchantOrderId` | `string` | |\n| `TrackingNumber` | `string` | Setting a non-empty value triggers a Shippo tracking lookup |\n| `DateOfOrder` | `datetime?` | ISO 8601 |\n| `DateShipped` | `datetime?` | |\n| `DateDelivered` | `datetime?` | |\n| `Email` | `string` | |\n| `IPAddress` | `string` | |\n| `Phone` | `string` | |\n| `DeliveryLocation` | `string` | |\n| `DeliveryNotes` | `string` | |\n| `Tax` | `decimal?` | |\n| `Shipping` | `decimal?` | |\n| `OrderAmount` | `decimal?` | |\n| `Currency` | `string` | e.g. `\"USD\"` |\n| `InvoiceNumber` | `string` | |\n| `AccountId` | `string` | |\n| `Shipper_Id` | `int?` | |\n| `ReturnAttemptTooLate` | `bool?` | |\n| `CancelAttemptTooLate` | `bool?` | |\n| `MarketingSource` | `string` | |\n| `SubMarketingSource` | `string` | |\n| `Refundable` | `bool?` | |\n| `CarRentalDate` | `datetime?` | Hospitality / travel |\n| `CarReturnDate` | `datetime?` | |\n| `FlightDate` | `datetime?` | |\n| `CheckInDate` | `datetime?` | |\n| `CheckOutDate` | `datetime?` | |\n| `AncillaryCharges` | `bool?` | |\n| `NoShow` | `bool?` | |\n| `BillingContact` | `object` | See Contact object below |\n| `ShippingContact` | `object` | See Contact object below |\n| `Products` | `array` | See Product item below — full-replace |\n\n##### Contact object\n\nContacts use **object-level merge** semantics: providing the contact object updates only the non-null fields within it.\n\n| Field | Type |\n| --- | --- |\n| `Name` | `string` |\n| `Address` | `string` |\n| `City` | `string` |\n| `State` | `string` |\n| `Zip` | `string` |\n| `Country` | `string` |\n\n##### Product item\n\n| Field | Type | Notes |\n| --- | --- | --- |\n| `Description` | `string` | |\n| `Sku` | `string` | |\n| `Quantity` | `int` | |\n| `PricePer` | `decimal` | Unit price |\n| `WasReturned` | `bool?` | |\n\n#### Representment.RepresentmentTransactionInfo\n\nScalar fields match `RepresentmentTransactionVM` / `RepresentmentTransactionInfo` entity properties.\nRead-only derived fields returned by `GetRepresentmentInfo` (e.g. `Descriptor`, `AVSCodeDescription`) are silently ignored if sent.\n\n| Field | Type |\n| --- | --- |\n| `AuthCode` | `string` |\n| `Cancelled` | `bool?` |\n| `CancelDate` | `datetime?` |\n| `CancelReason` | `string` |\n| `WasCustomerServiceContacted` | `bool?` |\n| `LastCustomerServiceContactDate` | `datetime?` |\n| `LastCustomerServiceContactReason` | `string` |\n| `DeviceId` | `string` |\n| `GeoId` | `string` |\n| `OTP_SMS` | `string` |\n| `AddOns` | `bool?` |\n| `HasProof` | `bool?` |\n| `ProofDate` | `datetime?` |\n| `ProofType` | `string` |\n| `Recurring` | `bool?` |\n| `RefundARN` | `string` |\n| `RefundAuthCode` | `string` |\n| `RefundAmount` | `decimal?` |\n| `RefundDate` | `datetime?` |\n| `ExternalRefundId` | `string` |\n\n#### Representment.CustomDisputeValues\n\nFull-replace array. Each item:\n\n| Field | Type | Notes |\n| --- | --- | --- |\n| `ParameterId` | `int?` | Preferred — looked up by DB id |\n| `ParameterName` | `string` | Fallback if `ParameterId` absent |\n| `ParameterValue` | `string` | The value to store |\n\n#### Representment.Documents\n\nFull-replace array. Each item describes one file attachment.\nThe corresponding file must be sent as a named multipart part whose name matches `Key`.\n\n| Field | Type | Notes |\n| --- | --- | --- |\n| `Key` | `string` | Must match the name of the file part in the multipart request |\n| `Title` | `string` | Display title (defaults to filename if omitted) |\n| `Notes` | `string` | Optional notes |\n| `DocumentType_Id` | `int?` | Optional document type classification |\n\n#### Response\n\n**200 OK**\n\n```json\n{\n  \"MidMetricsId\":    123,\n  \"RepresentmentId\": 456,\n  \"PdfPreviewUrl\":   \"/api/chargeback/GetRepresentmentLetter?midMetricsId=123\",\n  \"DocumentsAdded\":  2,\n  \"SubmitRequested\": true,\n  \"Submitted\":       true,\n  \"PdfPages\":        3,\n  \"PdfSize\":         \"0.42 MB\",\n  \"PdfOverBudget\":   false,\n  \"PdfWarning\":      null\n}\n```\n\n| Field | Description |\n| --- | --- |\n| `MidMetricsId` | Chargeback ID |\n| `RepresentmentId` | Representment record ID |\n| `PdfPreviewUrl` | URL to retrieve the PDF — use `GET api/chargeback/GetRepresentmentLetter` (API-key authenticated). No longer the session-gated DisputeGenius URL. |\n| `DocumentsAdded` | Number of documents successfully uploaded in this request |\n| `SubmitRequested` | Whether `SubmitResult: true` was sent in the request |\n| `Submitted` | Whether the PDF was actually generated and transmission was queued, as distinct from `SubmitRequested` (what was asked). `false` if `SubmitRequested` was `true` but the template or PDF generation failed (the data save still succeeded) |\n| `PdfPages` | Number of pages in the generated PDF |\n| `PdfSize` | Human-readable size of the generated PDF (e.g. `\"0.42 MB\"`) |\n| `PdfOverBudget` | `true` if the PDF exceeds the processor's page or size limits |\n| `PdfWarning` | Human-readable description of which limit was exceeded, or `null` |\n\n##### Error responses\n\n| Status | Condition |\n| --- | --- |\n| 400 Bad Request | Missing `data` part, invalid JSON, or neither `MidMetricsId` nor `ProcessorCaseId` provided, or `ProcessorCaseId` provided with `MidMetricsId` but they refer to different chargebacks |\n| 403 Forbidden | Missing or invalid API key |\n| 404 Not Found | No chargeback found for the provided identifier |\n| 415 Unsupported Media Type | Request is not `multipart/form-data` |\n| 500 Internal Server Error | Unhandled exception — check server logs |\n\n#### Example — clear a field (set to null)\n\n```json\n{\n  \"MidMetricsId\": 9801,\n  \"Representment\": {\n    \"RepresentmentTransactionInfo\": {\n      \"CancelDate\": null,\n      \"CancelReason\": null\n    }\n  }\n}\n```\n\n#### Sandbox Behaviour\n\n- Data is validated (chargeback identifier required) but not stored.\n- `Submitted` echoes back the value of `SubmitRequested`.\n- `PdfPreviewUrl` returns `/api/chargeback/GetRepresentmentLetter` — follow that URL with your API key to receive the sample PDF."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\r\n  \"MidMetricsId\": 12345,\r\n  \"RepresentmentId\": 573,\r\n  \"PdfPreviewUrl\": \"/api/chargeback/GetRepresentmentLetter?midMetricsId=12345\",\r\n  \"DocumentsAdded\": 1,\r\n  \"SubmitRequested\": true,\r\n  \"Submitted\": true,\r\n  \"PdfPages\": 3,\r\n  \"PdfSize\": \"0.42 MB\",\r\n  \"PdfOverBudget\": false,\r\n  \"PdfWarning\": null\r\n}"}],"_postman_id":"d483f7a6-34cd-4389-bedb-12902ff0583e"},{"name":"GetRepresentmentLetter","id":"6b23daf9-3edc-46b4-9f9d-4c74fbb2407d","request":{"method":"GET","header":[],"url":"/api/chargeback/GetRepresentmentLetter?midMetricsId=12345","description":"<p>Returns the submitted representment PDF for a chargeback, authenticated via API key. Replaces the session-gated <code>/DisputeGenius/GetRepresentmentLetter</code> URL that was previously returned in <code>UpdateRepresentment</code> responses.</p>\n<h3 id=\"query-parameters\">Query Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>midMetricsId</code></td>\n<td>int</td>\n<td>One of these two is required</td>\n<td>MidMetrics internal chargeback ID</td>\n</tr>\n<tr>\n<td><code>processorCaseId</code></td>\n<td>string</td>\n<td>One of these two is required</td>\n<td>Processor-assigned case ID</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response\">Response</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>200 OK</code></td>\n<td><code>application/pdf</code> — the submitted representment PDF</td>\n</tr>\n<tr>\n<td><code>400 Bad Request</code></td>\n<td>Neither <code>midMetricsId</code> nor <code>processorCaseId</code> was provided</td>\n</tr>\n<tr>\n<td><code>403 Forbidden</code></td>\n<td>API key not authorized for this chargeback's MID</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>Chargeback not found, or no submitted PDF exists yet (chargeback is still in draft state)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"sandbox-behaviour\">Sandbox Behaviour</h3>\n<p>Returns a static one-page sample PDF (<code>application/pdf</code>) so the full GET → open-PDF flow can be tested without real data.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","chargeback","GetRepresentmentLetter"],"host":[""],"query":[{"key":"midMetricsId","value":"12345"}],"variable":[]}},"response":[{"id":"797babaf-d9d1-433c-a609-277ee35d913f","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"/api/chargeback/GetRepresentmentLetter?midMetricsId=12345","host":[""],"path":["api","chargeback","GetRepresentmentLetter"],"query":[{"key":"midMetricsId","value":"12345"}]},"description":"Returns the submitted representment PDF for a chargeback, authenticated via API key. Replaces the session-gated `/DisputeGenius/GetRepresentmentLetter` URL that was previously returned in `UpdateRepresentment` responses.\n\n### Query Parameters\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `midMetricsId` | int | One of these two is required | MidMetrics internal chargeback ID |\n| `processorCaseId` | string | One of these two is required | Processor-assigned case ID |\n\n### Response\n\n| Status | Description |\n| --- | --- |\n| `200 OK` | `application/pdf` — the submitted representment PDF |\n| `400 Bad Request` | Neither `midMetricsId` nor `processorCaseId` was provided |\n| `403 Forbidden` | API key not authorized for this chargeback's MID |\n| `404 Not Found` | Chargeback not found, or no submitted PDF exists yet (chargeback is still in draft state) |\n\n### Sandbox Behaviour\n\nReturns a static one-page sample PDF (`application/pdf`) so the full GET → open-PDF flow can be tested without real data."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/pdf"}],"cookie":[],"responseTime":null,"body":"<binary PDF data — sample one-page representment letter>"}],"_postman_id":"6b23daf9-3edc-46b4-9f9d-4c74fbb2407d"}],"id":"0eb38088-c2e9-45a4-bed4-12d3227bdaae","description":"<p>RoutePrefix: api/chargeback - dispute representment endpoints.</p>\n","_postman_id":"0eb38088-c2e9-45a4-bed4-12d3227bdaae","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}}},{"name":"Event Subscription API","item":[{"name":"GetCompaniesAndMids","id":"56237cf7-e967-4673-bef4-71487b3c81b6","request":{"method":"GET","header":[],"url":"/api/EventSubscription/GetCompaniesAndMids","description":"<p>Returns the tree of companies and their MID identifiers that this API key is permitted to subscribe to. Use the Value tokens in the CompaniesAndMidsThisIsFor field of POST/PUT.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","EventSubscription","GetCompaniesAndMids"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"4294b417-2189-4e31-bd96-0c6bf350c1c2","name":"Example","originalRequest":{"method":"GET","header":[],"url":"/api/EventSubscription/GetCompaniesAndMids","description":"Returns the tree of companies and their MID identifiers that this API key is permitted to subscribe to. Use the Value tokens in the CompaniesAndMidsThisIsFor field of POST/PUT."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\r\n  {\r\n    \"Name\": \"Acme Corp\",\r\n    \"Value\": \"7!\",\r\n    \"Mids\": [\r\n      {\r\n        \"Name\": \"Main Account\",\r\n        \"Value\": \"7~42\"\r\n      },\r\n      {\r\n        \"Name\": \"European Store\",\r\n        \"Value\": \"7~55\"\r\n      }\r\n    ]\r\n  },\r\n  {\r\n    \"Name\": \"mysubdomain\",\r\n    \"Value\": \"0!\",\r\n    \"Mids\": [\r\n      {\r\n        \"Name\": \"Legacy MID\",\r\n        \"Value\": \"0~3\"\r\n      }\r\n    ]\r\n  }\r\n]"}],"_postman_id":"56237cf7-e967-4673-bef4-71487b3c81b6"},{"name":"Get All Subscriptions","id":"8731c8d8-5b6f-46e5-81c8-3fa34c8361c2","request":{"method":"GET","header":[],"url":"/api/EventSubscription","description":"<p>Returns all event subscriptions visible to this API key.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","EventSubscription"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"3a963094-b3dd-499a-8459-3b7f3125cc18","name":"Example","originalRequest":{"method":"GET","header":[],"url":"/api/EventSubscription","description":"Returns all event subscriptions visible to this API key."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\r\n  {\r\n    \"Id\": 5,\r\n    \"EventType\": \"RDR\",\r\n    \"ExternalUrl\": \"https://example.com/webhook\",\r\n    \"Email\": \"notify@example.com\",\r\n    \"AuthType\": 1,\r\n    \"UserName\": \"webhookuser\",\r\n    \"Password\": \"************\",\r\n    \"Disabled\": false,\r\n    \"LastError\": null,\r\n    \"CompaniesAndMidsThisIsFor\": \"All\",\r\n    \"ReadOnly\": false\r\n  },\r\n  {\r\n    \"Id\": 6,\r\n    \"EventType\": \"Chargeback\",\r\n    \"ExternalUrl\": \"https://example.com/webhook\",\r\n    \"Email\": \"notify@example.com\",\r\n    \"AuthType\": 1,\r\n    \"UserName\": \"webhookuser\",\r\n    \"Password\": \"************\",\r\n    \"Disabled\": false,\r\n    \"LastError\": null,\r\n    \"CompaniesAndMidsThisIsFor\": \"7~42,7~55\",\r\n    \"ReadOnly\": false\r\n  }\r\n]"}],"_postman_id":"8731c8d8-5b6f-46e5-81c8-3fa34c8361c2"},{"name":"Get Subscription by ID","id":"10e738f9-bf50-47c6-a056-63419a3a943d","request":{"method":"GET","header":[],"url":"/api/EventSubscription/","description":"<p>Returns a single event subscription by its ID.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","EventSubscription",""],"host":[""],"query":[],"variable":[]}},"response":[{"id":"759e126d-baf3-4eaa-b040-4076c28b416e","name":"Example","originalRequest":{"method":"GET","header":[],"url":"/api/EventSubscription/","description":"Returns a single event subscription by its ID."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\r\n  \"Id\": 1,\r\n  \"EventType\": \"RDR\",\r\n  \"ExternalUrl\": \"https://example.com/webhook\",\r\n  \"Email\": \"notify@example.com\",\r\n  \"AuthType\": 1,\r\n  \"UserName\": \"webhookuser\",\r\n  \"Password\": \"************\",\r\n  \"Disabled\": false,\r\n  \"LastError\": null,\r\n  \"CompaniesAndMidsThisIsFor\": \"All\",\r\n  \"ReadOnly\": false\r\n}"}],"_postman_id":"10e738f9-bf50-47c6-a056-63419a3a943d"},{"name":"Create Subscription","id":"b4141f6b-5a0a-4100-8abf-6ebf7bdc7dfa","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"EventType\": 1,\n  \"ExternalUrl\": \"https://example.com/webhook\",\n  \"Email\": \"notify@example.com\",\n  \"UserName\": \"webhookuser\",\n  \"Password\": \"webhookpassword\",\n  \"AuthType\": 1,\n  \"Disabled\": false,\n  \"CompaniesAndMidsThisIsFor\": \"All\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/EventSubscription","description":"<p>Creates a new event subscription.</p>\n<p>EventType values: 1=Alert, 2=Chargeback (check SubscribedEventType enum for full list).\nAuthType: 1=Basic, 2=ApiKey, 3=Bearer, 4=HMAC, 5=JWT.\nCompaniesAndMidsThisIsFor: 'All', or token list from GetCompaniesAndMids (e.g. '1!,1~101').\nReturns the new subscription ID on success.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","EventSubscription"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"34bab0ee-9565-463a-b3c9-fc02d626a784","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"EventType\": 1,\n  \"ExternalUrl\": \"https://example.com/webhook\",\n  \"Email\": \"notify@example.com\",\n  \"UserName\": \"webhookuser\",\n  \"Password\": \"webhookpassword\",\n  \"AuthType\": 1,\n  \"Disabled\": false,\n  \"CompaniesAndMidsThisIsFor\": \"All\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/EventSubscription","description":"Creates a new event subscription.\n\nEventType values: 1=Alert, 2=Chargeback (check SubscribedEventType enum for full list).\nAuthType: 1=Basic, 2=ApiKey, 3=Bearer, 4=HMAC, 5=JWT.\nCompaniesAndMidsThisIsFor: 'All', or token list from GetCompaniesAndMids (e.g. '1!,1~101').\nReturns the new subscription ID on success."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"7"}],"_postman_id":"b4141f6b-5a0a-4100-8abf-6ebf7bdc7dfa"},{"name":"Update Subscription","id":"8393a00b-06f6-407c-83cd-9eca0d9f8b00","request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"EventType\": 1,\n  \"ExternalUrl\": \"https://example.com/webhook\",\n  \"Email\": \"notify@example.com\",\n  \"UserName\": \"webhookuser\",\n  \"Password\": \"webhookpassword\",\n  \"AuthType\": 1,\n  \"Disabled\": false,\n  \"CompaniesAndMidsThisIsFor\": \"All\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/EventSubscription/","description":"<p>Replaces an existing subscription. All fields are required (full replacement, not partial update).\nReturns the subscription ID on success.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","EventSubscription",""],"host":[""],"query":[],"variable":[]}},"response":[{"id":"0d9d93b9-1eff-4e0e-a956-c87c09480c65","name":"Example","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"EventType\": 1,\n  \"ExternalUrl\": \"https://example.com/webhook\",\n  \"Email\": \"notify@example.com\",\n  \"UserName\": \"webhookuser\",\n  \"Password\": \"webhookpassword\",\n  \"AuthType\": 1,\n  \"Disabled\": false,\n  \"CompaniesAndMidsThisIsFor\": \"All\"\n}","options":{"raw":{"language":"json"}}},"url":"/api/EventSubscription/","description":"Replaces an existing subscription. All fields are required (full replacement, not partial update).\nReturns the subscription ID on success."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"1"}],"_postman_id":"8393a00b-06f6-407c-83cd-9eca0d9f8b00"},{"name":"Delete Subscription","id":"4024d1be-ccc8-493a-93a7-2252e1cd2e9e","request":{"method":"DELETE","header":[],"url":"/api/EventSubscription/","description":"<p>Disables (soft-deletes) a subscription. Returns 200 OK on success.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}},"urlObject":{"path":["api","EventSubscription",""],"host":[""],"query":[],"variable":[]}},"response":[{"id":"85941f96-dc01-450d-8aa7-efc6698b5a5d","name":"Example","originalRequest":{"method":"DELETE","header":[],"url":"/api/EventSubscription/","description":"Disables (soft-deletes) a subscription. Returns 200 OK on success."},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"4024d1be-ccc8-493a-93a7-2252e1cd2e9e"}],"id":"568f0c6b-46a3-4f84-948b-1a3f6978a5f4","description":"<p>RoutePrefix: api/EventSubscription - manage webhook/email event subscriptions.</p>\n","_postman_id":"568f0c6b-46a3-4f84-948b-1a3f6978a5f4","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","id":"c41b625a-4418-4bb3-9d32-e64fa34471fe","name":"MidMetrics Sandbox API","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]}},"event":[{"listen":"prerequest","script":{"id":"a8b559fb-1cae-4c03-9437-e20a10641bb5","type":"text/javascript","packages":{},"requests":{},"exec":[""]}},{"listen":"test","script":{"id":"9a16e421-5bd3-48ba-b073-17fcac54c8e6","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"variable":[{"key":"apiKey","value":"","description":"Your API key Sent as: Authorization: Basic <apiKey>"},{"key":"subscriptionId","value":"","description":"EventSubscription ID used in GET/PUT/DELETE by-id requests."},{"key":"baseUrl","value":""}]}