1. Help Center
  2. API
  3. Customer Information API

Customer Attachment API

Create Customer Attachment
URL /CustomerAttachment
Method POST
Body

{
"ContentType": "text/plain",
"FileName": "file7777.txt",
"Title": "filetitle7777",
"CustomerId": 16
}

Response
HTTP/1.1 200 OK

{
"ContentType": "text/plain",
"FileName": "file7777.txt",
"Id": 3277,
"Title": "filetitle7777",
"CustomerId": 16
}

Comments

 

  Update Customer Attachment
URL /CustomerAttachment/{customerAttachmentId}
Method PUT
Body

{
"Title": "filetitle7777888"
}

Response
HTTP/1.1 200 OK

{
"ContentType": "text/plain",
"FileName": "file7777.txt",
"Id": 3277,
"Title": "filetitle7777888",
"CustomerId": 16
}

Comments  
  Get Customer Attachments
URL /CustomerAttachment/{customerId}/{page}/{size}
Method GET
Body

 

Response
HTTP/1.1 200 OK

[
{
"ContentType": "text/plain",
"FileName": "file7777.txt",
"Id": 3277,
"Title": "filetitle7777888",
"CustomerId": 16
}
]

Comments  
  Upload Customer Attachment
URL /CustomerAttachment/Stream/{customerAttachmentId}
Method PUT
Body

{file content}

Response
HTTP/1.1 200 OK

{
"Data": "Customer",
"Id": 3277,
"IsSuccess": true,
"Message": "Updated"
}

Comments

 

  Download Customer Attachment
URL /CustomerAttachment/Stream/{customerAttachmentId}
Method GET
Body

 

Response
HTTP/1.1 200 OK
{file content}
Comments

This downloads a binary stream of data. You will need to save the data to a file with the appropriate filetype in order to open the attachment.

  Delete Customer Attachment
URL /CustomerAttachment/{customerAttachmentId}
Method DELETE
Body

 

Response
HTTP/1.1 200 OK

{
"Data": null,
"Id": 0,
"IsSuccess": true,
"Message": "Attachment was deleted"
}

Comments