Skip to content

Dispute Attachments

Uploading a File Attachment

Uploading an attachment for a dispute is a two step process. First, you need to generate a pre-signed upload URL. Then, you upload the attachment to that generated URL. You can find the allowed list of file types for attachments in the appendix at the bottom of this article.

Generating a Pre-signed Upload URL

Swagger Page

https://swagger-ui.aws-prod.billtrust.com/?urls.primaryName=Dispute%20Service%20v1#/DisputeAttachmentV1/post_v1_tenants__tenantId__disputes__disputeId__attachments

Permission

Dispute Management : UPDATE

Example Request

curl -X POST 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/disputes/{disputeId}/attachments' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'X-Billtrust-Api-Key: <API key value>' \
    -d '{ "fileName": "my_attachment.pdf", "visibility":"Internal" | "All" }'

Example Response

{
  "uploadId": "{uploadId}",
  "uploadUrl": "https://billtrust-prod-arc-file-sani-svc-dirty-bucket.s3.amazonaws.com/filescanning/{uploadId}/my_attachment.pdf?AWSAccessKeyId={accessKey}&Expires=1616950053&x-amz-security-token={securityToken}"
}

Uploading the File

Example Request

curl -X PUT 'https://billtrust-prod-arc-file-sani-svc-dirty-bucket.s3.amazonaws.com/filescanning/{uploadId}/my_attachment.pdf?AWSAccessKeyId={accessKey}&Expires=1616950053&x-amz-security-token={securityToken}' \
    -H 'accept: application/json, text/plain, */*' 

Retrieving an Attachment's Details by ID

Swagger Page

https://swagger-ui.aws-prod.billtrust.com/?urls.primaryName=Dispute%20Service%20v1#/DisputeAttachmentV1/get_v1_tenants__tenantId__disputes__disputeId__attachments__id_

Permission

Dispute Management : READ

Example Request

curl -X GET 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/disputes/{disputeId}/attachments/{attachmentId}' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'X-Billtrust-Api-Key: <API key value>'

Example Response

{
  "tenantId": "{tenantId}",
  "attachmentId": "{attachmentId}",
  "disputeId": "{disputeId}",
  "fileName": "my_attachment.pdf",
  "downloadUrl": "https://billtrust-prod-arc-dispute-service-attachments-bucket.s3.amazonaws.com/{attachmentS3Key}?AWSAccessKeyId={accessKey}&Expires=1616947202&x-amz-security-token={securityToken}",
  "uploadId": "{uploadId}",
  "status": "Available",
  "visibility": "Internal",
  "attachmentS3Key": "{attachmentS3Key}",
  "failureReasons": [],
  "createUser": "{userId}",
  "createDate": "2021-03-28T14:55:47.406Z",
  "updateUser": "{userId}",
  "updateDate": "2021-03-28T14:55:47.406Z"
}

Retrieving all Attachment Details for a Dispute

Swagger Page

https://swagger-ui.aws-prod.billtrust.com/?urls.primaryName=Dispute%20Service%20v1#/DisputeAttachmentV1/get_v1_tenants__tenantId__disputes__disputeId__attachments

Permission

Dispute Management : READ

Example Request

curl -X GET 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/disputes/{disputeId}/attachments' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'X-Billtrust-Api-Key: <API key value>'

Example Response

[
  {
    "tenantId": "{tenantId}",
    "attachmentId": "{attachmentId}",
    "disputeId": "{disputeId}",
    "fileName": "my_attachment.pdf",
    "downloadUrl": null,
    "uploadId": "{uploadId}",
    "status": "Available",
    "visibility": "Internal",
    "attachmentS3Key": "{attachmentS3Key}",
    "failureReasons": [],
    "createUser": "{userId}",
    "createDate": "2021-03-28T14:55:47.406Z",
    "updateUser": "{userId}",
    "updateDate": "2021-03-28T14:55:47.406Z"
  },
    ...
]

Deleting an Attachment

Swagger Page

https://swagger-ui.aws-prod.billtrust.com/?urls.primaryName=Dispute%20Service%20v1#/DisputeAttachmentV1/delete_v1_tenants__tenantId__disputes__disputeId__attachments__id_

Permission

Dispute Management : UPDATE

Example Request

curl -X DELETE 'https://arc-aegis.billtrust.com/dispute/v1/tenants/{tenantId}/disputes/{disputeId}/attachments/{attachmentId}' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'X-Billtrust-Api-Key: <API key value>'

Appendix

Allowed File Types

Category Examples
Adobe .pdf
Archive .zip
Email .eml
Image .jpeg .gif .png
Media .mov .mp4
Office Documents .docx .xlsx
Text Files .txt .rtf

Disallowed File Types

All file types not in the allowed list are disallowed. This includes archive files that contain files of a type not in the allowed list.