Attachments

Renames an attachment.

Renames an attachment based on the given attachment ID. The file extension can't be changed. Other properties than the filename can't be changed.

patch/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

Query parameters

namestring

Name of the attachment file

Request body

namestring required

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

Example request

{
  "name": "Picture.jpg"
}

Response

Attachment was successfully renamed.

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.