Attachments

Add a new attachment.

Using this endpoint you can add an attachment. The attachment can be of any type but limited to max 10000000 bytes. Content-type for the request is multipart/form-data. Type for the meta data is application/json, see Attachment model.

post/attachments

Request

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

Response

Attachment was successfully added.

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.