sales

POST /companies/{companySlug}/sales/{saleId}/attachments

Changed on

Creates and adds a new attachment to a Sale

Request

  • Base URL
    https://api.fiken.no/api/v2
  • URL
    https://api.fiken.no/api/v2/companies/{companySlug}/sales/{saleId}/attachments
  • Auth
    OAuth 2
    Authorization code: https://fiken.no/oauth/authorize
    Token URL: https://fiken.no/oauth/token

Query parameters

attachToPaymentboolean

True if this attachment may document the payment (i.e. transaction receipt from credit card/payment company, export from bank, etc.). Default value is false if not specified. At least one of attachToPayment and attachToSale must be true.

attachToSaleboolean

True if this attachment may document the sale (i.e. invoice, etc). Default value is false if not specified. At least one of attachToPayment and attachToSale must be true.

ehfDocumentIdinteger

Instead of uploading a file, attach an existing received EHF document by its ehfDocumentId. The source EHF is marked as used and leaves the unprocessed view. Provide exactly one of file, ehfDocumentId or inboxDocumentId.

inboxDocumentIdinteger

Instead of uploading a file, attach an existing inbox document by its inboxDocumentId. The source document is marked as used and leaves the unused inbox view. Provide exactly one of file, ehfDocumentId or inboxDocumentId.

Request body multipart/form-data

filenamestring

The filename. Must end with either .png, .jpeg, .jpg, .gif or .pdf

filestring binary

Example request

{
  "filename": "invoice_24760.pdf",
  "file": "https://fiken.no/api/v2/files/745b2f15-gh75-4408-bgf2-b1d2dt610cb2/invoice24760.pdf"
}

Response

Created

Changes

    • info

      added the new optional query request parameter ehfDocumentId

    • info

      added the new optional query request parameter inboxDocumentId

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the new optional query request parameter attachToPayment

    • info

      added the new optional query request parameter attachToSale