{"method":"POST","path":"https://api.revcent.com/v2/documents","summary":"Create A Chargeback Document","description":"This is a method to create a chargeback mitigation document from an originating sale by searching for the sale using an item_type and item_value. The results contain detailed information on the originating sale including tracking visitor and shipping information.<br><br>A chargeback document allows you to retrieve important details regarding a originating sale in raw JSON with a URL to a docx file.<br><br>Note: This is not overall system documentation.  This is primarily used as a tool for chargeback mitigation, i.e. to prove an customer purchased an item with tracking visitor details, as well as shipping information. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/CreateChargebackDocument.md for an in-depth overview of this operation.","operationId":"CreateChargebackDocument","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"item_type":{"description":"The item type to search, used in combination with the id to find the specific item and create a document on it's originating sale.","type":"string","enum":["sale","transaction","shipping","fraud_detection","chargeback"]},"item_value":{"description":"The item value to use when searching for the item type. Based on the item_type, the following fields are searched:<br><table class=\"table table-bordered\"><thead class=\"small\"><tr><th>item_type</th> <th>Fields Searched</th> <th>Description</th></tr></thead> <tbody><tr> <td>sale</td> <td><ul><li>ID</li></ul></td> <td>Searching for a sale using the RevCent sale id</td></tr> <tr> <td>transaction</td> <td><ul><li>ID</li> <li>Gateway Transaction ID</li></ul></td> <td>Searching for a sale using the either the RevCent ID of a transaction, or the gateway transaction ID of a transaction.</td></tr> <tr> <td>shipping</td> <td><ul><li>ID</li> <li>Tracking number</li></ul></td> <td>Searching for a sale using the either the RevCent ID of a shipment, or the tracking number of a shipment.</td></tr> <tr> <td>fraud_detection</td> <td><ul><li>ID</li> <li>Third Party Fraud ID</li> <li>Case Number</li> <li>ARN</li></ul></td> <td>Searching for a sale using the either the RevCent ID of a fraud detection, the third party ID of a fraud detection, a fraud detection case number or fraud detection arn.</td></tr> <tr> <td>chargeback</td> <td><ul><li>ID</li> <li>Gateway Transaction ID</li> <li>Third Party Chargeback ID</li> <li>Case Number</li> <li>ARN</li></ul></td> <td>Searching for a sale using the either the RevCent ID of a chargeback, the gateway transaction ID of a chargeback, the third party ID of a chargeback, a chargeback case number or chargeback arn.</td></tr></tbody></table>","type":"string"}},"required":["item_type","item_value"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"id":{"type":"string","description":"A 20 character document ID.","minLength":20,"maxLength":20},"expires_on":{"description":"The date the document URL expires in ISO8601 format. All document URL's expire after 24 hours.","type":"string","format":"date-time"},"zip_url":{"type":"string","description":"The document ZIP file, which when unpacked will contain a friendly formatted .docx file and the document_json in a raw .json file."},"document_json":{"description":"The raw document JSON containing the details of the originating sale.","type":"object","properties":{"api_call":{"description":"","type":"object","properties":{"api_account":{"description":"","type":"string"},"code":{"description":"","type":"integer"},"id":{"description":"","type":"string"},"method":{"description":"","type":"string"},"request":{"description":"","type":"object","properties":{"bill_to":{"description":"","type":"object","properties":{"first_name":{"description":"","type":"string"},"last_name":{"description":"","type":"string"},"address_line_1":{"description":"","type":"string"},"address_line_2":{"description":"","type":"string"},"city":{"description":"","type":"string"},"state":{"description":"","type":"string"},"zip":{"description":"","type":"string"},"country":{"description":"","type":"string"},"email":{"description":"","type":"string"},"phone":{"description":"","type":"string"}}},"campaign":{"description":"","type":"string"},"customer_id":{"description":"","type":"string"},"ip_address":{"description":"","type":"string"},"metadata":{"description":"","type":"array","items":{}},"method":{"description":"","type":"string"},"payment_profile":{"description":"","type":"string"},"product":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"quantity":{"description":"","type":"integer"}}}},"ship_to":{"description":"","type":"object","properties":{"first_name":{"description":"","type":"string"},"last_name":{"description":"","type":"string"},"address_line_1":{"description":"","type":"string"},"address_line_2":{"description":"","type":"string"},"city":{"description":"","type":"string"},"state":{"description":"","type":"string"},"zip":{"description":"","type":"string"},"country":{"description":"","type":"string"},"email":{"description":"","type":"string"},"phone":{"description":"","type":"string"}}},"shipping":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"amount":{"description":"","type":"integer"},"cost":{"description":"","type":"integer"},"provider":{"description":"","type":"string"},"provider_method":{"description":"","type":"string"},"free_shipping":{"description":"","type":"boolean"}}}},"type":{"description":"","type":"string"},"unique_request_id":{"description":"","type":"string"}}},"type":{"description":"","type":"string"}}},"campaign":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"name":{"description":"","type":"string"}}},"chargebacks":{"description":"","type":"array","items":{}},"customer":{"description":"","type":"object","properties":{"address_line_1":{"description":"","type":"string"},"address_line_2":{"description":"","type":"string"},"blocked":{"description":"","type":"boolean"},"city":{"description":"","type":"string"},"company":{"description":"","type":"string"},"country":{"description":"","type":"string"},"device_details":{"description":"","type":"object","properties":{"region_timezone":{"description":"","type":"string"},"os":{"description":"","type":"string"},"device_type":{"description":"","type":"string"},"window_size":{"description":"","type":"string"},"screen_resolution":{"description":"","type":"string"},"browser":{"description":"","type":"string"},"region_language":{"description":"","type":"string"}}},"email":{"description":"","type":"string"},"email_details":{"description":"","type":"object","properties":{"email":{"description":"","type":"string"},"score":{"description":"","type":"integer"},"deliverable":{"description":"","type":"boolean"},"domain_details":{"description":"","type":"object","properties":{"domain":{"description":"","type":"string"},"tld":{"description":"","type":"string"},"registered":{"description":"","type":"boolean"},"registrar_name":{"description":"","type":"string"},"registered_to":{"description":"","type":"string"},"disposable":{"description":"","type":"boolean"},"free":{"description":"","type":"boolean"},"custom":{"description":"","type":"boolean"},"dmarc_enforced":{"description":"","type":"boolean"},"spf_strict":{"description":"","type":"boolean"},"valid_mx":{"description":"","type":"boolean"},"accept_all":{"description":"","type":"boolean"},"suspicious_tld":{"description":"","type":"boolean"},"website_exists":{"description":"","type":"boolean"}}},"account_details":{"description":"","type":"object","properties":{"apple":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"facebook":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"},"url":{"description":"","type":"null"},"name":{"description":"","type":"null"},"photo":{"description":"","type":"null"}}},"google":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"},"photo":{"description":"","type":"null"}}},"instagram":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"linkedin":{"description":"","type":"object","properties":{"registered":{"description":"","type":"null"},"photo":{"description":"","type":"null"}}},"microsoft":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"myspace":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"pinterest":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"skype":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"spotify":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"tumblr":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"twitter":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"yahoo":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}}}}}},"enabled":{"description":"","type":"boolean"},"first_name":{"description":"","type":"string"},"id":{"description":"","type":"string"},"internal_id":{"description":"","type":"string"},"ip_details":{"description":"","type":"object","properties":{"ip":{"description":"","type":"string"},"score":{"description":"","type":"integer"},"country":{"description":"","type":"string"},"state_prov":{"description":"","type":"string"},"city":{"description":"","type":"string"},"timezone_offset":{"description":"","type":"string"},"isp_name":{"description":"","type":"string"},"latitude":{"description":"","type":"number"},"longitude":{"description":"","type":"number"},"type":{"description":"","type":"string"},"tor":{"description":"","type":"boolean"},"vpn":{"description":"","type":"boolean"},"web_proxy":{"description":"","type":"boolean"},"public_proxy":{"description":"","type":"boolean"},"spam_number":{"description":"","type":"integer"}}},"last_name":{"description":"","type":"string"},"lat":{"description":"","type":"string"},"lon":{"description":"","type":"string"},"phone":{"description":"","type":"string"},"phone_details":{"description":"","type":"object","properties":{"number":{"description":"","type":"integer"},"valid":{"description":"","type":"boolean"},"type":{"description":"","type":"string"},"country":{"description":"","type":"string"},"carrier":{"description":"","type":"string"},"score":{"description":"","type":"integer"},"account_details":{"description":"","type":"object","properties":{"facebook":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"google":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"twitter":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"instagram":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"}}},"yahoo":{"description":"","type":"object","properties":{"registered":{"description":"","type":"null"}}},"whatsapp":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"},"photo":{"description":"","type":"null"},"last_seen":{"description":"","type":"null"}}},"telegram":{"description":"","type":"object","properties":{"registered":{"description":"","type":"boolean"},"photo":{"description":"","type":"null"},"last_seen":{"description":"","type":"null"}}},"viber":{"description":"","type":"object","properties":{"registered":{"description":"","type":"null"},"photo":{"description":"","type":"null"},"last_seen":{"description":"","type":"null"}}}}}}},"state":{"description":"","type":"string"},"state_long":{"description":"","type":"string"},"zip":{"description":"","type":"string"}}},"fraud_detection_requests":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"created_date":{"description":"","type":"string"},"fraud_score":{"description":"","type":"integer"},"id":{"description":"","type":"string"},"is_error":{"description":"","type":"boolean"},"is_fraud_detected":{"description":"","type":"boolean"},"is_sentinel":{"description":"","type":"boolean"},"is_third_party_integration":{"description":"","type":"boolean"},"raw_response":{"description":"","type":"string"},"score_threshold":{"description":"","type":"integer"},"score_threshold_bound":{"description":"","type":"string"},"third_party_fraud_detection_id":{"description":"","type":"string"},"third_party_integration":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"name":{"description":"","type":"string"},"third_party":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"name":{"description":"","type":"string"}}}}}}}},"iso_currency":{"description":"","type":"string"},"metadata":{"description":"","type":"array","items":{}},"payment_type":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"name":{"description":"","type":"string"}}},"products":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"internal_id":{"description":"","type":"string"},"name":{"description":"","type":"string"},"price":{"description":"","type":"number"},"quantity":{"description":"","type":"integer"},"sku":{"description":"","type":"string"},"total_amount":{"description":"","type":"number"}}}},"sale":{"description":"","type":"object","properties":{"amount":{"description":"","type":"number"},"created_date":{"description":"","type":"string"},"id":{"description":"","type":"string"},"unique_request_id":{"description":"","type":"string"}}},"shipping":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"amount":{"description":"","type":"integer"},"created_date":{"description":"","type":"string"},"fulfillment_account":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"name":{"description":"","type":"string"},"fulfillment_center":{"description":"","type":"object","properties":{"id":{"description":"","type":"string"},"name":{"description":"","type":"string"}}}}},"fulfillment_account_notified":{"description":"","type":"boolean"},"fulfillment_account_notified_date":{"description":"","type":"string"},"id":{"description":"","type":"string"},"is_delivered":{"description":"","type":"boolean"},"is_free":{"description":"","type":"boolean"},"is_shipped":{"description":"","type":"boolean"},"provider":{"description":"","type":"string"},"provider_delivered_date_unix":{"description":"","type":"integer"},"provider_method":{"description":"","type":"string"},"provider_tracking":{"description":"","type":"string"},"provider_tracking_url":{"description":"","type":"string"},"ship_date_unix":{"description":"","type":"integer"},"ship_to":{"description":"","type":"object","properties":{"first_name":{"description":"","type":"string"},"last_name":{"description":"","type":"string"},"address_line_1":{"description":"","type":"string"},"address_line_2":{"description":"","type":"string"},"city":{"description":"","type":"string"},"state":{"description":"","type":"string"},"zip":{"description":"","type":"string"},"country":{"description":"","type":"string"},"company":{"description":"","type":"string"},"email":{"description":"","type":"string"},"phone":{"description":"","type":"string"}}},"shipping_status":{"description":"","type":"string"}}}},"tracking_entries":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"created_date":{"description":"","type":"string"},"host":{"description":"","type":"string"},"hosted_page":{"description":"","type":"null"},"id":{"description":"","type":"string"},"pathname":{"description":"","type":"string"},"tracking_domain":{"description":"","type":"object","properties":{"name":{"description":"","type":"string"},"id":{"description":"","type":"string"},"domain":{"description":"","type":"string"}}}}}},"tracking_visitor":{"description":"","type":"object","properties":{"created_date":{"description":"","type":"string"},"fingerprint":{"description":"","type":"string"},"id":{"description":"","type":"string"},"ip_address":{"description":"","type":"string"},"ip_details":{"description":"","type":"object","properties":{"ip":{"description":"","type":"string"},"is_eu":{"description":"","type":"boolean"},"city":{"description":"","type":"string"},"region":{"description":"","type":"string"},"region_code":{"description":"","type":"string"},"region_type":{"description":"","type":"string"},"country_name":{"description":"","type":"string"},"country_code":{"description":"","type":"string"},"continent_name":{"description":"","type":"string"},"continent_code":{"description":"","type":"string"},"latitude":{"description":"","type":"number"},"longitude":{"description":"","type":"number"},"postal":{"description":"","type":"null"},"calling_code":{"description":"","type":"string"},"asn":{"description":"","type":"object","properties":{"asn":{"description":"","type":"string"},"name":{"description":"","type":"string"},"domain":{"description":"","type":"string"},"route":{"description":"","type":"string"},"type":{"description":"","type":"string"}}},"company":{"description":"","type":"object","properties":{"name":{"description":"","type":"string"},"domain":{"description":"","type":"string"},"network":{"description":"","type":"string"},"type":{"description":"","type":"string"}}},"languages":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"name":{"description":"","type":"string"},"native":{"description":"","type":"string"},"code":{"description":"","type":"string"}}}},"currency":{"description":"","type":"object","properties":{"name":{"description":"","type":"string"},"code":{"description":"","type":"string"},"symbol":{"description":"","type":"string"},"native":{"description":"","type":"string"},"plural":{"description":"","type":"string"}}},"time_zone":{"description":"","type":"object","properties":{"name":{"description":"","type":"string"},"abbr":{"description":"","type":"string"},"offset":{"description":"","type":"string"},"is_dst":{"description":"","type":"boolean"},"current_time":{"description":"","type":"string"}}},"threat":{"description":"","type":"object","properties":{"is_tor":{"description":"","type":"boolean"},"is_icloud_relay":{"description":"","type":"boolean"},"is_proxy":{"description":"","type":"boolean"},"is_datacenter":{"description":"","type":"boolean"},"is_anonymous":{"description":"","type":"boolean"},"is_known_attacker":{"description":"","type":"boolean"},"is_known_abuser":{"description":"","type":"boolean"},"is_threat":{"description":"","type":"boolean"},"is_bogon":{"description":"","type":"boolean"},"blocklists":{"description":"","type":"array","items":{}}}}}},"user_agent":{"description":"","type":"string"}}},"transactions":{"description":"","type":"array","items":{"description":"","type":"object","properties":{"amount":{"description":"","type":"number"},"approved":{"description":"","type":"boolean"},"created_date":{"description":"","type":"string"},"customer_card":{"description":"","type":"object","properties":{"type":{"description":"","type":"string"},"id":{"description":"","type":"string"},"first_6":{"description":"","type":"string"},"last_4":{"description":"","type":"string"},"expiry_date":{"description":"","type":"string"},"expiry_month":{"description":"","type":"string"},"expiry_year":{"description":"","type":"string"},"bin_details":{"description":"","type":"object","properties":{"card_bin":{"description":"","type":"string"},"bin_bank":{"description":"","type":"string"},"bin_card":{"description":"","type":"string"},"bin_type":{"description":"","type":"string"},"bin_level":{"description":"","type":"string"},"bin_country":{"description":"","type":"string"},"bin_country_code":{"description":"","type":"string"},"bin_website":{"description":"","type":"string"},"bin_phone":{"description":"","type":"string"},"bin_valid":{"description":"","type":"boolean"},"card_issuer":{"description":"","type":"string"}}}}},"declined":{"description":"","type":"boolean"},"error":{"description":"","type":"boolean"},"gateway_auth_code":{"description":"","type":"string"},"gateway_avs_result_code":{"description":"","type":"string"},"gateway_cavv_result_code":{"description":"","type":"string"},"gateway_cvv_result_code":{"description":"","type":"string"},"gateway_id":{"description":"","type":"string"},"gateway_name":{"description":"","type":"string"},"gateway_result_phrase":{"description":"The result phrase returned by the gateway.","type":"string"},"gateway_transaction_id":{"description":"","type":"string"},"held":{"description":"","type":"boolean"},"id":{"description":"","type":"string"},"merchant_account_id":{"description":"","type":"string"},"result":{"description":"","type":"string"},"result_code":{"description":"","type":"integer"}}}}}},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}