Attachments

Get an attachment.

Returns an attachment based on given attachment ID. Both attachment metadata (application/json) and the file itself will be returned. Content-type for the response is multipart/mixed.

get/attachments/{attachmentId}

Request

  • Base URL: https://pts-api.procountor.com/api
  • URL: https://pts-api.procountor.com/api/attachments/{attachmentId}
  • Auth: HTTP bearer

Path parameters

attachmentIdinteger required

Id of the attachment

Response

Attachment was successfully found.

idinteger

Unique identifier of the attachment. Generated by Procountor and present in the object returned.

namestring required

Attachment name. Include a correct file extension to the value.

referenceType'BANKSTATEMENTEVENT' | 'COST_RECEIPT' | 'CUSTOMER_BUSINESS_PARTNER_REGISTER' | 'EMPLOYEE_INFO' | 'ENVIRONMENT' | 'FINANCIAL_STATEMENT' | 'INVOICE' | 'INVOICEDRAFT_ITEM' | 'LEDGERRECEIPT' | 'NETS_COLLECTION' | 'PERSON_BUSINESS_PARTNER_REGISTER' | 'PURCHASE_PRODUCT_REGISTER' | 'REFERENCE_PAYMENT' | 'SALES_PRODUCT_REGISTER' | 'SUPPLIER_BUSINESS_PARTNER_REGISTER' required

Reference type of the attachment. Indicates what object is the owner of the attachment. Exception: for JOURNAL type ledger receipts, use type INVOICE.

referenceIdinteger required

Unique identifier of the referenced object. Exception: for JOURNAL type ledger receipts, use the value of invoiceId referring to the associated invoice.

mimeTypestring

Mime type of the attachment. Determined from the file extension.

sendWithInvoiceboolean required

Indicator if attachment has to be send with the invoice. 'sendWithInvoice' can be set only for receipt types: SALES_INVOICE, SALES_ORDER, PURCHASE_ORDER

Example response

{
  "name": "Picture.jpg"
}

Changes

No recorded changes to this operation across all 1 revision of this API.